I test for basic problems in the email address such as @ sign and period in the previous page, but if the email is still bad, it fries the server when the email is sent by JMail. Here's the code I'm using. Thank you for your help.
On Error Resume Next
Set JMail = Server.CreateObject ("JMail.SMTPMail")
JMail.ServerAddress = "mail.ab-cpe.com:25"
JMail.Sender = "
[email protected]"
JMail.Subject = "AB-CPE Information"
JMail.AddRecipient Session("AdEmail")
JMail.Body = "Password: "&Session("EntirePW")
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")
JMail.Execute
If Err.number <> 0 Then
Response.write("Bad e-mail address.")
Response.write(Err.Description)
Else
Response.write(âYour e-mail has been sent.â)
End if