You could get the attachment via getParts() as Zend_Mail extends
Zend_Mime_Message. But I also think that's not a really easy way to
do it.
I think it would be nice if that could be added to the library
directly instead of incubator, as it doesn't/shouldn't hurt. So I've
created a task: http://framework.zend.com/issues/browse/ZF-564 with
patch.
nico
[18.11.2006 19:55] Matthew Ratzloff wrote:
As long as you don't do it for addAttachment() I think it's a good
idea, since there's no easy way to get at the attachment without a
return value (to set the filename, content type, etc.).
-Matt
----- Original Message ----- From: "Nico Edtinger" <[EMAIL PROTECTED]>
To: "Waldemar Schott" <[EMAIL PROTECTED]>
Cc: "ZF-General" <fw-general@lists.zend.com>
Sent: Saturday, November 18, 2006 10:09 AM
Subject: Re: [fw-general] Fluent interfaces for Zend_Mail
In general this shouldn't be a problem. But setBodyText() and
setBodyHtml() both return the Zend_Mime_Part instance. If someone
needs this he could of course also use getBodyText() and
getBodyHtml().
Does someone use the return value of these two set methods?
Otherwise I'll checkin Zend_Mail with fluent interfaces in my
little incubator space.
nico
[18.11.2006 18:25] Waldemar Schott wrote:
Hello,
I think it would be nice if Zend_Mail supports fluent interfaces
like other parts of the framework.
Current usage: http://framework.zend.com/manual/en/zend.mail.html
|$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.')
->setFrom('[EMAIL PROTECTED]', 'Some Sender')
->addTo('[EMAIL PROTECTED]', 'Some Recipient')
->setSubject('TestSubject')
->send();|
Greetings
Waldemar
<schott-waldemar.vcf>