They were using the Send Mail Task and it worked fine on local
machines but when it got pushed to our development environment, it
would fail with "The parameter 'address' cannot be an empty string.
Parameter name: address"
The difference between the two environments was the configured
parameters. Locally it was developer@domain.com, in production it
will look like "distributionGroup1@domain.com;
distributionGroup2@domain.com" For the Dev configuration, they
sheared off the distributionGroup2@domain.com but left the trailing
semicolon intact. When the Send Mail Task fires, I assume it's doing
something as simple as toAddressLine.Split(';') to generate the list
of addresses from the input line. That kicks back an array with two
rows of data and then boom, no more execution.
So, a simple problem with a simple solution but it may save someone a
few minutes of debugging by seeing this post.
8 comments:
Many thanks. I just hit this issue and suspect it would have taken me a load of time to spot this issue. I had trailing semi-colon on cc line and sure enough removing that solved problem. If you are ever in London - I owe you a beer!
And our thanks as well, not a minute spent floundering.
This fixed my problem, thank you so much!!!
Thank you very much. Your post helped has been very helpful.
Simple but effective solution. Thank you. This helped a lot.
Eight years later and this blog post is still helping. Thanks!
From my side also a big thank you!
It does seem like a simple issue that MS can fix within the task, though.
thank you so much! you saved me several hours of pain
Post a Comment