Connecting SMTP to Rails 4
I'm looking to use SMTP for email notifications in my Rails app, but I'm running into multiple problems. I've looked online, but most of the answers are for using googles SMTP servers.
My problems range from running into an "End of File" error when using the smtp credentials to having the pages load correctly without sending emails. I've tried many combinations of what I think I should be entering. I may have even tried a slightly wrong setup and would love some help knowing exactly what I should be putting and where.
Using CentOS and WHM + cPanel. I created the email and cPanel gives me this client info:
I can try certain methods and post error logs to whatever you want.
config.action_mailer.smtp_settings = {
address: 'mail.mysite.org',
port: 26,
domain: 'mysite.org',
user_name: 'name@mysite.org',
password: '*******',
authentication: :plain,
enable_starttls_auto: true
}
Using CentOS and WHM + cPanel. I created the email and cPanel gives me this client info:
Secure SSL/TLS Settings
(Recommended)
Username: name@mysite.org
Password: Use the email account"s password.
Incoming Server: hol.mysite.org
IMAP Port: 993
POP3 Port: 995
Outgoing Server: hol.mysite.org
SMTP Port: 465
Authentication is required for IMAP, POP3, and SMTP.
Non-SSL Settings
(NOT Recommended)
Username: name@mysite.org
Password: Use the email account"s password.
Incoming Server: mail.mysite.org
IMAP Port: 143
POP3 Port: 110
Outgoing Server: mail.mysite.org
SMTP Port: 26
Authentication is required for IMAP, POP3, and SMTP.
I can try certain methods and post error logs to whatever you want.
-
Hello, I recommend testing this with a simple PHP mailing script that utilizes SMTP authentication. Then, if it works as intended, you can begin to troubleshoot your custom Rails app. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment