Page 2 of 2

Posted: Thu Nov 16, 2006 5:29 pm
by kigoobe
well, I was really stupid here, I was using a comma instead of the <> ... have changed that, and it's working ... :) But what do you mean by checking the send()?

I am having now

Code: Select all

$mailer->send(
        $recipients,
        $sender,
        $objetcordo,
        $themessage
    );
   	$mailer->close();
Should I try something like

Code: Select all

if ($mailer -> send()) { print $confirmation; } else { print $error; }
And if yes, where should I use that, before or after the $mailer -> close();

Thanks again.

Posted: Thu Nov 16, 2006 5:40 pm
by Chris Corbyn
kigoobe wrote:Should I try something like

Code: Select all

if ($mailer -> send()) { print $confirmation; } else { print $error; }
And if yes, where should I use that, before or after the $mailer -> close();
Precisely ;)

Do that before calling close() otherwise you won't have a connection to send through. close() says "QUIT" to the server and then ends communication; you should only do that once you've finished with Swift :)

Posted: Thu Nov 16, 2006 6:08 pm
by kigoobe
thanks again ... i have added that ... so now my SwiftMailer is working perfectly ...

thanks a million times ... :)