Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP email

Status
Not open for further replies.

needhelpquick

IS-IT--Management
Jan 17, 2001
12
0
0
GB
Does anyone have simple ASP email code which will take more 'Input' boxes than the standard - To, From, Subject, Text fields. I need to add some more such as - Address, Phone etc.
Many Thanks
Richard
 
Richard,

All those extra fields just go into the 'Body' of the email. It is totaly up to you how you format it. Most of the email ActiveX control interfaces just take a 'string' to set the 'body' of the email. So just build the string however you want to contain ALL your info. So something like this in Javascript:

var oMailer = Server.CreateObject("...."); // name of your COM object
var sBody = "Here is your web message.\r\n"; // line break
sBody += "Address: " + Request("txAddress") + "\r\n";
sBody += "Phone: " + Request("txPhone") + "\r\n";

oMailer.body = sBody;

Hope this helps
-pete
 
Actually, there is this really slick and super cool freeware asp component out there called (strangely enough) ASPEmail. It is completely customizeable, and you can even send HTML emails, emails with embedded pictures and/or sounds, and all that sort of stuff. Personally, I used it to write a script that read email addresses from a database to send out 450 emails with different subjects and different signatures (based on what district they were from in the database). Very cool component and highly recommended.

Here's where you can get it!

hope it helps!
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top