I'm trying to send mail with SendGrid, picking up the email that the user wants to send and the message, but I'm having this error when i try to submit:
Failed to authenticate on SMTP server with username "João Gabriel" using 2 possible authenticators. Authenticator LOGIN returned Swift_TransportException: Expected response code 250 but got an empty response in ...
My Mailable:
public $remetente;
public $nome;
public $destinatario;
public $data;
public function __construct($remetente, $nome, $destinatario, $data)
{
$this->remetente = $remetente;
$this->nome = $nome;
$this->destinatario = $destinatario;
$this->data = $data;
}
public function build()
{
//$address = 'janeexampexample@example.com';
$subject = 'This is a demo!';
$name = 'Jane Doe';
return $this->view('emails.test')
->from($this->remetente, $this->nome)
->subject($subject)
->replyTo($this->destinatario, $name);
}
}
My Controller:
public function enviarEmail(Request $request){
$destinatario = $request->input('destinatario');
$mensagem = $request->input('mensagem');
$remetente = \Auth::user()->email;
$nome = \Auth::user()->name;
Mail::to($destinatario)->send(new TestEmail($remetente, $nome, $destinatario, $mensagem));
}
Can someone help me?
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2JDx1RT
via IFTTT
Aucun commentaire:
Enregistrer un commentaire