So for the first time I tried Laravel
mailer but I encountered some problems vs the normal php mail()
which just sends the mail.
My laravel code:
if(Mail::send('pages/mail', $data, function($message)
{
$message->from('webmaster@example.com', Input::get('name'));
$message->to('nobody@example.com')->subject('Welcome to My Laravel app!');
}))
{
return "success";
}
else
{
return Mail::failures();
}
My laravel error response:
"["nobody@example.com"]"
(basically the mail address I put in to()
.
If I use the normal php mail()
it sends the mail without error (it only came into my spam folder but it was just a test).
Any idea what the problem might be?