An error occurred while sending the e-mail to the customer



  • Whenever I update the order status and TB should send a email i get an error message " An error occurred while sending the e-mail to the customer"

    If i go into the test your email configuration and send a test email the email is sent and arrives at the test account ok, but no emails are being sent from the order statuses. I know it is not a problem with the email addresses as i created a test order and it still did not work sending the order statuses or when i click resend email.
    Nothing shows in the TB log so i don’t know what is causing the error.

    Help please



  • Check the server logs, it should tell you what the error is. I am betting it is template specific.



  • Ok an update to this problem, if i set email to use the php mail function the order status emails go through, but yet it i enable SMTP they don’t get sent and i get the error, But the test email does work on SMTP.

    I really want to be able to use SMTP emails though as emails sent through php mail get marked as SPAM so my customers won’t be able to see them.



  • Mail ones are hard to diagnose. There is something in some mail log telling why the mail is not sent though. It could be in the server error log or the server mail log. I would start with those.



  • My server is centos 7 and i have looked in mail and messages logs and don’t see any error message relating to this problem. I am stumped, it hard to understand why the test email works but order messages don’t only when SMTP is enabled.



  • Hi. I spent about 10 hours and 2 keyboard with same error. Finally, after 2 beers, pack of cigarettes and many hundred ugly words I found out that this error is caused due to empty mail template. Basically is needed only email subject. If this is empty then there’s always error and I can’t find any log for this. I just start playing with different things until i found this email template. Of course I can’t be sure that this is reason for every situation. My problem was with password recovery and empty header was for password_query template.



  • @led24ee make sense, thanks ☺ I’ve this problem too, I will check my site tomorrow.



  • Now I discover that when I try to send email as plain text then only shop logo is in email and nothing else. In HTML everything looks fine. Also there is module “Send to a Friend” and there is no CAPTCHA check neither for visitors or clients.



  • Can somebody tell where TB keeps email templates. Problem is that when I use EMPTY CACHE then some email subjects are lost. They’re in lang.php file (mails/language) and (themes/themename/mails/language) but TB can’t use them. That’s also the reason why some emails headers got lost. And when they’re lost then You get an error when trying to sent email.



  • When you’re in the backoffice (translations > email templates) and then click on “preview”, you can see the template path in the browser’s address-line.



  • I couldn’t find button like this. (TB1.0.4)



  • Hm, you’re right. For some reason, I had this memory, that you can preview an email in a separate window…

    Anyways: You can still right-click on the preview-window and search the code. There should be a div like this:
    <div class=“thumbnail email-html-frame” data-email-src="/mails/en/account.html">

    Yes, this sounds a little complicated.
    But what I’m saying is: If you want to be really, really sure where the source is, this is a way to find it.



  • I know where templates are for system mails and for module mails. Actually there is two place for them. One for default theme and one for Your currently used theme. I know also where are translated email headers (this file is lang.php). But when there’s translation process then TB can’t use headers even if they are in lang.php file. So some emails have header and some don’t. I can put manually something in header and this will work. I’m trying to find where this result is stored. So far I couldn’t find it. Problem is that when there’s no header then TB can’t use this email and You get error. This is really annoying because one of this email is for password recovery.



  • Holy f… I found what’s wrong. There was encoding problem. File lang.php was in ANSI, must be UTF-8. And I spent "@&/* time for this.



  • Now there’s also clear (at least for me) why there was error for sending plain text emails. Keywords are UTF-8 an Line Endings. Hope this will help somebody.


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.