Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Send Mail Task works perfectly within BIDS but does not work in SQL Agent Job.


Send Mail Task works perfectly within BIDS but does not work in SQL Agent Job.

Author
Message
Raj_11
Raj_11
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 139
Hi,
I have a SSIS Package with a Send Mail Task in it. This works perfectly within BIDS...I can get the desired email. However when I put this SSIS package in a SQL Agent Job, the Send Mail Tasks does not work.

I am getting the below error :

An error occurred with the following error message: "Failure sending mail. System.Net.WebException: Unable to connect to the remote server System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 10.38.58.184:25"

What needs to be done to get my Send Mail Tasks to send the desired emails while executing as a SQL Agent Job?

Any and All help will be greatly appreciated...Thanks
Daniel Bowlin
Daniel Bowlin
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2950 Visits: 2629
If you set up a proxy with the appropriate mail server access and ran the SSIS package under the security context of the proxy that should work. You should be able to find a number of articles on setting up a Proxy for the SQL Agent to use when running SSIS packages.
Elliott Whitlow
Elliott Whitlow
SSCertifiable
SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)SSCertifiable (6.2K reputation)

Group: General Forum Members
Points: 6208 Visits: 5314
Are you running the package in BIDS on the same machine that you are trying to run it on as a job.

I have seen local firewall differences as well as access control rules on the destination side that could yield this.

CEWII
Raj_11
Raj_11
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 139
Hi,
Thank U Daniel and Elliott for your valuable input and suggestions.
This issue got reseloved. There were some permission issue with the Sql Server User Login.
So, after gievn permission by admin team this issue got resolved.

Regards,
Pinku Raj
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search