Email doesn;t send

I have a bi package that restores databases.  It works okay, but doesn;t always send a notification email as it is designed to do.  It seems to work if I have logged on the the machine.   It seems to fail if I haven't logged on in a while.  Here is the error log.

Send Mail Task Send Mail Task     Description: An error occurred with the following error message: "The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication required for relay (#5.7.1)".  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  3:00:00 AM  Finished: 3:01:07 AM  Elapsed:  67.159 seconds.  The package execution failed.  The step failed.

Same package works when I log on and run it.  Is this a credentials thing on the sql server agent?

Help

May 2nd, 2012 6:19pm

Instead, you need to run this package using a porxy domain account that has an Exchange email configured for.
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2012 6:25pm

I don't have an exchange server.  Just using a pop3 server.Where do I define what process this job runs under?
May 2nd, 2012 7:13pm

Wait, but you cannot send emails using the pop3 server from within the stock email task.  You need an SMTP server.
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2012 7:16pm

Sorry.  SMPT.  My mistake.
May 2nd, 2012 7:19pm

Then this is your only option: run this package using a proxy account that has its Exchange email configured
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2012 7:23pm

I don't understand.  I don;t have exchange server.  I use a hosted smtp maiil service.  Are you saying this won't work. If not, why does it work when I am logged in to the server.  The job still runs uin the same context, doesnt it?

How do I set the job to run on a given account?

May 2nd, 2012 9:37pm

The only method of sending emails supported by Send Mail task is SMTP, hosted or not.

It works when you are logged in because there is somewhere in the log in script a command to authenticate you against the SMTP server.

However, the SMTP server disconnects you after some time period of idling e.g. after you logged off.

You need a so called service account to run the package; this is good from more prospectives, e.g. what if you account gets locked up or password changed, or you are no longer with the employer?

To set the proxy/service account up to drive the SSIS job please refer to http://www.codeproject.com/KB/aspnet/Schedule__Run__SSIS__DTS.aspx

Free Windows Admin Tool Kit Click here and download it now
May 7th, 2012 2:10pm

I am using SQL Server 2008 R2.  I tried to follow the steps in your article.

SQL Server doesnt understand Sp_add_proxy

Are there different instructions for R2?

May 8th, 2012 10:11am

Not at all, please see this post that is more to the point and let me know if you succeeded: http://www.databasejournal.com/features/mssql/article.php/3789881/Proxy-Accounts-in-SQL-Server.htm

If not, let us know the exact steps you performed to repro and the exact error messages returned.

Free Windows Admin Tool Kit Click here and download it now
May 8th, 2012 2:24pm

I know this is an old question, but I'm going to throw this out there just in case other users find this question while searching for a solution.
I had this error message in SSIS while trying to use a SendMail task with an SMTP Connection:  "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated".  However, it did not give me any error when I ran the same package from a different computer.  I finally solved the issue by talking to the administrator of our SMTP server.  He simply had to set up my computer's IP address for Exchange to relay.  I have no idea what that means, but if anyone experiences this issue, talk to your SMTP administrator right away to see if they can help, instead of fighting it for several wasted hours like I did.
May 29th, 2015 4:35pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics