Post by v1har » Fri Jul 21, 2017 3:23 pm

Hi all,

I use opencart 2.0.2.0 and when I send email from code (using code below), have to wait 20-25 seconds to sending email. So it takes a long time...
Any idea, how can I speed up and what causes this?

$mail = new Mail();
$mail ->setTo($from);
$mail ->setFrom($to);
$mail ->setSender($sender);
$mail ->setSubject($subject);
$mail ->setHtml($html);
$mail ->send();

Side note: In the Admin->System->Settings->Mail "Mail protocol" is "Mail" (I don't know if its important)

Thanks for help :)

Newbie

Posts

Joined
Mon May 16, 2016 8:11 pm

Post by inactiveaccount9912 » Fri Jul 21, 2017 3:31 pm

Your server is actually sending the emails, so changing the code will not change anything.

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by paulfeakins » Fri Jul 21, 2017 5:53 pm

As above, this is probably one for your web host.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by v1har » Mon Jul 24, 2017 9:50 pm

Problem solved. Protocol has to be SMTP :)

Newbie

Posts

Joined
Mon May 16, 2016 8:11 pm
Who is online

Users browsing this forum: No registered users and 11 guests