The user yacineSmartly is experiencing issues with sending emails through Gmail in their Discourse setup on Ubuntu Server 16.04. pfaffman advises that using Gmail as an SMTP server is against Gmail’s terms of service and is unsupported.
yacineSmartly mentions that they allowed less secure applications in their Gmail settings and it worked in another Node.js application. However, pfaffman reiterates that it’s a violation of Gmail’s terms of service and recommends using a different mail service, providing a link to the list of recommended services.
Canapin questions pfaffman’s statement about Gmail’s terms of service, but Stephen clarifies that the user is using a Gmail account, not GSuite, and therefore the terms of service do apply.
yacineSmartly tries using GSuite but still encounters issues. pfaffman provides a link to instructions on setting up email with GSuite, but yacineSmartly still experiences problems and decides to try Mailjet. However, emails are still not being received, even though Discourse reports that they have been sent.
MarcP advises against using Gmail or GSuite for transactional email and recommends Mailgun or other alternatives. Stephen clarifies that GSuite does allow email to be sent but has limitations. pfaffman agrees with MarcP and suggests checking the Mailjet logs for issues.
I’ve set up discourse on my private cloud in ubuntu server 16.04. All installed were fine.
I have a problem now when trying to test email part. I entered the correct informations but i don’t receive the emails. I used the same config in another nodejs application, and it works fine.
Where did I go wrong ?
I used the same config in nodejs app. I authorized using this kind of application in my account security and it works fine.
Is discourse not supported in gmail application even if i checked the less secure application in gmail configuration ? In this case, which config shoud i use ?
@Canapin the username listed above is @gmail.com, gsuite documentation doesn’t apply, gsuite is their paid service, so yes it’s in breach of their ToS.
We can’t help you break the very reasonable rules Google lays out, particularly when there are free and supportable alternatives.
Thank you for your response. I tried with Gsuite but it doesn’t work too. I did use an email adress added with Gsuite and allowed smtp to be used from external apps. The result is the same.
I think i will try sendGrid or something else that discourse handle.
I followed the same instructions in this link but i still have the same problem. So, i created a new account in mailjet. When i start now ./discourse-doctor it tells me that the email has been sent. But i still recieve nothing in my email box.i also add a new DNS config for mailjet to allow adress with my domain to be able to send email but still nothing has been sent, even if it tells that email was sent.
PS: my spam is empty.
In my opinion it’s just a no-go using Gmail OR Gsuite as transactional mail service for ANY website, including Discourse, it’s not what it’s meant for!
Try Mailgun (it’s even free for 10k emails a month!), or see this article for alternatives.
GSuite does allow email to be sent, hence the document linked above. Go over their limits though and the rest of your gsuite account can end up being limited.
One of the recommended mail providers is preferable, if you choose to use something else it’s on you to make it work.
Maybe not accurate, but no professional will advise to use Gmail or Gsuite to send transactional email. That’s why my opinion is that this is a no-go, ofcourse if TS wants to make it work, up to him!