423,485 Members | 1,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,485 IT Pros & Developers. It's quick & easy.

error '8004020e' while sending mail

P: 1
Hi,
I am trying to send a mail thru my web page. the code is as below: -
Expand|Select|Wrap|Line Numbers
  1. Set objEmail = CreateObject("CDO.Message")
  2. objEmail.From = "myID@gmail.com"
  3. objEmail.To = "myID@gmail.com"
  4. objEmail.Subject = "New user notification for " & username 
  5. objEmail.Textbody = hkm
  6. objEmail.Configuration.Fields.Item _
  7.     ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  8. objEmail.Configuration.Fields.Item _
  9.     ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
  10.         "smtp.gmail.com" 
  11. objEmail.Configuration.Fields.Item _
  12.     ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
  13. 'Your UserID on the SMTP server
  14. objEmail.Configuration.Fields.Item _
  15. ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "myID@gmail.com"
  16.  
  17. 'Your password on the SMTP server
  18. objEmail.Configuration.Fields.Item _
  19. ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "myPass"
  20.  
  21. 'Use SSL for the connection (False or True)
  22. objEmail.Configuration.Fields.Item _
  23. ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
  24. objEmail.Configuration.Fields.Update
  25. objEmail.Send
  26.  

this thing executes to give me error '8004020e' on the objEmail.Send line. Please help me with what is wrong in this.
Aug 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: 21
It seems to me it tries to connect to the mail server but it has authentication problem. If you are absolutely certain you are connected, make sure the from and to addresses are valid.
Aug 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.