note 111139 deleted from function.imap-mail by danbrown

From: Date: Fri, 18 Jan 2013 15:34:25 +0000
Subject: note 111139 deleted from function.imap-mail by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193206@lists.php.net to get a copy of this message
Note Submitter: t dot glaser at tarent dot de ---- Do *not* use this function! In #sendmail on IRC, we’ve been bothered a lot by PHP “developers” using mail() or imap_mail() and complaining about this-or-that not working. At https://www.mirbsd.org/cvs.cgi/contrib/hosted/tg/mailfrom.php?rev=HEAD I published a “better” mail sending routine I wrote specifically for visitors of our IRC channel. It takes the sender (to use for /usr/sbin/sendmail -f) and the recipients (for listing on the command line) separately, takes headers as an associative array and takes care of encoding them, correctly, automatically. The function assumes an unixoid system (one that can popen() /usr/sbin/sendmail) and UTF-8 support, and that the MSP automatically converts 8bit to quoted-printable or base64 if needed (most notably, Exim does not do that). Writing conversion code or a mail()-like wrapper would be possible but too fragile. It’s easier to change your code to use this routine in the first place, especially due to the auto-encoding properties.

« previous php.notes (#193206) next »