submit button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

can someone help me with the follow problem.
I have a submit button and want to email a mail to a selected email address
in my form, this is an email address in a dropdown button. I have the value
in the dropdown menu the email address.
I hope that someone can help me resolve this issue.

Thanks,
Roger
 
Hi Roger
You will have to use a third party form to email script I use jmail .
http://www.aspwebpro.com/aspscripts/email/jmail.asp
http://support.rapidsystem.net/ntfaq/jmail.html

Modify the script as follows
add your drop down box and call it srecipient to the form part of the script
Use this as the confirmation.asp page and change the server address to yours

Paul M

<%
DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mailer,
srecipient
strEmail = Request.Form("Email")
strFirstName = Request.Form("FirstName")
strLastName = Request.Form("LastName")
strSubject = Request.Form("Subject")
strComments = Request.Form("Comments")
strRecipient = Request.Form("srecipient")

Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.aspwebpro.com"
JMail.AddRecipient = strRecipient
JMail.Sender = strEmail
JMail.Subject = strSubject
JMail.Body = strComments
JMail.Execute
Set JMail= Nothing

IF NOT JMail.Execute THEN
Response.Write( "ERROR MESSAGE: " & JMail.ErrorMessage & "<BR>" & vbcrlf )
Response.Write( "ERROR SOURCE: " & JMail.ErrorSource & "<BR>" & vbcrlf )
Response.Write( "LOG: <pre>" & JMail.Log & "</pre>" & vbcrlf )
ELSE
Response.Write "<blockquote>Your :<b>" & strSubject & "</b> Newsletter has
been successfully sent to <b>" & intSubscribers & "</b>
subscribers.</blockquote>"
END IF
%>
 
Back
Top