mailcatcher没有收到邮件

时间:2015-05-07 18:17:53

标签: ruby-on-rails mailcatcher

我正在使用mailcatcher和spree。 我在管理面板中的Mail Method Setting表单中输入了必要的项目,然后点击send test mail。我的域和主机设置为我的localserver ip,我的SMTP端口为1025。 我看到我的终端生成了一个电子邮件html,但是当我在1080端口转到我的邮件收发器时,什么都没有。我可以看到mailcatcher邮箱,但没有邮件。这封电子邮件将在哪里发送?

我跟着这个:

enter image description here [端子]

    CACHE (0.0ms)  SELECT  "spree_stores".* FROM "spree_stores" WHERE "spree_stores"."def
    ault" = 't'  ORDER BY "spree_stores"."id" ASC LIMIT 1                                  
      Rendered /usr/local/rvm/gems/ruby-2.2.1/gems/spree_core-3.0.0/app/views/spree/test_ma
    iler/test_email.html.erb within layouts/spree/base_mailer (0.5ms)                      
      CACHE (0.0ms)  SELECT  "spree_stores".* FROM "spree_stores" WHERE "spree_stores"."def
    ault" = 't'  ORDER BY "spree_stores"."id" ASC LIMIT 1                                  
      Rendered /usr/local/rvm/gems/ruby-2.2.1/gems/spree_core-3.0.0/app/views/spree/shared/
    _base_mailer_header.html.erb (34.1ms)                                                  
      Rendered /usr/local/rvm/gems/ruby-2.2.1/gems/spree_core-3.0.0/app/views/spree/shared/
    _base_mailer_footer.html.erb (0.3ms)                                                   
      Rendered /usr/local/rvm/gems/ruby-2.2.1/gems/spree_core-3.0.0/app/views/spree/test_ma
    iler/test_email.text.erb (0.6ms)                                                       

    Spree::TestMailer#test_email: processed outbound mail in 4236.8ms                      

    Sent mail to someemail@gmail.com (16.4ms)                                          
    Date: Fri, 08 May 2015 12:22:53 +0000                                                  
    To: someemail@gmail.com                                                            
    Message-ID: <554caa9d3aa6b_5925639ea8214ab@rails.mail>                                 
    Subject:  Test Mail                                                                    
    Mime-Version: 1.0                                                                      
    Content-Type: multipart/alternative;                                                   
     boundary="--==_mimepart_554caa9d3c07_5925639ea82133e";                                
     charset=UTF-8                                                                         
    Content-Transfer-Encoding: 7bit                                                        


    ----==_mimepart_554caa9d3c07_5925639ea82133e                                           
    Content-Type: text/plain;                                                              
     charset=UTF-8                                                                         
    Content-Transfer-Encoding: 7bit                                                        

    Congratulations!                                                                       
    ================                                                                       

    If you have received this email, then your email settings are correct.                 

    ----==_mimepart_554caa9d3c07_5925639ea82133e                                           
    Content-Type: text/html;                                                               
     charset=UTF-8                                                                         
    Content-Transfer-Encoding: 7bit                                                        

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                                             
    }                                                                                      
    //HTML Stuff

----==_mimepart_554caa9d3c07_5925639ea82133e--                                         

Redirected to http://192.168.0.10:3000/admin/mail_method/edit                          
Completed 302 Found in 5616ms (ActiveRecord: 1.7ms)                                    


Started GET "/admin/mail_method/edit" for 192.168.0.2 at 2015-05-08 12:22:54 +0000 

Processing by Spree::Admin::MailMethodsController#edit as HTML                         
  Spree::Preference Load (1.1ms)  SELECT  "spree_preferences".* FROM "spree_preferences
" WHERE "spree_preferences"."key" = $1 LIMIT 1  [["key", "spree/backend_configuration/l
ocale"]]
Spree::User Load (0.4ms)  SELECT  "spree_users".* FROM "spree_users" WHERE "spree_use
rs"."deleted_at" IS NULL AND "spree_users"."id" = $1  ORDER BY "spree_users"."id" ASC L
IMIT 1  [["id", 2]]                                                                    
   (0.5ms)  SELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree
_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 A
ND "spree_roles"."name" = $2  [["user_id", 2], ["name", "admin"]]                      
  Rendered /usr/local/rvm/gems/ruby-2.2.1/bundler/gems/spree_mail_settings-9c0ffd29dc86
/app/views/spree/admin/mail_methods/_form.html.erb (29.4ms)                            
  Rendered /usr/local/rvm/gems/ruby-2.2.1/bundler/gems/spree_mail_settings-9c0ffd29dc86
/app/views/spree/admin/mail_methods/edit.html.erb within spree/layouts/admin (223.6ms) 

污损:[警告]否:为'mail_settings_admin_configurations_menu'定义的原始版本,y 你应该改变它的定义,包括:
 :original =&gt; '5a3198a5d42be047154e101c69588274d1125af6'

1 个答案:

答案 0 :(得分:1)

可能与mailcatcher repository上报告的此问题有关。

要解决它在前台模式下运行:

mailcatcher --foreground

mailcatcher -f

另外,请务必更新您的邮件收发器版本。