How to maintain the sender email signature when using the Mail::send() function in the Standard?

Asked

Viewed 147 times

1

I can send the email correctly but, the email goes unsigned from the sender email, and I’m not finding how to resolve.

$emails = ['[email protected]', '[email protected]'];
$copias = ['[email protected]', '[email protected]'];

Mail::send('dashboard.teste', ['curso' => 'Eloquent'], function($m) use ($emails,  $assunto, $copias)
{    
        $m->to($emails)->subject($assunto)->from("[email protected]", "Remetente")->cc($copias, "email cópia");    
});

Code from the Dashboard.

teste {{$curso}}
  • I didn’t quite understand what you meant by "keep email signature from sender", can explain me?

  • My email has a signature with my name, phone and email for example, the email sent via application using this function goes without the signature. I could tell?

  • @Lorena please update the question and put to Lade dasborad.teste

  • @Updated bulfaitelo.

1 answer

2


From what I understand you’re hoping Mailer identify the configured signature on your server and include it in each submission because you are using the same SMTP/POP as well?

The Mailer does not identify the signature you set up on the server automatically (I don’t know if that’s possible), then you need to include the information in the template explicitly, see:

Email template:

Curso: {{ $curso }}



{{ $nomeAssinatura }} - Setor
Nome da Empresa
Endereço
Phone: {{ $telefone }}

Controller:

$emails = ['[email protected]', '[email protected]'];
$copias = ['[email protected]', '[email protected]'];
$emailInfo = [
    'curso' => 'Eloquente' ,
    'nomeAssinatura' => 'Lorena',
    'telefone' => $telefone
];

Mail::send('dashboard.teste', $emailInfo, function($m) use ($emails,  $assunto, $copias)
{    
    $m->to($emails)->subject($assunto)->from("[email protected]", "Remetente")->cc($copias, "email cópia");    
});
  • Got it, thank you very much, I’ll try this solution.

  • It worked, thank you so much for your help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.