Solved

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

Posted on 2008-06-24
4
1,396 Views
Last Modified: 2013-12-17
when trying to send an email via vbs script, I am gerring an erro
    server response was: 530 authentication required
THE CODE IS AS FOLLOWS;
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

objEmail.Configuration.Fields.Update

objEmail.Send

0
Comment
Question by:mdlp
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:fgrushevsky
ID: 21859363
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
0
 

Author Comment

by:mdlp
ID: 21859925
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
mdlp

0
 
LVL 17

Accepted Solution

by:
fgrushevsky earned 500 total points
ID: 21860254
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
(cdoSendUsingPickup).

please take a look:

http://www.paulsadowski.com/WSH/cdo.htm

I hope it helps
0
 

Author Closing Comment

by:mdlp
ID: 31470310
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.
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Easy CSR creation in Exchange 2007,2010 and 2013
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now