note 80662 added to function.mail

From: Date: Mon, 28 Jan 2008 10:31:52 +0000
Subject: note 80662 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-135457@lists.php.net to get a copy of this message
This is a simple and quick (dirty?) fix for encoding long UTF-8 email subjects. <?php $subject= mb_encode_mimeheader($subject,"UTF-8", "B", "\n"); ?> Changing the $transfer_encoding parameter* from B (Base64) to Q (Quoted-Printable) seems to work too. *See the mb_encode_mimeheader documentation here http://php.net/manual/en/function.mb-encode-mimeheader.php This one is based on the previously posted solution by J.Halmu http://php.net/manual/en/function.mail.php#75886 , added the two last parameters to prevent long subjects from breaking the email. It worked flawlessly on a RHEL environmet. No further tests, sorry. ---- Server IP: 130.206.1.5 Probable Submitter: 85.87.238.142 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/80662 Del: integrated -- https://master.php.net/note/delete/80662/integrated Del: useless -- https://master.php.net/note/delete/80662/useless Del: bad code -- https://master.php.net/note/delete/80662/bad+code Del: spam -- https://master.php.net/note/delete/80662/spam Del: non-english -- https://master.php.net/note/delete/80662/non-english Del: in docs -- https://master.php.net/note/delete/80662/in+docs Del: other reasons-- https://master.php.net/note/delete/80662 Reject -- https://master.php.net/note/reject/80662 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135457) next »