![]() |
ob_get_clean() doesn't work properly
Hi guys! For a newletter project I'm using ob_start() and ob_get_clean() for recording some HTML/CSS/PHP code, but the output is quite weird. When I buffer the following:
Code:
<html>Code:
#text h1{EDIT: ok, just after posting I found out there was an issue in the mail headers, so I partially fixed it. The problem now is: when the buffer output is being mailed, everything before the <body> tag is wiped. But only when it is mailed, when I view the output online, it's all good. Here is the script I use to send the mail: Code:
public function send($id) { |
It seems that is a problem with the email provider that you are receiving the email from. But I don't know much about how email are parsed by the email providers. It is a wild west. Have you tried sending test emails to different accounts, for example seeing to see how hotmail, gmail, yahoo, or any other one parses the incoming html emails to see it is not a problem with your script, but the receiving servers.
|
You need to do old school HTML and inline styles for emails. Unless it is a really simple email it will not look the same in all email clients. Take a look at this site to see what is supported:
http://www.email-standards.org/ Here is a site that will test HTML emails in multiple clients: http://litmus.com/ |
| All times are GMT. The time now is 06:37 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0