Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept SMTP server with no logins #1883

Closed
improvethings opened this issue Jan 12, 2016 · 4 comments
Closed

Accept SMTP server with no logins #1883

improvethings opened this issue Jan 12, 2016 · 4 comments

Comments

@improvethings
Copy link

I have postfix running on localhost port 25.

In Rocket.Chat /admin/SMTP I have localhost, port 25, no user or password and [email protected].
In /admin/users in the top right, if I click on the + symbol to add a user, it says "In order to send invitation emails you first must configure SMTP settings".

When I choose to send a test email, I get a popup saying, "Success! An email was sent to [email protected]" but an email never arrives. How do I debug this? Nothing seems to hit my postfix mail.log.

Also, what is the purpose of /mailer, there doesn't seem to be an option to save settings there.

@Sing-Li Sing-Li changed the title SMTP not working, can't invite users or get push notifications Help with SMTP config Jan 13, 2016
@bgomelsky
Copy link

Take a look at line 3 of packages/rocketchat-lib/server/startup/settingsOnLoadSMTP.coffee, it only sets process.env.MAIL_URL when host, username and password configurations are set. To fix it, try removing
and RocketChat.settings.get('SMTP_Username') and RocketChat.settings.get('SMTP_Password') from the if statement. Also change line 4 to something like this
process.env.MAIL_URL = "smtp://" + (if RocketChat.settings.get('SMTP_Username') and RocketChat.settings.get('SMTP_Password') then encodeURIComponent(RocketChat.settings.get('SMTP_Username')) + ':' + encodeURIComponent(RocketChat.settings.get('SMTP_Password')) + '@' else '') + encodeURIComponent(RocketChat.settings.get('SMTP_Host'))

@Sing-Li
Copy link
Member

Sing-Li commented Jan 13, 2016

@bgomelsky - thanks! @improvethings - or just add a username and password to your postfix if you don't want to change code.

@Sing-Li Sing-Li changed the title Help with SMTP config Accept SMTP server with no logins Jan 13, 2016
@Sing-Li
Copy link
Member

Sing-Li commented Jan 13, 2016

@fduraibi - pls submit PR

@fduraibi
Copy link
Contributor

PR #1904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants