I got this error when I specified multiple email addresses in reply_to

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 (2014-08-19T12:54:35). Exception Message: Cannot send mails to mail server. (The specified string is not in the form required for an e-mail address.). )

here is the sql snippets

EXEC msdb..sp_send_dbmail             
@profile_name = 'Company',
@recipients = '[email protected]',
@subject = 'PO delivery dates confirmation',
@body = 'test',
@body_format = 'HTML',
@importance = 'Normal',
@reply_to = '[email protected];[email protected]'

I can't use distribution group because the reply_to is dynamic base on the query. what would be the work around for this?

  • 2
    You could look into handling mail with some other program outside of SQL Server, or using CC instead and hoping the recipient notices and replies all (no guarantee they'll obey the reply all in either case anyway). Commented Aug 19, 2014 at 20:11

3 Answers 3


@reply_to can only accept 1 email address. Its by design - see this connect.

The document reflects that as well.

[ @reply_to= ] 'reply_to' Is the value of the 'reply to address' of the email message. It accepts only one email address as a valid value. This is an optional parameter used to override the settings in the mail profile. This parameter is of type varchar(MAX). SMTP secuirty settings determine if these overrides are accepted. If no parameter is specified, the default is NULL.


Since @reply_to can only accept 1 email address, I would write a client-side email rule logged into the "reply to" email account. When an email with the subject arrives forward it to the secondary account.

Then I would write a comment in your SQL code saying how you handled the forwarding to the secondary account.


If you have to dynamically change the reply_to it seems like your going to have to wrap this sp_send_dbmail within a stored procedure and assign the single reply_to (based on some query) to a variable and use that vs. hardcoding the entries.

  • 1
    I think you missed the thrust of the problem - the OP wants sp_send_dbmail to accept multiple reply-to addresses in some cases, but it only accepts one. Commented Aug 19, 2014 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.