The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Connecting SMTP to Rails 4

Discussion in 'E-mail Discussions' started by Joshua Zermeno, Sep 13, 2016.

  1. Joshua Zermeno

    Joshua Zermeno Registered

    Joined:
    Sep 13, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Toledo
    cPanel Access Level:
    Root Administrator
    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.

    Code:
      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:
    Code:
    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.
     
    #1 Joshua Zermeno, Sep 13, 2016
    Last edited by a moderator: Sep 13, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page