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

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
st2xo
Forum Newbie
Posts: 1
Joined: Fri May 08, 2009 2:32 pm

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

Post 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
Last edited by Benjamin on Sat May 16, 2009 6:54 pm, edited 1 time in total.
Reason: Changed code type from text to php.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

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

Post 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.
Post Reply