3

i'm using rails 3.2.11 and use blue host as my email server for sent emails.

below is my configuration info in development.rb

   config.action_mailer.smtp_settings = {

    :address              => "box75112.bluehost.com",

    :port                 => "465",
    :domain               => "bluehost.com",

    :enable_starttls_auto => true,
    :authentication       => :login,
    :user_name            => "support@buddy.io",
    :password             => "93utitrpppJvZ,[#4rl4"

}

and these are my blue host info

      Mail Server Username: support+buddy.io
      Incoming Mail Server: mail.buddy.io
      Incoming Mail Server: (SSL) box75112.bluehost.com
      Outgoing Mail Server: mail.buddy.io (server requires authentication) port 26
      Outgoing Mail Server: (SSL) box75112.bluehost.com (server requires authentication) port 465

      Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
      Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS) 

but email is not sent out and also there is no error

can anyone please help?

Thanks

Kashiftufail
  • 10,815
  • 11
  • 45
  • 79

2 Answers2

3

I've had success using a non-encrypted connection to BlueHost SMTP server using ActionMailer:

config.action_mailer.smtp_settings = {
    address:              => "mail.buddy.io",
    port:                 => 26,
    enable_starttls_auto: => false,
    authentication:       => "plain",
    user_name:            => "support+buddy.io",
    password:             => "password"
}

Note the user_name is not the same as the email address. And the domain parameter is not needed.

leepowers
  • 37,828
  • 23
  • 98
  • 129
0

If still comes handy. You can use the ssl, try something like this:

 config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = { :host => 'example.com' }
  config.action_mailer.raise_delivery_errors = true
  # Send email in development mode?
  config.action_mailer.perform_deliveries = true

  config.action_mailer.smtp_settings = {
      address: "server.example.com",
      port: 465,
      enable_starttls_auto: true,
      ssl: true,
      domain: 'example.com',
      user_name: 'user@example.com',
      password: 'MyPassWorD',
      authentication: :plain
  }

Worked for me on Bluehost.

Dieglock
  • 169
  • 1
  • 16