?
Solved

Authenticate error using xp_smtp_sendmail

Posted on 2014-02-04
6
Medium Priority
?
697 Views
Last Modified: 2014-03-04
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 = 'me@myemail.com',
        @from = 'system@theiremail.com',
        @message = 'ytfuytfuyfuy hguyg',
        @subject = 'test email',
        @server = 'smtp.ourdomain.com'  

I get the error:

Error: sending message
Server response: 503 you must authenticate first (#5.5.1)
0
Comment
Question by:Angel02
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 16

Assisted Solution

by:Surendra Nath
Surendra Nath earned 800 total points
ID: 39833845
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

http://blogs.msdn.com/b/suhde/archive/2009/07/12/how-to-configure-sql-server-database-mail-to-send-email-using-your-windows-live-mail-account-or-your-gmail-account.aspx

how to use sp_send_dbmail can be learnt by using
http://technet.microsoft.com/en-us/library/ms190307.aspx
0
 

Author Comment

by:Angel02
ID: 39833881
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.
0
 
LVL 16

Expert Comment

by:Surendra Nath
ID: 39833896
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.

http://technet.microsoft.com/en-us/library/ms143761(v=sql.90).aspx
0
Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39834370
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).
0
 

Author Comment

by:Angel02
ID: 39834471
So what are my options? Please advise.
Can I get xp_smtp_sendmail to work?
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1200 total points
ID: 39837621
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.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

764 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