Page 2 of 2

Re: [SOLVED] Email not working - Mail is not sent

Posted: Tue Apr 30, 2013 1:15 am
by parkookk
Try this! See if it works:

Remove second new line in system/library/mail.php on line 97, i.e. replace

Code: Select all

$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
with

Code: Select all

$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;

Re: [SOLVED] Email not working - Mail is not sent

Posted: Sun Jul 14, 2013 1:01 pm
by naken
Hello,

I am wondering if someone can help me?

I have been having a similar problem with emails not working properly. Some of our customers are emailing us and complaining that they haven't received our registration emails, and I always reply with 'have you checked your junk mail?' Recently a lot of customers not receiving the emails say that it also isn't in their junk mail! So we tried the -fmail@domain.com thing.

We tried adding the -femail@domain.com which seemed to work but we have had a problem arise as a result. We have two emails when someone signs up, if they select 'yes' to our newsletter they receive a standard registration email with a coupon code, if they select 'no' to our newsletter they receive just the standard registration email with no code. This is something to do with the coding, but for some reason only the standard registration email is sent out when either option is selected. Thus, our customers are not receiving the code which is causing problems!!

PLEASE HELP!!

Re: [SOLVED] Email not working - Mail is not sent

Posted: Thu Aug 29, 2013 6:29 am
by magisterson
If anyone still have this problem here is my solution:
http://forum.opencart.com/viewtopic.php ... 34#p432734

I have 1and1 hosting and shop now works good.

Re: [SOLVED] Email not working - Mail is not sent

Posted: Sat Feb 15, 2014 2:59 am
by aberathne
Thanks, I also had the same problem. It resolved now. :)

Re: [SOLVED] Email not working - Mail is not sent

Posted: Mon Feb 17, 2014 6:49 am
by sogoodtaya
Ok..lets all assume the lotus position, and pause for meditation. As we clear the mind, we realize there must be a solution. I have found it...relax...and follow my directions.

This worked for me as follows:

1. Open the following folder in your text editor (Dreamweaver, etc): system/library/mail.php

2. Go to the following line of code:

Code: Select all

echo $header = 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;
3. Comment this line of code out like this:

Code: Select all

/*echo $header = 'From: ' . '=?UTF-8?B?' . base64_encode($this->sender) . '?=' . '<' . $this->from . '>' . $this->newline;*/
4. Add this line of code underneath it and save the file: $header = 'From: ' . $this->sender . ' <' . $this->from . '>' . $this->newline;

Now go to your OpenCart Admin sytem/settings/email. Set mail protocol to "mail". Enter into mail parameters field any email address you want (you do not need the -f). Now put the ACTUAL email you want to receive confirmations at in "Additional Email Alerts" box. DO NOT add -F in front of the email addreses. Try and use a Gmail account...I have confirmed these work the best.

Summary: For some reason, the "Mail Parameters" field does not work in OpenCart. But you can successfully receive order and new account notifications in the "Additional Email Alerts" box. You DO NOT need to add any SMTP information (just leave it blank).

I hope this helps...it is very frustrating...I know. Take a deep breath, do what I said above, and you will have a successful solution :)))

Re: [SOLVED] Email not working - Mail is not sent

Posted: Wed Jul 01, 2015 5:27 pm
by w-fa
Hi,
I did all above,but none of them solved my problem.What should I do?
Is there any one to help me?

Re: [SOLVED] Email not working - Mail is not sent

Posted: Mon Jul 06, 2015 12:15 pm
by adiproject
i have same problem to, does anyone know wheres we have sold this issue?

Re: [SOLVED] Email not working - Mail is not sent

Posted: Fri Feb 12, 2016 4:17 am
by oscarlab
Hi There,

I tried everything from the forum above, but my problem was still there.

First I wet to check the mail log in my CentOS server /var/log/maillog. and I found the followin log:

Code: Select all

postfix/sendmail[30318]: fatal: setrlimit: Permission denied
Then doing some research I fount that this is something related to SELinux not allowing my website to send email. So I disabled SELinux, but it didn't help. So I foud this guy Sufi Nawaz http://www.sufinawaz.com/selinux-apache-sendmail/

An I followed his steps like this:

1.Find out if your SELinux settings allow your Apache server to send email running this command:

Code: Select all

$ sestatus -b | grep -i sendmail
2. And I got this:

Code: Select all

httpd_can_sendmail off
logging_syslogd_can_sendmail off
3. Which means Appache was not allowed to send emails. Then running the following command you can switch that to "on"

Code: Select all

$ setsebool -P httpd_can_sendmail 1
Wait some seconds, and reboot. Fixed!