Welcome to dbForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SSIS Send Mail Task Format

 
   Database Forums (Home) -> DTS RSS
Next:  Softclarity Builder  
Author Message
Chris

External


Since: Jul 29, 2008
Posts: 5



(Msg. 1) Posted: Tue Jul 29, 2008 10:36 am
Post subject: SSIS Send Mail Task Format
Archived from groups: microsoft>public>sqlserver>dts (more info?)

I am creating a SSIS package that will basically act as an aduit for
my profiles database. I have several querys that will run and will
dump the contents to flat files. Currently if there are records in
ANY of the flat files I send an email with all of the flat files
attached. (As a side note, I would like to send just the file that
has records. Since I have several files, a like is not recomened and
I am not sure how to acomplish that. Any ideas would be helpful).

Back to the main point. The body of the email I send out, has a count
of each of the flat files with a description next to it. As it is
now, the body is pretty much one line combined. I would like to make
the format look presentable and I am not sure how to go about it.
What would be the best way to format the email and keep the count a
part of it. Any help would be great.

Thank you,

Chris.

 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Todd C

External


Since: Nov 16, 2005
Posts: 106



(Msg. 2) Posted: Tue Jul 29, 2008 11:05 am
Post subject: RE: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello Chris:
You could build the email message using an Expression in the Send Mail Task.
Click the Expressions page, and add an expression for the property
"MessageSource".

The expression editor is a bit finnicky and you need to cast everything to
string to make it work. I have the following in an expression:

"The SSIS Package: [" + @[System::PackageName] + "] failed at " + (DT_STR,
50, 1252) @[System::ContainerStartTime] + ". The offending task was
[unknown]."

It will honor line-returns so:

"this is the first line
this is the second line"

should come out on two lines.

HTH
--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Chris" wrote:

> I am creating a SSIS package that will basically act as an aduit for
> my profiles database. I have several querys that will run and will
> dump the contents to flat files. Currently if there are records in
> ANY of the flat files I send an email with all of the flat files
> attached. (As a side note, I would like to send just the file that
> has records. Since I have several files, a like is not recomened and
> I am not sure how to acomplish that. Any ideas would be helpful).
>
> Back to the main point. The body of the email I send out, has a count
> of each of the flat files with a description next to it. As it is
> now, the body is pretty much one line combined. I would like to make
> the format look presentable and I am not sure how to go about it.
> What would be the best way to format the email and keep the count a
> part of it. Any help would be great.
>
> Thank you,
>
> Chris.
>

 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Chris

External


Since: Jul 29, 2008
Posts: 5



(Msg. 3) Posted: Wed Jul 30, 2008 6:25 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Todd,

Thank you for the response. That sounds good.

So I have another problem. I The count variable is in Int data type.
The expression will not let let that be added. Is there anyway around
this?
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Todd C

External


Since: Nov 16, 2005
Posts: 106



(Msg. 4) Posted: Wed Jul 30, 2008 6:43 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Chris:

You need to explicitly cast an Int32 type variable to string:

"message text here " +
(DT_STR, 50, 1252) @[User::<My Int32 Variable>] +
" more message text here"

--
Todd C

[If this response was helpful, please indicate by clicking the appropriate
answer at the bottom]


"Chris" wrote:

> Hi Todd,
>
> Thank you for the response. That sounds good.
>
> So I have another problem. I The count variable is in Int data type.
> The expression will not let let that be added. Is there anyway around
> this?
>
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Chris

External


Since: Jul 29, 2008
Posts: 5



(Msg. 5) Posted: Thu Jul 31, 2008 6:35 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you Todd,

I am going to try that today.
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Chris

External


Since: Jul 29, 2008
Posts: 5



(Msg. 6) Posted: Thu Jul 31, 2008 6:53 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

So you seem to know alot, so If you do not mind, I am going to try and
pick your brain.

How would you go about creating the audit that I am constructing.
Here is what I am trying to do. I would like to make this package
flexable. We are constantly finding new issues to aduit in our
profiles database. Basically, I do a select and export the results to
a flat file. I then attach the results in an email and throw a count
in the body. As of now, I have 3 aduits. I am trying to get it so
that the email only attaches files with results in it.

Since, we have new issues arise which will need new aduits and files
to grab, I would like to make this flexable so I do not have to
continue to change the package. As of now, i already have to add 2
more aduits.

How would you go about creating this?

Thank you again for your help,

Chris
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Todd C

External


Since: Nov 16, 2005
Posts: 106



(Msg. 7) Posted: Thu Jul 31, 2008 7:28 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Chris: Glad to help, but since this may take a lot of back-and-forth
discussion, we should probably take it off-line.

Fee free to contact me directly at tchittenden at wahlstrom d com.

Can you expound on this statement:
>We are constantly finding new issues to aduit in our
> profiles database.

--
Todd C


"Chris" wrote:

> So you seem to know alot, so If you do not mind, I am going to try and
> pick your brain.
>
> How would you go about creating the audit that I am constructing.
> Here is what I am trying to do. I would like to make this package
> flexable. We are constantly finding new issues to aduit in our
> profiles database. Basically, I do a select and export the results to
> a flat file. I then attach the results in an email and throw a count
> in the body. As of now, I have 3 aduits. I am trying to get it so
> that the email only attaches files with results in it.
>
> Since, we have new issues arise which will need new aduits and files
> to grab, I would like to make this flexable so I do not have to
> continue to change the package. As of now, i already have to add 2
> more aduits.
>
> How would you go about creating this?
>
> Thank you again for your help,
>
> Chris
>
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Chris

External


Since: Jul 29, 2008
Posts: 5



(Msg. 8) Posted: Thu Jul 31, 2008 2:26 pm
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I am trying to email you but it keeps getting returned. Is this your
address? toddc RemoveThis @discussions.microsoft.com Sorry to post it here.
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Todd C

External


Since: Nov 16, 2005
Posts: 106



(Msg. 9) Posted: Fri Aug 01, 2008 5:44 am
Post subject: Re: SSIS Send Mail Task Format [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Negative.

tchittenden at wahlstrom dot com
--
Todd C

"Chris" wrote:

> I am trying to email you but it keeps getting returned. Is this your
> address? toddc.RemoveThis@discussions.microsoft.com Sorry to post it here.
>
 >> Stay informed about: SSIS Send Mail Task Format 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Send Mail Task - How to configure Send Mail Task if we are using Domino server with Lotus notes as client? -- Thanks, ID

send mail task error - Hi, I've used a SendMail task in one of my SSIS package. Earlier it work fine. But now it fails with the below error [Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.". What is this error abo...

Send mail in HTML Format - How to send html email (formatted email) using the send mail task of SQL Server Integration Services. Any pointers will be very helpful. Thanks, Lalitha

DTS to send mail - Hi All: i have to write a DTS which has to run in the night check the values in a table and then get the email addresses from another table to send mail with some specific content.. Iam very much new to DTS. Anybody there to help me out...!! Shobana

SSIS FTP Task - Hello, Can I supply a batch of fiels to be downloaded to the FTP Task instead of configuring it 2 download a single file? Or Do I hv to loop around the FTP Task in order to download mutiple files?? Thanks in Advance, Sachin R. Chavan.
   Database Forums (Home) -> DTS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]