You can use mail function: http://laravel.com/docs/mail
Here you can find a complete tutorial:
http://code.tutsplus.com/tutorials/sending-emails-with-laravel-4-gmail--net-36105
Simply you have to set: app/config/mail.php file. Then create a controller with inside a code like this:
$email = [email protected]
$emailData = array('detail'=>'my detail', 'name'=> 'my name');
Mail::send('emails.emailModel', $emailData, function($message) use ($email)
{
$message->to($email, 'Name')->subject('My subject');
});
It calls automatically a file in view/emails/emailModel.blade.php
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
</head>
<body>
<h2>Welcome</h2>
<div>
Your sign up details are below:
</div>
<div>{{ $detail }}</div>
<div>{{ $name}} </div>
</body>
</html>
That's all ;)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community