• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1568
  • Last Modified:

vbs script to send email through an existing smtp server, the server error response was: 530 authentication required

when trying to send an email via vbs script, I am gerring an erro
    server response was: 530 authentication required
Set objEmail = CreateObject("CDO.Message")

objEmail.From = "allbeit@earthlink.net"
objEmail.To = "allbeit2@earthlink.net"
objEmail.Subject = "TEST EMAIL subject"
objEmail.Textbody = "TEST EMAIL text."
objEmail.AddAttachment "C:\TEST.txt"

objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "vfm-sdlkjfsdd@la.twcbc.com"

objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "A34523344"

objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.biz.rr.com"

objEmail.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25



  • 2
  • 2
1 Solution
Your mail server requires authentication to accept smtp mail

add this line before objEmail.Configuration.Fields.Update

objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication

assuming that your server supports clear-text authentication
mdlpAuthor Commented:
thank you fgrushevsky,
I added the line as you suggested, but this created a different error:
the message could not be sent to the SMTP server.  The transport error code was 0x80040217. The server response was not available

code: 80040211
source: (null)
I commented the added line and it went back to the original error message.  Does this mean that it will not allow clear text authentication?

I checked my existing outlook on the computer and it does not require SPA in the password settings.

I hope this helps
Thank you

the server you are trying to connect should support clear text authentication. the error could be caused by many reasons, including incorrect password, or you already tried to many times and server blacklisted you....
there is a very goof example on the PaulSadowski web site of what you are trying to do:
Send using authentication against a remote server with a file attachment and return receipt and
delivery disposition notification requests. In order to use the Delivery Status Notifications (Return
Receipt and Delivery Disposition requests) we need to create a reference to the CDO Configuration
object in addition to the CDO Message object and set a small number of properties. You must
use cdoSendUsingPort (network connection) and not the SMTP server's pickup directory

please take a look:


I hope it helps
mdlpAuthor Commented:
I am so sorry for the delay, got pulled away to another program, I am still researching the issue, but it seem that one of MS security "fixes" is tripping this up.  You have gone way beyond what the point reward for so thank you and I am thinking of trying a different route.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now