I’m configuring SQL Server Database Mail – always a fun task – and am getting an error message from the mail server, which I can see in the Database Mail Log from Log File Viewer and I can see by querying
msdb.dbo.sysmail_faileditems. However, the server response is clearly longer than
msdb.dbo.sysmail_faileditems.description column allows. Is there any way to see the full server response?
Here’s an example description (I’ve edited the IP address but it shows my server’s external IP address):
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2021-10-13T11:40:56). Exception Message: Cannot send mails to mail server. (Mailbox unavailable. The server response was: 5.7.1 Invalid credentials for relay [126.96.36.199]. The IP address you’ve). )
In this case I’m using Gmail’s SMTP Relay with allowed IP Addresses. I’d like to know what the rest of the message is. I’ve configured a different server to successfully use the same account and smtp relay server, so it’s probably an IP config problem.