Authenticate error using xp_smtp_sendmail

I know this is old but the SQL server I am working on is using xp_smtp_sendmail to send emails via SQL. I have not used this before so I don't know how that works. I did find dbo.xp_smtp_sendmail in Extended Stored Procedures so probably a dll was downloaded.

The issue is it has stopped working since we changed a password of the "From" address in our network provider account. Is there any change I need to make in the SQL server end when the password changes? As an example I ran

EXEC master.dbo.xp_smtp_sendmail
        @TO = '',
        @from = '',
        @message = 'ytfuytfuyfuy hguyg',
        @subject = 'test email',
        @server = ''  

I get the error:

Error: sending message
Server response: 503 you must authenticate first (#5.5.1)
Who is Participating?
Anthony PerkinsConnect With a Mentor Commented:
If you are using SQL Server Express 64-bit you will have to write your own code with the help of the sp_OA* functions.  If you are using 32-bit you may still be able to use the old xp_smtp_sendmail extended Stored Procedure.  I have never tried.
Surendra NathConnect With a Mentor Technology LeadCommented:
I see that you are SQL Server 2005, then why you are using xp_smtp_sendmail , it is a old functionality.
You can actually use the sp_send_dbmail which is the new feature in SQL Server 2005 onwards...

How to setup a DB-mail account a step-by-step guide is given below

how to use sp_send_dbmail can be learnt by using
Angel02Author Commented:
I thought so too when I saw xp_smtp_sendmail being used. It has been few years since this was written. But I was trying to see if it could be fixed before changing it.

Also, when I go to Management in SQL Server Express, I can't find DatabaseMail option.
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Surendra NathTechnology LeadCommented:
is yours a 64 bit machine, and did you install 64 bit sql server express edition to do this.... in that case you cannot see this as it seems it is not supported in 64 bit in Express editions.
Anthony PerkinsCommented:
Actually DB Mail is supported on a 32-bit O/S it is just not supported using the Express Edition (regardless of whether it is 32 or 64-bit).
Angel02Author Commented:
So what are my options? Please advise.
Can I get xp_smtp_sendmail to work?
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.

All Courses

From novice to tech pro — start learning today.