1/ in the SMTP transport, connect() uses $_SERVER['SERVER_ADDR'] for the
HELO.  This fails miserably under CLI or CGI when run from the command
line, because it isn't set to anything meaningful.

<b>Fatal error</b>:  Uncaught exception 'Zend_Mail_Transport_Exception' with
message '501 5.5.2 invalid HELO'

2/ also in the SMTP transport, the sendMail() method accepts a $subject
parameter, but this is unused.

3/ SMTP transport again; the communication timeout of 2 seconds is way
too low.  I suggest increasing it to at least 30.  Some systems perform
expensive processing that may require even longer timeout durations.

4/ Zend_Mail::_encodeHeader; needs to replace any '?' characters in
$quotedValue with '=3F'. Otherwise, question marks in the header will
break the encoding.