Wednesday, 18 August 2010

Sending an Email - Use Email ID which is not existed

In SharePoint, you can configure the outgoing Email by the user ID which is not a valid one or say not existed on SMTP server.
If you want to do same here is how you can go for it.

You can’t use SSIS “Send Mail task” for it as “Send Mail Task” use “Send As” not “Send”. “Send As” required a valid user ID (FROM in your Email). But if you send an email just by “Send” it just uses a SMTP server as connection and sends Email without verifying “FROM Email ID”
So to achieve the same you have to use SSIS Script task.

I found following link very useful for creating a SSIS Script task for Sending Email.

Many Thanks to them; you made this very easy guy.
Just customize it for following to use an unidentified user.

NewEmailName = New MailAddress("", "")
myHtmlMessage = New MailMessage(NewEmailName.Address.ToString(),"ReceiverEmailID", "ETL Execution Completed Successfully", "ETL Execution Completed Successfully")

And you are good to go. Nice and easy.
Now you don’t required a specific user id for sending SSIS notifications. 

No comments:

Post a Comment