Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP Page emailing text file

Reply
Thread Tools

ASP Page emailing text file

 
 
Porky
Guest
Posts: n/a
 
      12-01-2003


I have an asp page that successfully writes out the form data to a text
file. I would like to use Blat (or other free email utility) to send
the contents of the text file to a user. The code to email is as
follows:

Dim stdout, shell, cmd
function ExecCmd(cmdline)
set stdout = wscript.stdout
set shell = createobject("wscript.shell")
set cmd = shell.Exec(cmdline)
do until cmd.status=1: wscript.sleep 5:loop
ExecCmd = cmd.stdout.readall
End Function

ExecCmd("blat .\prodapp.txt -s "Product Info" -t http://www.velocityreviews.com/forums/(E-Mail Removed)")

I am guessing that it may not like the two sets of double quotes. Is it
possible to do this? The company is not willing to spend $$$$$ on
actual sendmail package. Any help on cleaning this up would be much
appreciated

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Steven Burn
Guest
Posts: n/a
 
      12-01-2003
ExecCmd("blat .\prodapp.txt -s " & chr(34) & "Product Info " & chr(34) & "-t
(E-Mail Removed)")


--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Porky <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> I have an asp page that successfully writes out the form data to a text
> file. I would like to use Blat (or other free email utility) to send
> the contents of the text file to a user. The code to email is as
> follows:
>
> Dim stdout, shell, cmd
> function ExecCmd(cmdline)
> set stdout = wscript.stdout
> set shell = createobject("wscript.shell")
> set cmd = shell.Exec(cmdline)
> do until cmd.status=1: wscript.sleep 5:loop
> ExecCmd = cmd.stdout.readall
> End Function
>
> ExecCmd("blat .\prodapp.txt -s "Product Info" -t (E-Mail Removed)")
>
> I am guessing that it may not like the two sets of double quotes. Is it
> possible to do this? The company is not willing to spend $$$$$ on
> actual sendmail package. Any help on cleaning this up would be much
> appreciated
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      12-01-2003
>I have an asp page that successfully writes out the form data to a text
>file. I would like to use Blat (or other free email utility) to send
>the contents of the text file to a user. The code to email is as
>follows:
>
>Dim stdout, shell, cmd
>function ExecCmd(cmdline)
>set stdout = wscript.stdout
>set shell = createobject("wscript.shell")
>set cmd = shell.Exec(cmdline)
>do until cmd.status=1: wscript.sleep 5:loop
>ExecCmd = cmd.stdout.readall
>End Function
>
>ExecCmd("blat .\prodapp.txt -s "Product Info" -t (E-Mail Removed)")
>
>I am guessing that it may not like the two sets of double quotes. Is it
>possible to do this? The company is not willing to spend $$$$$ on
>actual sendmail package. Any help on cleaning this up would be much
>appreciated


Escape the double quotes by doubling them. Or use an ASP method to
send the info without going to the trouble of writing a text file.

Jeff
 
Reply With Quote
 
Porky
Guest
Posts: n/a
 
      12-01-2003

I have modified the asp code as suggested. Now, when I run it, I get
"Microsoft VBScript runtime (0x800A01A Object required: 'wscript' " on
line 61 which is

set stdout = wscript.stdout

in the code


Dim stdout, shell, cmd
function ExecCmd(cmdline)
set stdout = wscript.stdout
set shell = createobject("wscript.shell")
set cmd = shell.exec(cmdline)
do until cmd.status = 1: wscript.sleep 5: loop
ExecCmd = cmd.stdout.readall
End Function

ExecCmd (".\blat.exe .\prodapp.txt -s " & chr(34) & "Product
Application Form" & chr(34) & " -t (E-Mail Removed)")

I know I am hitting all around the mark, but haven't quite got it. The
answer is probably painfully obvious as well.

Thanks for the help


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Steven Burn
Guest
Posts: n/a
 
      12-01-2003
thats because your trying to use it before it's been created.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Porky <(E-Mail Removed)> wrote in message
news:e2i#(E-Mail Removed)...
>
> I have modified the asp code as suggested. Now, when I run it, I get
> "Microsoft VBScript runtime (0x800A01A Object required: 'wscript' " on
> line 61 which is
>
> set stdout = wscript.stdout
>
> in the code
>
>
> Dim stdout, shell, cmd
> function ExecCmd(cmdline)
> set stdout = wscript.stdout
> set shell = createobject("wscript.shell")
> set cmd = shell.exec(cmdline)
> do until cmd.status = 1: wscript.sleep 5: loop
> ExecCmd = cmd.stdout.readall
> End Function
>
> ExecCmd (".\blat.exe .\prodapp.txt -s " & chr(34) & "Product
> Application Form" & chr(34) & " -t (E-Mail Removed)")
>
> I know I am hitting all around the mark, but haven't quite got it. The
> answer is probably painfully obvious as well.
>
> Thanks for the help
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      12-02-2003
> set stdout = wscript.stdout
> set shell = createobject("wscript.shell")


I think you need to change the order of these two lines. How can you grab a
property from an object you haven't yet created?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/






 
Reply With Quote
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      12-02-2003
Sorry, I need to read more carefully.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Emailing photo attachments (file size) GoFlatty Digital Photography 24 10-30-2007 06:00 AM
post html to asp.net page for validation and emailing csteacy@gmail.com ASP .Net 9 07-24-2007 07:13 PM
Attach file to Page for Emailing Jess ASP General 5 08-24-2006 09:43 PM
taking a table out of a page and emailing it tshad ASP .Net 2 05-19-2006 03:21 PM
Emailing a dynamically generated aspx page Gary Coutts ASP .Net 3 04-23-2006 07:45 PM



Advertisments