Post by sabina » Tue Jun 05, 2012 7:24 pm

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?

Newbie

Posts

Joined
Tue Jun 05, 2012 6:24 pm

Post by Avvici » Sat Jun 09, 2012 2:16 pm

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
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by sabina » Tue Jun 12, 2012 3:23 am

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.

Newbie

Posts

Joined
Tue Jun 05, 2012 6:24 pm

Post by Avvici » Tue Jun 12, 2012 5:15 am

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
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC
Who is online

Users browsing this forum: No registered users and 9 guests