Post by stashdesign » Fri Nov 10, 2017 4:32 pm

I can't get the SMTP function to work. I have tried different mail accounts but have no luck.

Mail settings is:
Mail Engine: SMTP
Mail Parameters: Blank (Have tried -f email)
SMTP Hostname: ssl://smtp.domain.com
SMTP Username: mail@domain.com
SMTP Password: Password
SMTP Port: 465
SMTP Timeout: 5

Just getting error. If i change Mail Engine to mail i have no problems. Bu i want to use SMTP.
Please help out with this.

Newbie

Posts

Joined
Fri Oct 06, 2017 2:40 am

Post by cheing » Fri Nov 10, 2017 10:20 pm

try to remove your ssl: at hostname.
if your domain to access email is https://mail.domain.com
just put mail.domain.com

you can use the login information to access on webmail to make sure your login info is correct

New member

Posts

Joined
Fri Oct 28, 2011 2:37 pm
Location - Penang

Post by straightlight » Fri Nov 10, 2017 10:35 pm

Just getting error. If i change Mail Engine to mail i have no problems. Bu i want to use SMTP.
Please help out with this.
What are the error messages?

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pom » Sat Nov 11, 2017 1:40 am

It seems to be a common problem and probably due to server configurations.
I posted last week about my same problem... viewtopic.php?f=202&t=199341
I still haven't figure it out but using gmail as a temporary solution works perfectly.

pom
New member

Posts

Joined
Thu Oct 26, 2017 12:12 am

Post by stashdesign » Fri Nov 17, 2017 2:36 pm

Okay. I have tried all possible settings i can think of. I have allso verified smtp-settings. Now i have tried with a fresh installation on Ubuntu server with apache and PHP5, and also on ubuntu server with Nginx and PHP7. I can't get this to work. The "Mail" protocol will work, but not SMTP. I want to use SMTP.

The last error message i get in the servers "/var/log/nginx/error.log" is:

2017/11/17 07:35:01 [error] 27956#27956: *118 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: Error: DATA not accepted from server! in /var/www/prod/webshop.restaurantpartner.no/files/system/library/mail/smtp.php:328
Stack trace:
#0 /var/www/prod/webshop.restaurantpartner.no/files/system/library/mail.php(142): Mail\Smtp->send()
#1 /var/www/prod/webshop.restaurantpartner.no/files/catalog/controller/information/contact.php(25): Mail->send()
#2 /var/www/prod/webshop.restaurantpartner.no/storage/modification/system/engine/action.php(79): ControllerInformationContact->index()
#3 /var/www/prod/webshop.restaurantpartner.no/files/catalog/controller/startup/router.php(25): Action->execute(Object(Registry))
#4 /var/www/prod/webshop.restaurantpartner.no/storage/modification/system/engine/action.php(79): ControllerStartupRouter->index()
#5 /var/www/prod/webshop.restaurantpartner.no/files/system/engine/router.php(59): Action->execute(Object(Registry))
#6 /var/www/prod/webshop.restaurantpartner.no/files/system/engine/router.php(52): Router->execute(Object(Actio" while reading response header from upstream, client: 77.241.102.18, server: webshop.restaurantpartner.no, request: "POST /index.php?route=information/contact HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "webshop.restaurantpartner.no", referrer: "https://webshop.restaurantpartner.no/in ... on/contact"
2017/11/17 07:35:01 [error] 27956#27956: *125 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function imap_open() in /var/www/prod/office.kraftweb.no/application/libraries/peeker_connect.php:74

Newbie

Posts

Joined
Fri Oct 06, 2017 2:40 am

Post by straightlight » Fri Nov 17, 2017 8:29 pm

Followed are steps to install IMAP: https://stackoverflow.com/questions/965 ... pen-in-php . If you do not have access, contact host support to resolve this issue. An alternative way to set-up your email with Opencart would be with Gmail.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by stashdesign » Sun Nov 19, 2017 1:09 am

straightlight wrote:
Fri Nov 17, 2017 8:29 pm
Followed are steps to install IMAP: https://stackoverflow.com/questions/965 ... pen-in-php . If you do not have access, contact host support to resolve this issue. An alternative way to set-up your email with Opencart would be with Gmail.
I don't need IMAP to work, but the STMP. Also tried to setup SMTP with Gmail, but same error with that. Again, the mail protocol is working, but not the STMP in opencart. I don't want to use the Mail protocol in OpenCart (sending mail from server) but the SMTP.
I can see that i am not the only one that have problems with this, but i have not yet find a fix.

Newbie

Posts

Joined
Fri Oct 06, 2017 2:40 am

Post by straightlight » Sun Nov 19, 2017 1:14 am

In the mail parameters, by using SMTP, use the -f parameter without space before and after your entered parameter in the admin - > system - > settings - > edit settings - > mail tab. If the results are the same afterwards, try with Gmail. Otherwise, as mentioned above, contact host support to resolve this issue in order to know what are the right parameters for your email configuration.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by stashdesign » Sun Nov 19, 2017 2:23 am

I have finally fixed the problem. Now it works with gmail, zohomail and other tested mails.
I did not know that OpenCart require you to use same mail address in the store email address as in the smtp username address.

But if you want to reccive emails that was sent from the "Contact us" page in another email that you use as sender in SMTP you have to change som code.
The fix is working on my version 3.0.2.0.

----

Settings in your admin (System/Settings/Store)
Input the email address that you want to recieve email sent from "Contact Us" page.

Settings in (System/Settings/Mail)
Mail Engine: SMTP
Mail Parameters: Blank
SMTP Hostname: tls://smtp.zoho.com
SMTP Username: shop@exampledomain.com
SMTP Password: ************
SMTP Port: 587
SMTP Timeout: 10

Change in code (Your-OpenCart-Install-Root/system/library/mail/smtp.php)
Change line 24 and 32.

From:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?= <' . $this->from . '>' . PHP_EOL;
$header .= 'Return-Path: ' . $this->from . PHP_EOL;
To:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?= <' . $this->smtp_username . '>' . PHP_EOL;
$header .= 'Return-Path: ' . $this->smtp_username . PHP_EOL;

Newbie

Posts

Joined
Fri Oct 06, 2017 2:40 am

Post by straightlight » Sun Nov 19, 2017 3:06 am

Take note that the above suggestion may also be per-server specifics.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by victorj » Sun Nov 19, 2017 6:13 am

if on cpanel hosting change

SMTP Hostname: tls://smtp.zoho.com to
SMTP Hostname: mail.zoho.com

use smtp port 25

From website to mail server is a internal routing on your server so no need to use any tls protocol
normally in your hosting account you can find how to configure mail settings, but above should work

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Eigen productie en snelle levering.
https://123-deurrubbers.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by ohmashoes » Mon May 07, 2018 9:49 pm

Please help. I am still unable to receive email of new orders or registrations.
When I send via Contact Us, below is the error I am getting
OpenCart V3.0.2

Newbie

Posts

Joined
Mon Jul 09, 2012 12:43 am

Post by Wellington Queiroz » Mon Sep 03, 2018 3:43 pm

Hey, guys!

First of all I apologize for my english hahaha

http://www.mediafire.com/?d56yuyyku1udy

Please try the following:

Download the mail.php file that I left available. Open mail.php in a text editor, such as Sublime Text, for example. Change line 119 by email and store name. Save the mail.php file in the system / library folder. After that, your customers should already be receiving mail if the SMTP settings are correct. I use Amazon AWS SES and it works perfectly. The next step is to solve the problem of the contact form. To do this, we need to access the catalog / controller / information folder and replace the contact.php file with the new one available for download. Okay, that worked. Please leave your comment if it is working for you.

Thank you.


Posts

Joined
Sun Feb 25, 2018 3:29 am

Post by straightlight » Mon Sep 03, 2018 6:56 pm

Take note that the above changes is server-specific only as the reported issue may not be reflected on other servers.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by abcagency » Wed Dec 26, 2018 6:52 am

SMTP still not working and Nothing happens beacuse the above method is just redirecting smtp to mail

Newbie

Posts

Joined
Sat Dec 08, 2018 6:39 pm

Post by alexmorco » Sat Dec 29, 2018 6:41 pm

Configuring SMTP with email was quite difficult for me as well, you can check this guide to fix WordPress SMTP issue in email.

Newbie

Posts

Joined
Wed Jan 31, 2018 6:43 pm

Post by printingdwarfs » Fri Aug 16, 2019 7:55 pm

stashdesign wrote:
Sun Nov 19, 2017 2:23 am
I have finally fixed the problem. Now it works with gmail, zohomail and other tested mails.
I did not know that OpenCart require you to use same mail address in the store email address as in the smtp username address.

But if you want to reccive emails that was sent from the "Contact us" page in another email that you use as sender in SMTP you have to change som code.
The fix is working on my version 3.0.2.0.

----

Settings in your admin (System/Settings/Store)
Input the email address that you want to recieve email sent from "Contact Us" page.

Settings in (System/Settings/Mail)
Mail Engine: SMTP
Mail Parameters: Blank
SMTP Hostname: tls://smtp.zoho.com
SMTP Username: shop@exampledomain.com
SMTP Password: ************
SMTP Port: 587
SMTP Timeout: 10

Change in code (Your-OpenCart-Install-Root/system/library/mail/smtp.php)
Change line 24 and 32.

From:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?= <' . $this->from . '>' . PHP_EOL;
$header .= 'Return-Path: ' . $this->from . PHP_EOL;
To:

Code: Select all

$header .= 'From: =?UTF-8?B?' . base64_encode($this->sender) . '?= <' . $this->smtp_username . '>' . PHP_EOL;
$header .= 'Return-Path: ' . $this->smtp_username . PHP_EOL;
Thank you very much for sharing the fix. I've spent 3 days to find out that SMTP problem exists on my shop because my SMTP and Store emails were different.


Posts

Joined
Wed Jul 31, 2019 6:02 pm

Post by straightlight » Sat Aug 17, 2019 7:50 am

As of PHP v7.2.4, and above, Unicode languages with emails should support universal parsing methods compared as before. You could also try the Github version on the Opencart namespace in the Pull Request section the recent modified mail class regarding UTF-8 Unicode if the problem persists. This should definitely fixed the problem as it also works with Gmail without issues.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 27 guests