Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 18th, 2003, 10:16 PM
Authorized User
Join Date: Aug 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default JMail: How can I deal with a bad e-mail address?

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 = "sitemanager@ab-cpe.com"
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")


If Err.number <> 0 Then

Response.write("Bad e-mail address.")



Response.write(“Your e-mail has been sent.”)

End if
Mark J. Weisberger

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting from address in outlook mail item bishnupokhrel Pro VB 6 1 January 26th, 2011 10:28 AM
E-mail Address Changes Ben Horne Forum and Wrox.com Feedback 1 April 1st, 2004 04:43 PM
Verify for Valid E-mail address eapsokha Classic ASP Professional 2 February 24th, 2004 12:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.