Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > 8004020F error with CDO.Message

Reply
Thread Tools

8004020F error with CDO.Message

 
 
Luis andyza@webmail.co.za
Guest
Posts: n/a
 
      07-27-2004
I use CDO.Message to send e-mail from an asp page (similar
to the method at http://www.aspfaq.com/show.asp?id=2305).
One of my testers entered an invalid e-mail address and
got an 8004020F error.

Is there a way to trap this error so that I can display a
better error message to the user and prevent the page from
crashing?
 
Reply With Quote
 
 
 
 
Rob Collyer
Guest
Posts: n/a
 
      07-27-2004
"Luis http://www.velocityreviews.com/forums/(E-Mail Removed)" <(E-Mail Removed)> wrote
in news:4d2e01c473cc$6de519b0$(E-Mail Removed):

> I use CDO.Message to send e-mail from an asp page (similar
> to the method at http://www.aspfaq.com/show.asp?id=2305).
> One of my testers entered an invalid e-mail address and
> got an 8004020F error.
>
> Is there a way to trap this error so that I can display a
> better error message to the user and prevent the page from
> crashing?
>


put this code:-
ON ERROR RESUME NEXT

Just before calling the send method.

After you have called the send method, use this code:-
If err.number then
'an error occurred... prolly invalid email
'put whatever code you need here
else
'the message was sent
end if
ON ERROR GOTO 0

Hope this helps

--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error '8004020f' ASP Programming help w/ SMTP Paco ASP General 4 03-30-2005 05:31 PM
error 8004020F gariboldo ASP General 0 02-02-2005 10:07 PM
Help! CDO.Send returns error '8004020f' -- why??? Owen ASP General 6 02-20-2004 03:12 AM
just error 8004020f vvv ASP General 1 11-05-2003 07:02 PM
CDO error 8004020f alex ASP General 4 10-03-2003 07:28 PM



Advertisments