SSIS Send Mail Task To Multiple Recipients
I'm using an SSIS "Send Mail Task" in an attempt to send to multiple recipients. In the TO line of the editor, I have specified the value as follows:
test@domain.com;test2@domain.com.
Only the last email address in the semicolon seperated list receives the mail.
SMTP Server is Microsoft Exchange
I'm running SSIS 2008
I have confirmed that all individual address work when set as the sole value in the task editor settings.
The MSDN documentation states that multiple addresses in TO line is supported but I have not been able to get it to work as intended. Can someone help with what I am missing or is this a bug.
Thanks
May 4th, 2011 12:10am
Hello,
It should be working fine, do you have "." DOT at the end of second email. If yes then remove that , You don't need Dot at the end.
Thanks
http://sqlage.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 4th, 2011 12:14am
Aamir - There is not dot, its only:
test@domain.com;test2@domain.com
I've tested this with multiple recipient email accounts and the result is always the same in wchich the Email Task is only sending to the last email address in the ";" seperate list. Are the special settings on the SMTP server or on the task properties that
are require for this to work?
Thanks
May 4th, 2011 5:17pm
Hello,
I had been using Send mail task in SSIS 2005 and SSIS 2008, Never encounter this issue.
Are you using some variable in TOLINE (Expressions), might be email address get over write with only one value.
Please hard code the Two Email Address in TO and try again.
Are you able to CC to multiple Address or It behave the same way like TO?
What is the length or your two address? how many characters?
Please share your findings
Thanks
http://sqlage.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 4th, 2011 6:33pm
I am running into a similar issue. I have defined a String package variable, EmailTo. The default value set in the package contains two email addresses, separated by a semicolon. When executed from Visual Studio, it runs without error.
When I run the package from a command line, and pass the argument, /SET \PACKAGE.VARIABLES[User::EmailTo].PROPERTIES[Value];"abc@xyz.com", it still works fine. However, as soon as I try to set the value
to multiple recipients, each separated by a semicolon, similar to the value that I hard-coded in the package, I get the following error:
Warning: 2011-09-20 10:45:01.91
Code: 0x800291C7
Source: Send Mail Task Send Mail Task
Description: The address in the "To" line is malformed. It is either missing the "@" symbol or is not valid.
End Warning
Progress: 2011-09-20 10:45:01.91
Source: Send Mail Task
The SendMail task is initiated.: 0% complete
End Progress
Error: 2011-09-20 10:45:01.93
Code: 0xC002F304
Source: Send Mail Task Send Mail Task
Description: An error occurred with the following error message: "The specified string is not in the form required for an e-mail address.".
End Error
September 20th, 2011 5:57pm
Try one with comma instead of semicolon, I am not sure which one works, did it some time back....My Blog |
Ask Me
Free Windows Admin Tool Kit Click here and download it now
September 20th, 2011 8:03pm
I tried replacing the semicolon with a comma. Received the same error. I still don't understand why the value passed in as a parameter behaves differently than the value entered in the variable definition in the package. I've been using
command line parameters for several years with no problems for numbers, dates, guids, etc.
September 20th, 2011 8:34pm
The correct syntax when using semi-colons (;) in set variable of DTExec (as far as I remember) is to surround the value in "" like
/SET \PACKAGE.VARIABLES[User::EmailTo].PROPERTIES[Value];""abc@xyz.com; joe.doe@joedoe.com"" or
/SET "\PACKAGE.VARIABLES[User::EmailTo].PROPERTIES[Value]";"""abc@xyz.com; joe.doe@joedoe.com""" (yes, triple quote)
Think is the ; after the [value] confuses DTExecArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 20th, 2011 10:26pm
I'm having the same problem too, I never tried it before as I was sending to a group e-mail, but happened to need it and YES it's not working!! the semicolon or the double-quotes wrapping the whole string! tried even multiple variations!!
December 11th, 2011 6:53am
I had this problem also, I am using SQL 2008 R2 This only occured when there is a space after the (;) semi-colon and before the next email. e.g. An.Email@Home.com; An.Other@Email.com if you remove the space so that it is one complete string it should work.
e.g. An.Email@Home.com;An.Other@Email.com Hope this helps.
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2012 9:53am
JPurkins,
I have almost similar situation, I understand and works what you mentioned on Jan20, 2012 but in my case multiple addresses are assigned to 1 group email address.
As soon I use group email address, "Send Mail Task" doesn't send an email. I have too many addresses so I don't want to have hard corded values and it also gives us ability for not to change package if one or more address gets disable to need to add one
or more.
Thanks.
May 18th, 2012 1:57pm
Hello,
The issue was the "group email id" which was provided by IT was kind of not right but right. I looked into this email addresses list in outlook/exchange address book for this group email id. There are tons of emails listed in "E-mail Addresses" tab. Somehow
all the addresses should work but I tried the email with domain name preceded to "group email id" and it worked.
BTW, I did not have to list/specify the email addresses with ; or , because the email id itself is a group email id on exchange server and it's server level group email id which has many members.
Thank You and apologize for late notification but hope this helps. In short, the answer was in Outlook/Exchange and not in SSIS control(s).
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2012 12:22pm