Post by robsechardware » Wed Feb 06, 2013 9:47 pm

lloydmedley wrote:
arek wrote:maybe this will help. After spending 2 hours of looking for the solution I found that trick (i have 1.5.3.1 ver) http://code.google.com/p/opencart/issues/detail?id=964
and that solved the problem :)
I was so hopeful this would work.. but no! :(

I'm running Version 1.5.4 and no messages will send at all to anyone. But I did a php mail test and that worked. Must be something wrong with OpenCart? Please help me someone!
I have the exact same problem, version 1.5.4 - I receive no alert emails nor does the customer receive any emails. If i configure SMTP I can receive emails from the contact form and I can send PHP test scripts which also work.

Having been in touch with my hosts (who I have another opencart 1.5.2.1 which works perfectly with) they claim it is an opencart file problem somewhere along the line as the PHP script works etc...

Is this exclusively a 1.5.4 issue? Has anyone resolved this problem on 1.5.4?

Any help would be greatly appreciated...


Posts

Joined
Wed Aug 29, 2012 9:28 pm

Post by lloydmedley » Wed Feb 06, 2013 11:19 pm

I moved hosts, my hosts server was being blocked by the customers email providers so there wasn't really any other choice for me. Hope this helps

If I forgot to mention: it's OpenCart Vv1.5.6


New member

Posts

Joined
Tue Mar 29, 2011 11:18 pm

Post by eurekasprings » Tue Feb 19, 2013 6:39 am

I have been trying to get my email to work for about 4 days now. I have tried smtp, and mail, and I can not send a email from the contact form. I do however get an email when an order is placed. I talked with my host, and they replied with this email,
"Your form is attempting to send mail with the sender being set to the email address that is entered in on the form instead of your own email address."

I ran the php script to check the php function, and I got this
<b>Parse error</b>: syntax error, unexpected '<' in <b>[...][...]</b> on line <b>1</b><br

I don't know anything about php so I hope I ran the test correctly.

If anyone can help me I really need it. My last hope was my host, but now they said tuff luck.

I am running version 1.5.4
This is a clean install, and I am using the sellya template.
My URL: is www.eurekaspringsorganics.com

Thanks for the help!!!!!

New member

Posts

Joined
Sun Feb 17, 2013 4:43 am

Post by surajmundada » Fri Mar 08, 2013 5:17 am

I am facing same issue with OC 1.5.4.1 + php-5.4.4-Win32-VC9-x86 + Apache 2.2.22

I tried all things mentioned in this thread chain till now. My test scripts for simple php mail also don't work. Both to and from are gmail accounts and SMTP is smtp.gmail.com, port 587

Code: Select all

  $from = "surajmundada@gmail.com"; 
  $to = "kabra.madhavi@gmail.com"; 
  $subject = "Subject"; 
  $body = "TEST Email from: $from"; 

  if (mail ($to, $subject, $body, $from)) { 
    echo "MAIL - OK"; 
  } else { 
    echo "MAIL FAILED"; 
  } 
 
It gives error " mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first"

My mail settings on "OC > admin > Settings > Mail" looks like below:

Code: Select all

Mail Protocol: Mail
Mail Parameters: -fsurajmundada@gmail.com
SMTP Host: smtp.gmail.com
SMTP Username: surajmundada@gmail.com
SMTP Port: 587
SMTP Timeout: 5
I tried with all blank setting as well with only Mail Protocol, SMTP port and SMTP Timeout set with default values. But no success.

Code to send mail in my controller:

Code: Select all

     $mail = new Mail();
			$mail->protocol = $this->config->get('config_mail_protocol');
			$mail->parameter = $this->config->get('config_mail_parameter');
			$mail->hostname = $this->config->get('config_smtp_host');
			$mail->username = $this->config->get('config_smtp_username');
			$mail->password = $this->config->get('config_smtp_password');
			$mail->port = $this->config->get('config_smtp_port');
			$mail->timeout = $this->config->get('config_smtp_timeout');				
			$mail->setTo('surajmundada@yahoo.com');
			$mail->setFrom($this->config->get('config_email'));
			$mail->setSender($this->config->get('config_name'));
			$mail->setSubject(html_entity_decode('Retailer addition alert', ENT_QUOTES, 'UTF-8'));
			$mail->setText(html_entity_decode('New retailer added. Please check and approve', ENT_QUOTES, 'UTF-8'));
			$mail->send();
My php.ini settings are as below:

Code: Select all

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 587

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = surajmundada@gmail.com
I have openssl enabled in PHP (confirmed from phpinfo())

Any help to solve the issue would be appreciated.

Regards,
Suraj

Newbie

Posts

Joined
Tue Mar 05, 2013 10:51 pm

Post by surajmundada » Fri Mar 08, 2013 2:16 pm

Any ideas?

I desperately need my email to work

Newbie

Posts

Joined
Tue Mar 05, 2013 10:51 pm

User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by beattie » Thu Mar 28, 2013 8:33 am

Try replacing catalog/model/checkout/order.php with the original file. This solved my problem, I wasn't receiving order email notifications either. Remember to keep a backup copy of the order.php before you replace it!

New member

Posts

Joined
Tue May 22, 2012 11:33 am
Location - Australia

Post by parkookk » Mon Apr 29, 2013 7:25 pm

Well, I got the same problem with four of my OC 1.5.4.1!

From contact us page it shows that email has been sent but really no email has been sent to either buyer/owner.
So I installed OC 1.5.4.1 on a new domain with new database on parkook.co.uk, all the installation goes fine with no error whatsoever however contact us page has the same issue it shows that email has been sent but really no email has been sent to either buyer/owner.

So I thought how come when I installed OC 1.5.4.1 months ago it was all working but now this happening!

I have to mention all my other domains that do not have OC working fine. So I don't think my server or hosting has any problem.

I would appreciate if anyone could help!
Thanks

http://mediasos.co.uk/ - http://avtransfer.co.uk/


New member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by leelondon » Wed May 01, 2013 1:42 am

I had really big frustration with that..

The problem is really with your server... If you use mail option, than you have to setup mail server on your localhost. But the question is if your ISP supports 25 port for smtp. If not, than you got a problem.

Second option is to use gmail smtp or hotmail smtp. I tried and failed miserably.. I don't know why gmail doesn't work for me, but I googled whole internet, and found out that people randomly have problems with gmail.

I was searching and tried last resort.. smtp from my isp. I used smtp of my ISP and set option on SMTP, found out stuff works.

I called my ISP and they didn't know why gmail doesn't work, but they said to me that they closed 25 port to prevent spammers to send mail with your username.

TL,DR: Try your own isp smtp if you are working on localhost, if not you ask your hosting provider to fix things for you :)

PS: You can't disable authorization. PRevious versions of opencart didn't have authorization, which is funny, why didn't they add option to choose with or without authorization.

If you know coding you can edit mail class in opencart, if not, your only solution is to use your ISP smtp or move to hosting that has their mail server set up with smtp authorization(which is not hard to set up even for your current hosting).

Newbie

Posts

Joined
Fri Apr 26, 2013 6:17 pm

Post by butte » Wed May 01, 2013 2:48 am

Generally, there are varied reasons why cgi-driven, pl-driven, php-driven, or smto-driven mail won't go, so start with OC default of Mail, and if that does not work . . . at all, then reset to Smtp, but if that does not work. . . at all, then reset to OC default of Mail. You can gauge progress by hair or bottlecaps on floor.

If you ask your host support which plural smtp ports IT uses, you'll probably get the answer (none or the short list). You can gauge progress by asking sales instead.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by parkookk » Sat May 04, 2013 7:32 pm

parkookk wrote:Well, I got the same problem with four of my OC 1.5.4.1!

From contact us page it shows that email has been sent but really no email has been sent to either buyer/owner.
So I installed OC 1.5.4.1 on a new domain with new database on parkook.co.uk, all the installation goes fine with no error whatsoever however contact us page has the same issue it shows that email has been sent but really no email has been sent to either buyer/owner.

So I thought how come when I installed OC 1.5.4.1 months ago it was all working but now this happening!

I have to mention all my other domains that do not have OC working fine. So I don't think my server or hosting has any problem.

I would appreciate if anyone could help!
Thanks
Thank you guys for your replies however I have resolved the issue by trying this! See if it works for you too: :D

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;

http://mediasos.co.uk/ - http://avtransfer.co.uk/


New member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by nestones » Wed May 08, 2013 10:03 pm

I tried:
Reasons why your OC installation is not sending emails is because the "from" address is wrongfully set under your mail settings, by using the MAIL parameter -Fuser@mydomain.com those issues should be fixed.
And still not working. I don't know what to do. Contact form isn't working! Anyone could assist would be golden.

Newbie

Posts

Joined
Wed May 08, 2013 9:53 pm

Post by zawthureintun » Tue Feb 10, 2015 5:00 pm

Finally, here is my solution for email not working.
At system/library/mail.php, change to the following code:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->replyto . '>' . $this->newline;
At catalog/controller/information/contact.php, change to the following code:

Code: Select all

$mail = new Mail($this->config->get('config_mail'));
			$mail->setTo($this->config->get('config_email'));
			$mail->setFrom('username@yourdomain.com');
			$mail->setSender($this->request->post['name']);
			$mail->setReplyTo($this->request->post['email']);
Last edited by straightlight on Wed Aug 10, 2016 9:48 pm, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Tue Feb 10, 2015 4:56 pm

Post by dEdge » Mon Feb 16, 2015 4:17 am

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

Replace
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
with
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
The above solution by parkookk worked for me on 1.5.5.1. Thanks parkookk!

New member

Posts

Joined
Tue Mar 27, 2012 11:21 pm

Post by yeq30@ntlworld.com » Wed Apr 22, 2015 1:37 am

Needless to say, this did not work for me. I'm running out of time and patience. I've wasted hours and days on it. I'm just going to have to try another shopping cart. Sorry, but barring a miracle in the next 24 hours, I won't be recommending this software to anyone.


Posts

Joined
Sat Apr 18, 2015 10:36 pm

Post by jerdna » Fri May 22, 2015 11:38 pm

zawthureintun... you are genius... finale after one year it is working again. I even modified contact us page not to show form because i could not fixed it, but now it's working again.
;D
Brilliant

Newbie

Posts

Joined
Fri Nov 12, 2010 8:18 pm

Post by adiproject » Mon Jul 06, 2015 12:44 pm

did anyone know where to solved the same problem for 1.5.6.4 ?

User avatar
Newbie

Posts

Joined
Thu Feb 05, 2015 4:01 pm

Post by al3xandr1a » Tue Sep 29, 2015 9:51 pm

zawthureintun wrote:Finally, here is my solution for email not working.
At system/library/mail.php, change to the following code:

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->replyto . '>' . $this->newline;

At catalog/controller/information/contact.php, change to the following code:
$mail = new Mail($this->config->get('config_mail'));
$mail->setTo($this->config->get('config_email'));
$mail->setFrom('username@yourdomain.com');
$mail->setSender($this->request->post['name']);
$mail->setReplyTo($this->request->post['email']);
Is this also a fix for OC 1.5.4.1 ?

~al3xandr1a
Newbie / Student


User avatar
New member

Posts

Joined
Fri Jul 02, 2010 7:27 pm

Post by coucou » Thu Nov 05, 2015 4:15 pm

Remove second new line in system/library/mail.php on line 97, i.e. replace
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
with
$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline;
This solved my problem!!!!! Thank you

Newbie

Posts

Joined
Thu Nov 05, 2015 4:09 pm

Post by reynafabrics » Wed Jun 06, 2018 5:57 pm

zawthureintun wrote:
Tue Feb 10, 2015 5:00 pm
Finally, here is my solution for email not working.
At system/library/mail.php, change to the following code:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->from . '>' . $this->newline;
$header .= 'Reply-To: =?UTF-8?B?' . base64_encode($this->sender) . '?=' . ' <' . $this->replyto . '>' . $this->newline;
At catalog/controller/information/contact.php, change to the following code:

Code: Select all

$mail = new Mail($this->config->get('config_mail'));
			$mail->setTo($this->config->get('config_email'));
			$mail->setFrom('username@yourdomain.com');
			$mail->setSender($this->request->post['name']);
			$mail->setReplyTo($this->request->post['email']);
This code works for me in opencart 1.5.4.6. Like a charm!!

Newbie

Posts

Joined
Thu Sep 07, 2017 9:38 pm

Who is online

Users browsing this forum: No registered users and 32 guests