Email Handling and Manipulation Question 3

4 views
Skip to first unread message

Dan Kelly

unread,
Jul 14, 2011, 10:58:13 AM7/14/11
to Zend Certification Study Group
Which of the following steps would you need to undertake if you wanted
to send e-mails to
multiple recipients or MIME compatible e-mails from PHP?

A. Add the necessary additional headers to the $message parameter
(third parameter) of
the mail function.
B. Communicate directly with the MTA using SMTP from PHP code
C. Append additional headers to the e-mail using the extended features
of the mail
function’s $additional_headers parameter (fourth parameter) as a
string with a
newline \n character at the end of each needed header
D. Although sending e-mails to multiple recipients is allowed, PHP
does not support
sending of MIME e-mail.
E. Use the $additional_headers parameter of the mail function to
provide a string with a
newline and line feed \r\n characters at the end of each needed header.

Ramsez Stamper

unread,
Jul 14, 2011, 11:12:37 AM7/14/11
to zend-certificat...@googlegroups.com
I believe it's E, done this a hundred times, but hell if i remember without looking at actual code :)
--
Ramsez A. V. Stamper | Project Manager
Innovative Care Solutions | www.innovcare.com
o. 770-300-0244 | f. 770-447-4011
5655 Peachtree Parkway Norcross, Ga 30092
Twitter: @crassiusneo

Alex Stetsenko

unread,
Jul 14, 2011, 1:32:07 PM7/14/11
to zend-certificat...@googlegroups.com
Agree, it should be E. I think I've done it once or twice before found out about PHPMailer class.

Seal Trip

unread,
Jul 14, 2011, 3:07:38 PM7/14/11
to zend-certificat...@googlegroups.com
Agreed

Dan Kelly

unread,
Jul 18, 2011, 9:35:59 AM7/18/11
to Zend Certification Study Group
PHP can indeed send e-mails of any valid format using the mail
function, making
communication with the MTA directly from PHP code using SMTP a poor
choice.
Additional headers at the top of the e-mail must be added as a string
using the
$additional_headers parameter, with each header ending with both a
newline and linefeed
character (\r\n). When sending complex e-mails, such as ones with file
attachments and/or
HTML-formatted text, not only must additional headers be added, but
MIME-specific
headers must also be included in the $message portion of the e-mail
itself, so answer E is
correct.
Reply all
Reply to author
Forward
0 new messages