2012-07-27 2 views
-1

메일을 보내려고합니다. 내가 잘못 뭐하는 거지메일 설정이 레일에서 작동하지 않습니다. 3

config.action_mailer.default_url_options = { :host => 'localhost:3000' } 
config.action_mailer.smtp_settings = { 
    address: "127.0.0.1", 
    port: 25, 
    domain: "mydomain.com", 
    authentication: "plain", 
    #enable_starttls_auto: true, 
    user_name: ENV["[email protected] "], 
    password: ENV[""] 
    } 

: 여기 내 development.rb 설정입니다?

답변

1

ENV은 환경 변수를 의미합니다. [email protected]이라는 환경 변수가 있다고 생각하지 않습니다. 다음과 같이 대신 시도하십시오.

config.action_mailer.default_url_options = { :host => 'localhost:3000' } 
config.action_mailer.smtp_settings = { 
    address: "127.0.0.1", 
    port: 25, 
    domain: "mydomain.com", 
    authentication: "plain", 
    # enable_starttls_auto: true, 
    user_name: "[email protected]", 
    password: "" 
} 
+0

mail.it에 대한 권한 확인을 사용하고 있습니까? 어떤 생각? – regmiprem

+0

무엇이 작동하지 않습니까 ?? 오류가 있습니까? 127.0.0.1에서 메일 서버를 실행하고 있습니까? 사용자 이름이 맞습니까? 비밀번호가 필요하지 않습니까? – Mischa

+0

이메일을 보내지 않습니다. – regmiprem

관련 문제