0
votes

I have created a SSIS package which contains a send mail task. The package works fine when I run the package in visual studio. But when I try to run the package in Sql server job under sql server agent account it fails.

I have tried to change the sql server account from local service to the domain user but I got the error Access denied. How do I achieve this? I need to send an email containing attachments based on certain constraints on data flows.

1
sql server agent account AND sql server account are two different things. If you change the account of "the sql server account " , but the package is exeuting by sql server agent... it probably don't make difference. You need for SQL Server Agent account would be the same like Sql Server account. Send mail task is also almost worst element in BI, I'm always sending mails, by Script task.Justin

1 Answers

0
votes

you may want to look at proxy accounts to work around the issue...

http://msdn.microsoft.com/en-us/library/ms190698(v=sql.105).aspx

This will allow you to use an account that has the needed permissions to execute the package... from your description it is not clear if you are having issues from the SMTP task or if the mail server is not allowing you to send the email