According to the docs, there are two ways of sending mail. The first is like the following:
Message::send(function($message)
{
$message->to($email);
$message->from($from_email);
$message->subject($subject);
$message->body('view: emails.verify');
// You can add View data by simply setting the value
// to the message.
$message->body->verify_link = $activationURL;
$message->html(true);
});
But this tells me that "email is undefined" at the $message->to() line. I'm using this inside of a function withing the user controller (maybe the problem? Can functions sit within functions in PHP?)
So, I tried the inline version (lack of function within a function surely helps) but alas I can't figure out how to bind data to the email view :/
According to the docs, there are two ways of sending mail. The first is like the following:
But this tells me that "email is undefined" at the $message->to() line. I'm using this inside of a function withing the user controller (maybe the problem? Can functions sit within functions in PHP?)
So, I tried the inline version (lack of function within a function surely helps) but alas I can't figure out how to bind data to the email view :/