473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

error '8004020e' while sending mail

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
1 25849
bakpao
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

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

Similar topics

3
by: vishal | last post by:
i am getting following error. Warning: mail() : Failed to connect to mailserver at "smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in...
0
by: tuhuteru | last post by:
Hi all! Everytime i try to send an email i get the following error: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception...
1
by: sathyan8294 | last post by:
i am using vb.net 2003.i am doing my project in vb.net windows application.the following code is for sending mail. Dim mymailmessage As New MailMessage Try Dim bSuccess As Boolean = True...
2
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how...
1
gpawade
by: gpawade | last post by:
Hello Experts, I m used SMTPClient to send mail, It was worked before. but now it give error SMTPException : Insufficient Storage. How this error come?
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
5
by: Don Quijote de Nicaragua | last post by:
Hi, everyone I try to send a simple e-mail witch this Code, but always send me a error messages: "ERROR: Failure sending mail." Thansk You. Don Quijote de Nicaragua. Elder Soto. Dim correo As...
1
maliksleo
by: maliksleo | last post by:
hi i am using the following class for email sending but getting this error "Failure sending mail" Imports System.Net.Mail Public Class MailHelper ''' <summary> ''' Sends an mail...
1
by: Hardy123 | last post by:
Hi I m developing a desktop application using C# I m trying to use gmail's smtp sever on port 587 but it is giving me an exception that target machine actively refuesd at 74.125.127.109:587 Can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.