2017-08-29 1 views
-3

Ich versuche, Mail mit Dreamhome Credential mit Ruby auf Schienen zu senden.Mail senden Problem mit Dreamhost mit Ruby auf Schienen

Meine development.rb-Datei Mail-Einstellung wie folgt.

config.action_mailer.smtp_settings = { 
    address: "dreamhost.com", 
    port: 587, 
    domain: "www.dreamhost.com", 
    authentication: "plain", 
    enable_starttls_auto: true, 
    user_name: ENV['mailer'], 
    password: ENV['mailer_password'] 
} 

Mail ist nicht in der Lage Konfiguration mit oben E-Mail senden Ich erhalte Fehler wie Errno :: ECONNREFUSED (Connection refused für "dreamhost.com" Port 587).

Kann jemand mir für dieses Problem helfen?

+0

versteckt sein Was ist das Problem? Sie müssen mehr Details für jeden bereitstellen, der Ihnen hilft. –

+0

Ich bekomme kein genaues Problem. Ich habe die Anmeldedaten und die Domäneneinstellung in der Datei config/development.rb hinzugefügt. Ich bin mir nicht sicher, was ich in Adresse und Domäne hinzufügen muss, wenn ich E-Mails mit Dreamhost-Anmeldeinformationen sende. – Pooja

Antwort

0

Das ist mein Profil ich auf Dreamhost verwenden

config.action_mailer.perform_caching = false 

    # Ignore bad email addresses and do not raise email delivery errors. 
    # Set this to true and configure the email server for immediate delivery to raise delivery errors. 
    config.action_mailer.raise_delivery_errors = false 

    config.action_mailer.delivery_method = :smtp 
    config.action_mailer.default_options = {from: '[email protected]'} 
    config.action_mailer.smtp_settings = { 
    address:    'sub5.mail.dreamhost.com', 
    port:     587, 
    domain:    'mywebsite.org', 
    user_name:   '[email protected]', 
    password:    'mypassword', 
    authentication:  :login, 
    enable_starttls_auto: false } 

Beachten Sie, dass sub5.mail.dreamhost.com Domain-abhängige Adresse Ihres datacenter server ist.

Hinweis: Das Passwort sollte in ENV variables or other external file outside version control

Verwandte Themen