Support the ongoing development of Laravel.io →
Requests Blade Jobs
Last updated 2 years ago.
0

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 ;)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

cuttimutti cuttimutti Joined 14 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.