spree-contrib / spree_mail_settings

Mail setting functionality extracted from Spree.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
28 stars 152 forks source link

Test emails works great but the real ones not #13

Closed mbajur closed 8 years ago

mbajur commented 9 years ago

Hello! I'm trying to use spree_mail_settings in my spree instance but i have one major problem with that - the test email is working as it should but the actual mails sent by the app during checkout/payment/shipment process are being sent properly. There are no any errors nor warnings, console log says that email has been sent but it's not (i can say that for 100% because it is not present in Mandrill's outbound page while the test ones are there).

I'm on master branch of spree and spree_mail_settings

Thanks in advance.

kurapatijayaram commented 9 years ago

Hi, Even test mail is not working fine for me :-(

igor-krupa commented 9 years ago

Same for me I'm getting an error in admin: Test Mail error: 550 Incorrect sender information in header. And the logs says that in header I have: From: spree@example.com no matter what is defined in "Send mail as" field

kurapatijayaram commented 9 years ago

Hi, For me it's working great. The only mistake I made was I didn't enabled email delivery . :-)

kurapatijayaram commented 9 years ago

In admin panel under mail settings section , you can see an check box option mentioning enable mail delivery enable that and send test mail ... It will work.

igor-krupa commented 9 years ago

Ok, so my problem was that mails_from should be defined in general spree settings, not in this gem settings. From now i have no idea what is "send mail as" option for (and does it even work?)

kurapatijayaram commented 9 years ago

Send mail_as is just from address for end user ... Just display logic it won't deliver through that mail id

igor-krupa commented 9 years ago

That was I thought but I'm pretty sure it is not working.

kurapatijayaram commented 9 years ago

But for me it's working fine ... Are u getting any error for that ??

kurapatijayaram commented 9 years ago

Hi @igorkrup Sorry for my previous reply. By default mail_as wont work, we need to modify base_mailer class in spree core. Add the following decorator in your app. It will work.

module Spree BaseMailer.class_eval do def from_address Spree::Config[:mails_from] || Spree::Store.current.mail_from_address end end end

aishmita-aggarwal commented 8 years ago

Persists on master. Looking into it.

aishmita-aggarwal commented 8 years ago

@mbajur Could you please share your settings for smtp?

mbajur commented 8 years ago

@aishmita-aggarwal sorry, i'm not able to do that right now. But, anyway, it seems that you resolved it.