Nana Hemaa
asked on
mail--database
Trying to use databasemail to send an email to several people.
Declare @CustomerEmailAddressses varchar(max)
Email works when I assign a couple of email addresses to variable @CustomerEmailAddressses.
It fails when I assign more email addresses... get the error "string not in the form of email address".
Any inputs?
Declare @CustomerEmailAddressses varchar(max)
Email works when I assign a couple of email addresses to variable @CustomerEmailAddressses.
It fails when I assign more email addresses... get the error "string not in the form of email address".
Any inputs?
ASKER
yes
ASKER
I am not sure I understand your input. I know the syntax..everything works fine with about 10 email addresses seperated with semicolon..I need to add about 15 more email addresses and that fails. I am looking for inputs on why it fails with more addresses
I would check @CustomerEmailAddressses variable after adding all addresses but before executing of sp_send_dbmail procedure to be 100% sure that all adresses are correctly written.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, that was my point exactly. It is likely failing because you have additional characters in the string. Sorry I didn't make that clear. The reason I asked that way is typically the error is from adding an address like 'Joe Smith <joe.smith@somedomain.com> ' and ending up with some weird character.
ASKER
--Can you take the whole emails string and convert it to ASCII text?
--How can I do the conversion?
--How can I do the conversion?
For instance paste the whole string into a TXT file and make sure the type is truly ANSI not UNICODE or anything else when you save/close it then you can copy again the whole string from that file - not so pretty but it works..
http://msdn.microsoft.com/en-us/library/ms190307.aspx