Quote:
quote:Originally posted by MarekR
Hi,
I have got the problem connected with Send Mail Task in SSIS.
The general idea was: sending email alert to different email users. I tried to use Foreach Loop task which loops through dataset (where the emails are stored) and assign different email addresses to SSIS package variable.
When I try to use this task inside Foreach Loop task I receive this error message: "Error: 0xC002F304 at Send Mail Task, Send Mail Task: An error occurred with the following error message: "The parameter 'address' cannot be an empty string."
The SSIS package has variable (string) which is binded with ToLine - property of Send Mail task (it was set up in Expressions tab of Send Mail task). This ToLine property should assign different emails during every loop of Foreach Loop task.
But unfortunately is seems to be not true, because Send Mail task does not allow to assign different values to ToLine property while is in Run-Time.
Have you discovered this quite bizzare Send Mail task behaviour before ??
I appreciate every help and suggestions.
Thanks,Marek
|
I don't think this is a bug in SSIS.
I had got the same problem once. For me the problem was with the value that was been assigned to ToLine-property in Mail task. I was supposed to send mail to multiple users whose mail ids was picked up by Database. Hence the value that was being assigned to ToLine-property was like this (
abc@xyz.com;def@abc.com;ghi@abc.com;) which made SSIS to throw the error. But the value to be assigned was supposed to look like (
abc@xyz.com;def@abc.com;ghi@abc.com)(Notice the semicolon missing after the end of last email id).
This solved the problem for me and now it takes the mail ids dynamically and sends the mail successfully.
Thanks,
Venu C.P.