Fatal error: Uncaught exception 'Exception' with message 'The recipients parameter must either be a valid string email address, an instance of Swift_RecipientList or an instance of Swift_Address.' in /www/htdocs/theaternl/http/mailing/swift/Swift.php:337 Stack trace: #0 /www/htdocs/theaternl/http/mailing/admin/sendtestletter2.php(45): Swift->send(Object(Swift_Message), '', 'aad-eef@hotmail...') #1 {main} thrown in /www/htdocs/theaternl/http/mailing/swift/Swift.php on line 337
What i try is to understand swiftmailer
Something like this: ( i know i will have to use bulk option but one step at a time right?)
require_once "../swift/Swift.php";
require_once "../swift/Swift/Connection/SMTP.php";
$swift =& new Swift(new Swift_Connection_SMTP("localhost", 25));
$message =& new Swift_Message("$naam", "$bericht", "text/html");
if ($swift->send($message, "$email", "aad-eef@hotmail.com"))
{
echo "Message sent";
}
else
{
echo "Message failed to send";
}
$swift->disconnect();