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


Sending Email using Script Task


Sending Email using Script Task

Author
Message
kingdonshel
kingdonshel
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 216
I have a problem which seems quite common.
I would like to be able to send emails for error alerts from my SSIS package in the case of failure or at times I would like to send an email of a result from a database query. i am just trying to practice the technique. I am able to setup and send Database Mail but this is quite different from sending mail in a SSIS package.

I am using hotmail (smtp.live.com) as my host and port 587.

What I would like to do is to send emails using the SendMail task in SSIS to send emails when package fails or to send results sets either by attachments or in the body of the email or even with message as html. I really want to learn this technique and get it working.

The problem is I am not good with VB or C# and only just learnig, I have seen many examples on the internet but many are very complicated and difficult to recode for my situation.
All I am looking for is, for starters is a simple code to put in the script task (preferable C# but VB is fine as well)
that uses (smtp.live.com) port 587 to send out an email since the Send mail Task seems to lack these capabilities.

I do welcome screen shots examples of a package using this functionality if possible.
I am close to getting a solution working but many times the code on the internet is so complicated and does not show exctly where to put your username password or host name.
As you can tell I am sort of a Novice to C#, Vb and using the script task.

Your help would be greatly appreciated.
urmainpriority
urmainpriority
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 44
Can anyone help with this. I would like help with this as well.
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