Post by aq_mishu » Fri Jun 07, 2019 11:23 pm

Guys, newbie here... using several modules and extensions. Significants are below:
  1. pdfInvoicePro
  • phone-and-email-verified-account-version-2.0.1
  • proemailtemplatev1.8.3
and standard OC mail and webkul's hotel reservation module.
Everything is fine, when using phpmailer and I'm fully happy with it. But my mail server is not properly supporting TLS. It advertises and then for some unknown reason (probably certificate issue) it does not work properly. I can not turn off that TLS in my mail server. So all I can do is i can "skip" that opportunistic TLS in phpmailer. Now question is, how??????

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by rpmb » Fri Jun 07, 2019 11:35 pm

Surely your web host should resolve your certificate issue.

opencart 3.0.2.0


User avatar
New member

Posts

Joined
Wed Jun 30, 2010 9:13 pm
Location - Cornwall

Post by aq_mishu » Sat Jun 08, 2019 12:12 am

no way... coz that's a private server too... managed by us... but we are unable to resolve the certificate issue for now.

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by aq_mishu » Sat Jun 08, 2019 1:08 am

Tell me where I'm wrong...

Code: Select all

foreach ($emails as $email) {
						if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
							$mail = new Mail($this->config->get('config_mail_engine'));
							$mail->parameter = $this->config->get('config_mail_parameter');
							$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
							$mail->smtp_username = $this->config->get('config_mail_smtp_username');
							$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
							$mail->smtp_port = $this->config->get('config_mail_smtp_port');
							$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

							$mail->setTo($email);
							$mail->setFrom($store_email);
							$mail->setSender(html_entity_decode($store_name, ENT_QUOTES, 'UTF-8'));
							$mail->setSubject(html_entity_decode($this->request->post['subject'], ENT_QUOTES, 'UTF-8'));
							$mail->setHtml($message);

							[b]$mail->SMTPSecure = false;
							$mail->SMTPAutoTLS = false;[/b]

							$mail->send();
						}
					}
it is done in admin/controller/marketing/contact.php and still it's the same TLS error...

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by thekrotek » Sat Jun 08, 2019 2:05 am

aq_mishu wrote:
Sat Jun 08, 2019 1:08 am
it is done in admin/controller/marketing/contact.php and still it's the same TLS error...
And we all should somehow guess which "same TLS error" you're talking about, right?

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by aq_mishu » Sat Jun 08, 2019 5:09 am

not at all... here is the thing:
I have a mail server that advertise about TLS. (Please dont ask me to solve the mail server issue as that's not possible at this very moment).
It allows client (opencart) to conenct to port 25, and opencart says STARTTLS. After that, server just drops the connection. I tried with same server setup (in a different machine with same config, say clone) for mail and just disabling TLS and that worked like charm. So it's the same old "oppurtunistic TLS" of phpmailer i believe... and hence looking for a solution.

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by thekrotek » Sat Jun 08, 2019 5:16 am

Looks like there's a time to hire a server admin, not ask for support on forums, where mostly coders are present. This is considering your previous reply regarding the server managed by yourself.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by letxobnav » Sat Jun 08, 2019 6:03 am

what is your smtp hostname?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by aq_mishu » Sat Jun 08, 2019 7:57 am

First of all, dafinitely there is a reason for which i can not work on the mail server... i know i can get some certificates and can resolve it... but not this time as there are complexity on my end in this certificate topic.

Ok, so that's a good question, SMTP hostname... it's given perfectly... mail.mydomain.com

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by letxobnav » Sat Jun 08, 2019 9:00 am

are you sure you are using the PHPMailer class and not the default Mail class with smtp sub class?
those do not have variables like:

$mail->SMTPSecure = false;
$mail->SMTPAutoTLS = false;

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by aq_mishu » Sat Jun 08, 2019 9:31 am

aq_mishu wrote:
Sat Jun 08, 2019 1:08 am
Tell me where I'm wrong...

Code: Select all

foreach ($emails as $email) {
						if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
							$mail = new Mail($this->config->get('config_mail_engine'));
							$mail->parameter = $this->config->get('config_mail_parameter');
							$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
							$mail->smtp_username = $this->config->get('config_mail_smtp_username');
							$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
							$mail->smtp_port = $this->config->get('config_mail_smtp_port');
							$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

							$mail->setTo($email);
							$mail->setFrom($store_email);
							$mail->setSender(html_entity_decode($store_name, ENT_QUOTES, 'UTF-8'));
							$mail->setSubject(html_entity_decode($this->request->post['subject'], ENT_QUOTES, 'UTF-8'));
							$mail->setHtml($message);

							[b]$mail->SMTPSecure = false;
							$mail->SMTPAutoTLS = false;[/b]

							$mail->send();
						}
					}
it is done in admin/controller/marketing/contact.php and still it's the same TLS error...
But yes! your point is legit... I'm using SMTP...
https://drive.google.com/open?id=1t37cB ... 8c0KqApBqd is the screenshot. However, I have installed phpmailer too, from pdf-invoice-pro module

Newbie

Posts

Joined
Wed Sep 09, 2015 3:25 pm

Post by letxobnav » Sat Jun 08, 2019 9:37 am

yes, default OC mail class also supports smtp via a separate class but not the SMTPSecure nor SMTPAutoTLS switches.
you may have installed PHPMailer but are you actually using it?

this:

Code: Select all

$mail = new Mail($this->config->get('config_mail_engine'));
does not look like PHPMailer class initiation, it looks like default OC mail class initiation.

maybe add:

Code: Select all

$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
and make sure.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Mon Jun 10, 2019 7:37 pm

thekrotek wrote:
Sat Jun 08, 2019 5:16 am
Looks like there's a time to hire a server admin, not ask for support on forums, where mostly coders are present. This is considering your previous reply regarding the server managed by yourself.
I agree - if you are not an experienced Linux Sysadmin DO NOT use hosting that is not fully managed.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 12 guests