2015-01-05 5 views
1

MailCatcher를 Rails와 함께 사용하고 있지만 작동하지 않습니다. 레일 콘솔에서 내가 그랬어 :MailCatcher가 전자 메일을 보내지 않습니다.

> Signup.confirm_email(User.second).deliver 

그리고 나는 것을 얻었다 : 1080 내 이메일에 :

Rendered signup/confirm_email.html.erb (2.2ms) 
Rendered signup/confirm_email.text.erb (0.6ms) 

Signup#confirm_email: processed outbound mail in 246.1ms 

Sent mail to [email protected] (7.0ms) 
Date: Mon, 05 Jan 2015 00:55:03 -0200 
From: [email protected] 
To: [email protected] 
Message-ID: <[email protected]> 
Subject: Confirm your email :) 
Mime-Version: 1.0 
Content-Type: multipart/alternative; 
boundary="--==_mimepart_54a9fd073f97f_18f1115f96821751"; 
charset=UTF-8 
Content-Transfer-Encoding: 7bit 

그러나 아무것도 로컬 호스트에 나타납니다. http://imgur.com/udxkhYj

그리고 코드 :

우편물/signup.rb

class Signup < ActionMailer::Base 
default from: '[email protected]' 

def confirm_email(user) 
    @user = user 

    @confirmation_link = root_url 

    mail({ 
     :to => user.email, 
     :bcc => ['sign ups <[email protected]>'], 
     :subject => I18n.t('signup.confirm_email.subject') 
    }) 
end 
end 

설정/환경/development.rb

Rails.application.configure do 
config.action_mailer.delivery_method = :smtp 
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 } 
end 
여기

내 파일 및 폴더의 인쇄입니다

어떻게해야합니까?

답변

1

글쎄, 문제는 이벤트 머신 1.0.4입니다. 1.0.3을 설치했는데 이제 작동합니다.

관련 문제