On 6/3/11 10:58 PM, Roger Webb wrote:
I went through this *exact* issue and found an answer on the list.
You *MUST* retrieve the "mailer" before creating a new Swift_Message
$mailer = $this->get('mailer');
$message = \Swift_Message::newInstance()->...
Correct. This will not be needed anymore as of beta4.
Fabien
Roger
On Jun 3, 9:27 am, Kevin<[email protected]> wrote:
I was also having this issue, updating to sf2 master cleared it up for
me.
On Jun 2, 10:35 am, keymaster<[email protected]> wrote:
Getting the identical error, also on Sf2 Beta3.
*Fatal error*: Call to a member function clearAll() on a non-object in
*C:\Program
Files
(x86)\Zend\Apache2\htdocs\Symfony\vendor\swiftmailer\lib\classes\Swift\Mime\SimpleMimeEntity.php
* on line *822
Here is the code:
*
$message = \Swift_Message::newInstance()->setSubject( 'Contact Email' )
->setFrom( '[email protected]' )
->setTo( '[email protected]' )
->setBody( 'Hi There' );
$this->get( 'mailer' )->send( $message );
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en