Users are discussing the feasibility of using Gmail as an SMTP server for Discourse. JimmyX attempted to configure Gmail SMTP in app.yml but faced issues, despite following a guide suggesting it’s possible even with 2FA. riking warned that Gmail isn’t suitable for outgoing mail at scale, though JimmyX clarified it’s only for low-volume testing. sam cautioned that Google’s terms may prohibit this and recommended alternatives like SendGrid or MailCatcher for dev. clay referenced G Suite documentation suggesting business accounts might allow SMTP use, which sam advised against due to lack of diagnostics. codinghorror encouraged testing, and charleswalter confirmed successful use of G Suite (now Google Workspace) for Discourse, including email replies. clay welcomed this, seeing it as helpful for potential migrations. Later, peterobrien tried smtp-relay.gmail.com with a paid business Gmail account but failed, despite advice from DeanMarkTaylor to skip SMTP authentication. Ultimately, peterobrien switched to Mailgun’s free tier, which worked seamlessly. The consensus leans toward avoiding Gmail SMTP for production, though limited use with G Suite may be viable with proper setup.
Trying to get discourse up and running I used gmail for the SMTP mentoned in app.yml. A feature of gmail is allowing this according to this article. It doesn’t work. My settings are something like this (I changed my email and pw).
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: 'myemail@gmail.com'
## TODO: The domain name this Discourse instance will respond to
DISCOURSE_HOSTNAME: 'localhost'
## TODO: The mailserver this Discourse instance will use
DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: myemail@gmail.com
DISCOURSE_SMTP_PASSWORD: thepassword
DISCOURSE_SMTP_ENABLE_START_TLS: true
Pretty sure the terms and conditions of Google would disallow you from using GMail as an SMTP endpoint. You are probably risking freezing your account or something. Plenty of free options for an smtp service … https://sendgrid.com and for local dev you would just use mailcatcher.
@clay, we have used a google for work email account setup for discourse with minimal issues. our reply via email works smoothly. I see they just renamed g suite