2011-04-13 4 views
0

전자 메일 주소를 만들려고합니다. 내 앱에 sendgrid 플러그인을 추가했다. 워드 프로세서는 당신이 필요로하는 모든 정보를 가지고, 당신이 필요로하는 hereHeroku actionmailer하는 방법

+0

무엇이 문제입니까? 너는 일하지 않은 것을합니까? 오류가 있습니까? –

+0

로그인을 시도하고 썬더 버드의 [email protected]에 이메일을 보내려 할 때 오류가 발생합니다. –

+0

sendgrids SMTP 서버를 사용해야합니까, 아니면 레일즈에 내장해야합니까? –

답변

0

는 당신이 메일 Exhange 호스트를 필요 [email protected] 같은 정기적 인 이메일을 작성합니다.

당신이 당신의 메일 exhange 호스트를 choicen되면 당신은

지금 당신은 메일과 같은 이메일을 사용하면 DNS 서버

을 그리고 VOLA에 설정에 MX 레코드를 필요 [email protected] 같은 이메일을 만들 수 있습니다 @ yourdomain.com

0

입니다 Sendgrid에 대한 설정을 변경 :

ActionMailer::Base.smtp_settings = { 
    :address  => "smtp.sendgrid.net", 
    :port   => "25", 
    :authentication => :plain, 
    :user_name  => ENV['SENDGRID_USERNAME'], 
    :password  => ENV['SENDGRID_PASSWORD'], 
    :domain   => ENV['SENDGRID_DOMAIN'] 
+0

[email protected] –

+0

과 같은 이메일 주소를 작성하려면 어떻게해야합니까? 조치 우편 발송자가 http://edgeguides.rubyonrails.org를 참조하십시오. /action_mailer_basics.html –

+0

명확히하기 위해 코드 스 니펫은 SMTP를 통해 애플리케이션을 SendGrid에 연결하는 데 필요한 설정입니다. 그런 다음 이메일을 보내려면 actionmailer를 사용해야합니다. –

1

- 여기

당신에게 Heroku에 함께 SendGrid를 사용하는 데 필요한 코드처럼 보이지 않는 내 application.rb

module Konkurranceportalen 
    class Application < Rails::Application 
    # Settings in config/environments/* take precedence over those specified here. 
    # Application configuration should go into files in config/initializers 
    # all .rb files in that directory are automatically loaded. 
    config.action_mailer.delivery_method = :smtp 
    ActionMailer::Base.smtp_settings = { 
    :address => "smtp.mydomain.com", 
    :port => 25, 
    :user_name => "[email protected]", 
    :password => "mypass", 
    :authentication => :login 
} 
end 
end 
+0

sendgrid 계정을 만들어야합니까? –

+0

[email protected]과 같은 이메일 주소를 작성하는 방법 –

+0

아니요, Heroku에서는 없습니다. 애플리케이션에 Sendgrid를 추가하기 만하면됩니다 :'heroku addons : sendgrid : free 추가 ' –