EXEC msdb.dbo.sp_send_dbmail  
    @profile_name = 'default',  
    @recipients = 'me@test.com',  
    @body = 'Test',  
    @subject = 'Test' ;  

Error:

Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2020-07-23T17:27:13). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Unable to relay).
)

Fix:

Make sure the SQL Server Mail Account and Profile are setup correctly.

Last modified: July 24, 2020

Author

Comments

Write a Reply or Comment