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?
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.
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.
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.
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.
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;)
Who is online
Users browsing this forum: No registered users and 4 guests