Page 1 of 1

need hint: new installation, nothing happens, no mail sent

Posted: Fri May 08, 2009 2:46 pm
by st2xo
hi there,
please, could anybody help me with a hint with a strange problem?
I copied the swift-lib 4.0.3 files to my system and put this code into my php file:

Code: Select all

include ("/srv/www/web1/lib/swift-mailer/lib/swift_required.php");
    $message = Swift_Message::newInstance()
    ->setSubject('Your subject')
    ->setFrom('myself@mydomain.de')
    ->setTo('myself@mydomain.de')
    ->setBody('Here is the message itself')
    ;
... and nothing happens by loading the php file.
No errors, no output, nothing.
The postfix message log on my system shows no related action,
"error_reporting = E_ALL" @ php.ini shows no errors or notices related to swift.

If I send a mail with the php-function mail() all works fine, the mail will be sent and postfix shows the correct log.

my system:
PHP Version 5.2.4
Zend Engine v2.2.0
zend.ze1_compatibility_mode = Off
/usr/share/php5/PEAR included

thanks in advance for a hint!
Stefan

Re: need hint: new installation, nothing happens, no mail sent

Posted: Sat May 16, 2009 6:40 pm
by John Cartwright
You are only creating the message, and have not created the transport which in turns actually sends the message. Please refer to the docs for full examples.