Hi all, I have an issue with GMail discarding mails sent to it by my Meteor application’s Email package. Other mail providers work just fine. So I’d like to log any error messages on the smtp level, on my production/staging server. How can I do that?
Gmail will discard all emails to it’s SMTP since the past 10 years. It’s notoriously difficult to get email to send via Gmail SMTP unless you are on Gsuite and even then you are limited to a very low limit of personal use - it’s around 30 to 100 emails a day. Depends on the recipients and variety of the emails. If they are auto-generated system notifications etc Google doesn’t allow this on their service so you have to use a email provider such as mailgun etc.
Or setup your own SMTP if you know how to read manuals and compile from source, which although was a pre-requisite when I begun computing and continued throughout the majority of my life sadly is not the case now due to cloud and SaaS services. Such is life.
I probably stated my problem insufficiently. I’m using an SMTP service other than gmail to send mail to gmail. I can send to other mail services recipients without problems, but gmail recipients never get to see the mails sent to them. So I’d like to analyze the logs on my part, to home in on the problem. But I don’t know how to log the error/warrning messages (if any) on my application server. I have full control over the application server.
Ohh you get blocked because you need spf dns records, Gmail and all major mail providers won’t allow emails sent from domains without spf and dkim because of spammers
Well, I can also send mails from their webmailer and they would arrive at the gmail recipients. So I figure, maybe there is something in the smtp logs that would give me a clue…
That will mean the sending domain of the webmailer will have spf / dkim enabled then and when you send from your domain the dns entries are not set so it bounces. If you check the logs it will say mail not delivered
Yeah, the error won’t be in your SMTP connection; it will be when the mail server you’re sending the message through attempts to deliver to Gmail. The logs would be on the mail server, not during the SMTP connection. And as @truedon says, it’s probably spf/dkim, or a missing reverse IP mapping, that’s their problem.
Right, some servers will show a error if you delve into the logs like ‘cannot route to recipient’ although the first port of call would be the reply to address, you should get a mail delivery failed sent to the inbox there