Community Forums

Sending SMTP emails via opencart

Discuss integration with other scripts such as WordPress, Joomla, PHPBB, etc..

Sending SMTP emails via opencart

Postby sabina » Tue Jun 05, 2012 11:24 am

I am using SMTP, to send my emails, i have entered the details correctly on admin panel-> Settings-> Mail.
Host, username, password everything is correct, it sends an email also, but the only problem is the content of the email is not proper, its showing all html codes.
Can anyone help me to solve this issue?
sabina
 
Posts: 3
Joined: Tue Jun 05, 2012 10:24 am

Re: Sending SMTP emails via opencart

Postby avvici -arvixe- » Sat Jun 09, 2012 6:16 am

What is your version of Open Cart? That's not an SMTP problem. That sounds like a problem with how you are sending the mail. For example, if you don't send with correct headers, all html characters will show up.

Open cart can send mail two ways generally:

$mail->setHtml($html);
or
$mail->setText(html_entity_decode($text, ENT_QUOTES, 'UTF-8'));

The first way is where you use an actual TPL for the template. You CANNOT use line breaks like \n because they will show up. Instead you use <br/>

The second way you actually would use \n and <br> would show up.
User avatar
avvici -arvixe-
 
Posts: 4408
Joined: Tue Apr 05, 2011 4:09 am
Location: Charlotte, NC

Re: Sending SMTP emails via opencart

Postby sabina » Mon Jun 11, 2012 7:23 pm

Open Cart version is 1.4.0
if i use the Mail protocol to send my emails, i have no issues, only the problem comes when i change it to SMTP protocol, and then my email content is empty.
I have entered all the requird details correctly, host, username, passwrd, port etc.
What can be the issue? or i do i have to make some more changes in the code somwhere?
Please help me out.
sabina
 
Posts: 3
Joined: Tue Jun 05, 2012 10:24 am

Re: Sending SMTP emails via opencart

Postby avvici -arvixe- » Mon Jun 11, 2012 9:15 pm

Double check with your hosting provider that you are in fact entering the correct details. There isn't much support on here for SMTP besides the threads from people that had actually got it working well without bugs.. The list is small;)
User avatar
avvici -arvixe-
 
Posts: 4408
Joined: Tue Apr 05, 2011 4:09 am
Location: Charlotte, NC


Return to Integration

Who is online

Users browsing this forum: No registered users and 4 guests

Hosted by Arvixe Web Hosting