Dim objmail
Dim vbody
Set objmail = CreateObject("CDONTS.Newmail")
vbody = vbody & "Name: " & Request("requiredName") & vbcrlf
vbody = vbody & "Title: " & Request("requiredTitle") & vbcrlf
vbody = vbody & "Company: " & Request("requiredCompany") & vbcrlf
vbody = vbody & "Address: " & Request("requiredAddress1") & vbcrlf
vbody = vbody & "City: " & Request("requiredCity") & vbcrlf
vbody = vbody & "State / Province: " &
Request("requiredStateProvince") & vbcrlf
vbody = vbody & "Zip: " & Request("requiredZip") & vbcrlf
vbody = vbody & "Country: " & Request("requiredCountry") & vbcrlf
vbody = vbody & "Phone: " & Request("requiredPhone") & vbcrlf
vbody = vbody & "Fax: " & Request("Fax") & vbcrlf
vbody = vbody & "Email: " & Request("requiredEmail") & vbcrlf
objmail.From = Request("requiredEmail")
objmail.To = "[EMAIL PROTECTED] "
objmail.Subject = "Here's some help"
objmail.Body = vbody
objmail.send
Set objmail = Nothing
-----Original Message-----
From: James Johnson [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 4:23 PM
To: CF-Talk
Subject: Way Off Topic - Need help sending email with ASP
Hi,
I know this is way off topic, but really need some help quickly.
I can do this easily with CF, but ASP is a way different beast. Has
anyone had any experience sending email via ASP/VBScript? I can format
the mail headers, to, from, subject, and, can send the mail, but can't
get a variable containing a string of other info to show up in the
subject. I know the CDONTS mailer is working, or else no mail would be
sent or received.
I can't debug this in Dreamweaver, as there's no JavaScript. I can't
easily figure out how to debug HTML/ASP code in Visual Studio .NET.
Here's the code:
************************************
Dim MyMail
Dim MsgText
Set MsgText = Request.Form("FirstName") + " " + Request.Form("LastName")
+ " has requested more information."
Set MsgText = MsgText + "Please contact them at " +
Request.Form("Phone")
Set MsgText = MsgText + VBCrLf
Set MsgText = MsgText + Request.Form("FirstName") + VBCrLf
Set MsgText = MsgText + Request.Form("LastName") + VBCrLf
Set MsgText = MsgText + Request.Form("Addr1") + VBCrLf
Set MsgText = MsgText + Request.Form("Addr2") + VBCrLf
Set MsgText = MsgText + Request.Form("City") + VBCrLf
Set MsgText = MsgText + Request.Form("State") + VBCrLf
Set MsgText = MsgText + Request.Form("ZIP") + VBCrLf
Set MsgText = MsgText + Request.Form("Email") + VBCrLf
Set MsgText = MsgText + Request.Form("Phone") + VBCrLf
Set MsgText = MsgText + Request.Form("Comments") + VBCrLf
Set MsgText = MsgText + Request.Form("NoMkt") + VBCrLf
Set MyMail = CreateObject("CDONTS.NewMail")
MyMail.From = "[EMAIL PROTECTED]"
MyMail.To = "[EMAIL PROTECTED]"
MyMail.Subject = "Information Request"
MyMail.BodyFormat = 1 'plain text
MyMail.MailFormat = 1 'plain text
MyMail.Body = MsgText
MyMail.Send
Set MyMail = Nothing
********************************
Again, sorry for the off topic, but if there was a House of ASP mailing
list.... :)
Thanks,
*******************************************
James Johnson
SMB-Studios
Innovative Online Learning for Spirit, Mind and Body
www.smb-studios.com
[EMAIL PROTECTED]
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists