Emil Edeholt wrote: > Hi, > > I hope this is not too off topic but I have a problem when I use mail(). > When I add the header Content-Type: text/plain; charset=UTF-8 the body > of the mail is encoded fine but the subject is not encoded. I've tried > to utf8_encode() and utf8_decode() the subject text but neither helps. > > Any idea of how to pass what encoding to use on an email subject? > > Thanks! > > Regards Emil > Have a look at the Zend Mail wrapper. You have to specially encode the subject to be completely stand alone from the encoding of the body. All header that contain special characters (e.g. the From name) have to be stand-alone as the Content-Type header only applies to the body of the message. See here: http://www.snook.ca/archives/servers/encoding_accent/ In the Zend Framework: http://framework.zend.com/fisheye/browse/~raw,r=598/Zend_Framework/trunk/library/Zend/Mail.php Look at the _encodeHeader() function and more specifically the Zend_Mime::encodeQuotedPrintable($value) method. Hope that helps. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php