473,395 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ASP Page emailing text file



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 us**@domain.com")

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!
Jul 19 '05 #1
6 5009
ExecCmd("blat .\prodapp.txt -s " & chr(34) & "Product Info " & chr(34) & "-t
us**@domain.com")
--

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 <sc*****@noemail.net> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...


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 us**@domain.com")

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!

Jul 19 '05 #2
>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 us**@domain.com")

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
Jul 19 '05 #3

I have modified the asp code as suggested. Now, when I run it, I get
"Microsoft VBScript runtime (0x800A01A8) 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 us**@userdomain.com")

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!
Jul 19 '05 #4
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 <sc*****@noemail.net> wrote in message
news:e2**************@tk2msftngp13.phx.gbl...

I have modified the asp code as suggested. Now, when I run it, I get
"Microsoft VBScript runtime (0x800A01A8) 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 us**@userdomain.com")

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!

Jul 19 '05 #5
> 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/


Jul 19 '05 #6
Sorry, I need to read more carefully.
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bill | last post by:
I am trying to have the capability to email attachments. Specifically I want to be able to email a specific attachment that I name that may be a PDF document, text doc, etc. I already have a...
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
3
by: Strasser | last post by:
In Access2000 mass emailing worked perfectly (very powerful tool!). Doesn't work when using XP version of both Access and Outlook, even though I checked the box to ensure that I was sending the...
4
by: Richard Grene | last post by:
What is the method for emailing current web page using Web Mail? Thanks, Richard
2
by: Rico | last post by:
Hello, I'm using formmail.asp which is an emailing utility. Basically, the user fills out a request page, clicks "Submit" and the page posts to formmail.asp which emails the user information. ...
2
by: JMG | last post by:
Hi All, I have no idea if this is the correct place to post this question, but I'm hoping so :). My problem is that I have a text file containing 5 sets of passwords on a single line space...
1
by: kang jia | last post by:
hi when user entered particulars in signuppage and click" signup" button, i will direct them to do_signup.php. if say the NRIC is dupicate in datebase, i will redirect them back to signup page...
1
by: jsd219 | last post by:
I have a report.php page that displays data from a mysql database. I would like to create a text box to input an email address and upon submitting, have the report attached and sent to the email...
1
by: =?Utf-8?B?U2FpIFZhamph?= | last post by:
Hi I am trying to send a .pdf document as an email attachment using net.mail. This email is being sent by a windows service application. After i receive the email, and when i try to open the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.