Sending Email using Gmail


How i can use my gmail for sending email using meteor? i already tried mailgun and it is easy to integrate, but as of this day i want to use gmail instead of mailgun. and i already tried to search to google on how i can configure my gmail to work, but still no luck. any help?


It’s covered pretty well here. Just set the MAIL_URL environment variable with your gmail details:


and then use


Note: you might have to fiddle with your gmail settings to allow your account to be used as a smtp server.


but I’d recommend a transactional email service like mailgun (we use mandrill). It’s faster to call an API than to wait for the email to send. You get better deliverability–“inbox penetration”. Reports and metrics. It’s easier to see which messages were undelivered. With gmail you are limited to 100-200 sends per day when not using the web interface.

You can set it up with your own domain with mailgun:


I had trouble once with G Suite blocking a message I was trying to send to my customers. Because the email mentioned pricing and a “laptop” they blocked it because it triggered a lottery and prize scam filter they had setup. So my legitimate ecommerce emails were not being delivered to my own customers because google thought it was a scam. I quickly migrated by transactional emails away from G-Suite. It’s not an appropriate business-class service for transactional emails service in my opinion.


Even though you technically can use their SMPT server for sending emails, it might be not smart to do. They can (and will) block messages if more messages than a specific quota are sent, or any suspicious behaviour is noticed. So far I tried Mailgun, and it works ok.


As somewhat of an expert on email, I’ll second (or third) the ‘don’t use GMAIL as a server’ comments. In fact, don’t use any consumer email server to send transactional emails. They all have spam filters of one sort or another as well as rate limiters that will eventually bite you. Especially if you aren’t adding SPF and DMARC records to your email headers.

Mailgun is easy to set up and free for moderate usage. If you are sending more email than the free plan allows, using Gmail going to block your IP address and you won’t even be able to access your own account. The only problem I’ve had with mailgun, is that on the free plan they use a shared IP address to send from and some of those IP addresses are on various blacklists. If you complain, they will move you to a different shared IP which may or may not help, or you can subscribe to one of the paid plans that give you a private IP address. Mailgun also optionally supports Web callbacks for delivery and bounce notifications. I use the bounce callback to automatically keep my app’s email address database up to date.

Also note that if you are trying to connect to GMail or other SMTP server on port 25, there is a good chance that your local ISP will likely block the mail as their assumption is that you are some sort of spammer.