PHP_EOL places an end-of-line character, which differs depending on the operating system (\r\n, or \n). this is a line break.
Ok I looked at the site and made some changes. It was working at first but now I'm not receiving any email even though when I print out the result in this page there seems to be no problem:
edited this post:
Ok. I tried an example. I removed my previous attachment and attached the following:
I've been looking at:
PHP Code:
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
//$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
//$headers .= 'Content-type: text/css; charset=iso-8859-1' . "\r\n";
$headers .= 'Content-type: text/css;' . "\r\n";
I want to use css, if possible in my newsletters to email. But I can't find any info on this.
Last edited by gilgalbiblewhee; Jul 29th, 2010 at 06:40 PM.
Compare bible texts (and other tools): TheWheelofGod
you can't set your content-type to "text/css" -- that would set the content type to that of a CSS file, which you are not sending. use the header I showed you in an earlier post.
you can't set your content-type to "text/css" -- that would set the content type to that of a CSS file, which you are not sending. use the header I showed you in an earlier post.
what do you mean how? you use CSS just like you would always use CSS. it's not like the way CSS works is changed when used in email versus on the web. some email clients don't properly support everything though.
what do you mean how? you use CSS just like you would always use CSS. it's not like the way CSS works is changed when used in email versus on the web. some email clients don't properly support everything though.
I don't think Hotmail is supporting. I'm not getting the emails i send when there's css in it. ANd I think some tags aren't supported either. <b> seems ok though.
Possibly the email address you send 'From' does not belong to the SMTP server and thus is not verifiable.
Spam filters will consider this junk.
What you might want to do is use a no-reply address belonging to your domain.
So $from = "[email protected]"; would be $from = "[email protected]";
Try it.
Also, can you post the source of one of those CSS using emails?
Possibly the email address you send 'From' does not belong to the SMTP server and thus is not verifiable.
Spam filters will consider this junk.
What you might want to do is use a no-reply address belonging to your domain.
So $from = "[email protected]"; would be $from = "[email protected]";
Try it.
Also, can you post the source of one of those CSS using emails?
the mail() function returns a boolean value of whether or not the mail was sent successfully. this doesn't mean that your mail wasn't picked up in a spam filter. server load will have a lot to do with when mail is sent, too. I'd recommend using a more appropriate way of sending mail (rather than sendmail with PHP's mail() function) -- SMTP. you can use PEAR::Mail or other mailing libraries for this. this would also be a better better for sending complex mail with HTML or attachments.
There is no spec on HTML and CSS in emails and some people (like me) dislike receiving them. I suggest sticking to plain text. At the very least, you need to provide a plain text alternative, which can be done with multipart encoding.
Also, headers are supposed to be separated by \r\n regardless of platform, but in practice I think this varies and \n is probably safer.
There is no spec on HTML and CSS in emails and some people (like me) dislike receiving them. I suggest sticking to plain text. At the very least, you need to provide a plain text alternative, which can be done with multipart encoding.
Also, headers are supposed to be separated by \r\n regardless of platform, but in practice I think this varies and \n is probably safer.
You're right. There are emails which cannot read html. Hotmail and yahoo read them but not others.
Compare bible texts (and other tools): TheWheelofGod