[FLOW3-general] Swift Mailer Attachment

Markus Goldbeck mgoldbeck at cross-content.com
Tue Sep 27 10:30:29 CEST 2011


Hello everybody,

I have some Problem to attach an attachment to my SwiftMailer Objekt. 
Swift_attachment is not found but I can't understand why.

$mail = new \TYPO3\SwiftMailer\Message();


$mail ->setFrom(array('bla at bla.de' => 'some Guy from'))
       ->setTo(array('to at to.de' => 'foo'))
       ->setSubject('Mail Subject')
       ->setBody("some content")
       ->attach(\TYPO3\SwiftMailer\Swift_Attachment::fromPath($filepath))
       ->send();

Another path I tried was \TYPO3\Swift_Attachment::


error Message:
PHP Fatal error:  Class 'TYPO3\\SwiftMailer\\Swift_Attachment' not found 
in /var/www/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classe


Any hint is very welcome.

Best Regards,

Markus


More information about the FLOW3-general mailing list