Hi Dinh

Can you explain what you mean by a 'proper' smtp status code? Do you mean the code returned by the server at the end of the transaction? Or do you need a transcript of the all requests/responses?

The Zend_Mail_Transport_Smtp transport object lets you retrieve a connection instance. The connection instance can then give you a complete transcript of the conversation between client and server.

E.g.

$tr = new Zend_Mail_Transport_Smtp();
Zend_Mail::setDefaultTransport($tr);

$mail = new Zend_Mail();
... etc ...
$mail->send();

$log = $tr->getConnection()->getLog();

If you are performing multiple mail send() operations you can also reset the log between each new mail:-

$tr->getConnection()->resetLog();

Hope this answers your question.

Cheerio

Hi all,

I can not find any API in Zend_Mail that allows to retrieve proper smtp status code. Am I missing something or I need to do it myself?

Thanks,

Dinh


--

Simon Mundy | Director | PEPTOLAB

""" " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com

Reply via email to