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