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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matt's Formmail.asp question

Status
Not open for further replies.

viol8ion

Technical User
Feb 8, 2001
1,260
US
I am a novice with ASP, being forced to use it for my form mailer at work since they insist on using an NT webserver. I am fairly adept at PHP3 and Perl.

I am using Matt's formmail.asp and I need to take the results of the form and either print them on the confirmatipon HTML page to which I redirect them after they send the form.

Or, another possibility would be to email the form to their email, in which case I would need to dynamically snag their email and use it in the recipient field.

Is either possible, this script seems to be rather limited from the documentation that I have been able to find.

thanx in advance When in doubt, deny all terms and defnitions.
 
here you go, have any form submit to this page naming it email.asp
to test it.

************************* email.asp *********************

<%
Dim objMail
Set objMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)


HTML = HTML & &quot;<HTML>&quot;
HTML = HTML & &quot;<HEAD>&quot;
HTML = HTML & &quot;<TITLE>Send Mail with HTML</TITLE>&quot;
HTML = HTML & &quot;</HEAD>&quot;
HTML = HTML & &quot;<BODY bgcolor=&quot;&quot;lightyellow&quot;&quot;>&quot;
HTML = HTML & &quot;<TABLE cellpadding=&quot;&quot;4&quot;&quot;>&quot;
HTML = HTML & &quot;<TR><TH><FONT color=&quot;&quot;darkblue&quot;&quot; SIZE=&quot;&quot;4&quot;&quot;>&quot;
HTML = HTML & now() & &quot; - &quot;
HTML = HTML & &quot;This is an HTML formatted email</FONT></TH></TR>&quot;
HTML = HTML & &quot;<TR><TD>&quot;
HTML = HTML & &quot;</FONT></TD></TR></TABLE><BR><BR>&quot;
HTML = HTML & &quot;</BODY>&quot;
HTML = HTML & &quot;</HTML>&quot;

objMail.From = &quot;FromYou@ISP.com&quot;
objMail.Subject = &quot;Here's your first ASP email using CDONTS&quot;

'you need TO add these lines FOR the mail
'to be sent in HTML format
objMail.BodyFormat = 0
objMail.MailFormat = 0

objMail.To = &quot;YOU@ISP.com&quot;
objMail.Body = HTML
objMail.Send

Response.write(&quot;Mail was Sent&quot;)
set objMail = nothing
%>

************************* email.asp *********************

OR

You can simply send it in plain TEXT if you wish...
[tt]
&quot;The only ideas that will work for you are the ones you put to work.&quot;
[/tt]

banana.gif
rockband.gif
banana.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top