Page 1 of 1

Swift::send expects parameter 1 to be instance of Swift_Mess

Posted: Wed Oct 24, 2007 5:00 am
by sobuj
Notice: Swift::send expects parameter 1 to be instance of Swift_Message. in /home/user/public_html/folder/swift/Swift.php on line 368

As I see from Swift.php, the first parameter should be the message. It's there, still I am getting this error message. I am using this to send the mail

Code: Select all

$swift->send($str2[1], $recipientz,  new Swift_Address($str4[0], $str4[1].' '.$str4[2]))
It's strange, as if I try to print them out, just before calling send(), as

Code: Select all

$msg = $str2[1].' * '.$recipientz.' * '.$str4[0].' * '.$str4[1].' * '.$str4[2].'<hr />';
I see things are OK. In that case, why this weird message. I must be missing something somewhere. If I find myself the issue, I'll post it back, else, thanks for the helping hands.

Best.

Posted: Wed Oct 24, 2007 5:07 am
by sobuj
OK, solved.

I changed the send to -

Code: Select all

$swift->send($message, $recipientz,  new Swift_Address($str4[0], $str4[1].' '.$str4[2]))