SSIS Error: Send email task error – Unable to relay for Masud_Ahmed@test.com

Things to consider:

 

Scenario

I had a SSIS package which included “Send Email Task”. I uploaded the SSIS package to SQL MSDB and ran as a SQL job and I was getting the following error message:

Message
Executed as user: SHELTER\SSIS_Admin. Microsoft (R) SQL Server Execute Package Utility Version 12.0.4100.1 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 20:30:01 Error: 2015-12-01 20:30:02.07 Code: 0xC002F304 Source: WFT START EMail Send Mail Task Description: An error occurred with the following error message: “Unable to send to all recipients. System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for Masud_Ahmed@shelter.org.uk”. End Error Error: 2015-12-01 20:30:02.07 Code: 0xC002F304 Source: Send Mail Task Send Mail Task Description: An error occurred with the following error message: “Mailbox unavailable. The server response was: 5.7.1 Unable to relay for Luke_came@shelter.org.uk”. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 20:30:01 Finished: 20:30:02 Elapsed: 0.812 seconds. The package execution failed. The step failed.

 

Solution

The SMTP Server is not set up properly. This is an error from the SMTP Server and not SSIS error.

Basically, on SMTPRELAY server IIS was already setup to work as a smtp relay server still it was not working because on smtp IIS there was an access list of which server can use the smtp service and my server was not on that list. After adding my server on IIS–>SMTP–>Right click properties–>Access tab–>Add–>Enter ip address of the our server; it has worked.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s