dbTalk Databases Forums  

SSIS Send Mail Task Format

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS Send Mail Task Format in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris
 
Posts: n/a

Default SSIS Send Mail Task Format - 07-29-2008 , 12:36 PM






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.

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM






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:

Quote:
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.


Reply With Quote
  #3  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #4  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #5  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #6  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #7  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #8  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #9  
Old   
Todd C
 
Posts: n/a

Default RE: SSIS Send Mail Task Format - 07-29-2008 , 01:05 PM



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:

Quote:
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.


Reply With Quote
  #10  
Old   
Chris
 
Posts: n/a

Default Re: SSIS Send Mail Task Format - 07-30-2008 , 08:25 AM



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?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.