Ver Mensaje Individual
  #9 (permalink)  
Antiguo 08/09/2013, 13:46
eternoaprendiz
 
Fecha de Ingreso: junio-2013
Ubicación: Madrid
Mensajes: 73
Antigüedad: 10 años, 10 meses
Puntos: 27
Respuesta: Como procesar formularlo en laravel 4

http://laravel.com/docs/mail#basic-usage

Como lo tenías antes estaba bien:

Código PHP:
Ver original
  1. Mail::send("send-email", $data2, function($message)
  2.     {
  3.         $message->from('[email protected]', 'desde');
  4.         $message->to('[email protected]', 'para')->subject('Recuperación Contraseña');
  5.     });

Pero $data2 debe ser un array como el segundo parámetro de View::make. Lee la documentación y trata de comprender lo que dice, no te limites a copiar y pegar.


Cita:
The Mail::send method may be used to send an e-mail message:

Mail::send('emails.welcome', $data, function($message)
{
$message->to('[email protected]', 'John Smith')->subject('Welcome!');
});
The first argument passed to the send method is the name of the view that should be used as the e-mail body. The second is the $data that should be passed to the view, and the third is a Closure allowing you to specify various options on the e-mail message.
  • El primer argumento es una vista (plantilla blade) que se usará en el cuerpo del correo.
  • El segundo argumento es un array que se le pasa a la vista.
  • El tercer argumento es una función anómina que permite configurar varias opciones del correo.