Debugging %Net.SMTP Requests
I'm having an issue with sending SMTP requests from a specific Microsoft 365 account to Gmail accounts. We can use other Microsoft 365 accounts, but something about this one specific account sending to Gmail fails. The error we get is just telling us that sending to the user xxxxx@gmail.com failed. In order to troubleshoot that, I'm looking for more detail than that.
I see %Net.SMTP objects have a Debug property, but when I set it to 1, I can't see anything happening differently. What does that debug value do? And is there any way to see a more fully detailed SMTP response that I'm just overlooking?
What's the status returned by the Send() method of %Net.SMTP class?
I believe it should contain some info.
That also just gives the generic "Sending failed to all recipients" message.
Hi David.
Take a look in the %Net.SMTP:GetResponse method.
There is a commented out "#define SMTPTRACE" macro. Uncomment it, recompile %Net.SMTP
Reproduce the error, then check ^SmtpTrace global
Hopefully it should have some details on the interaction with the SMTP server.
Do this on the TEST instance, as each %Net.SMTP:Send clears out the debug global.
Thanks, that's exactly what I needed to see!