Support the ongoing development of Laravel.io →
posted 11 years ago
Mail

Hello everyone, So here, I have not managed to solve a small problem regarding sending email. Let me explain, in the mail.php file I typed in the username my email, but when I write the check $ message-> from ('info@entreprise.com', 'Laravel'); the sender of the email is my email in the file mail.php and not info@entreprise.com . If you have ideas or if you have any results to me to solve this problem I'm interested.

Thank you for your help.

Last updated 3 years ago.
0

Please include the relevant code / config.

Last updated 3 years ago.
0
<?php return array
( 'driver' => 'smtp',
 'host' => 'smtp.gmail.com', 
'port' => 587, 
'from' => array('address' => 'info@test.com', 'name' => 'admin'),
 'encryption' => 'tls', 
'username' => 'admin@gmail.com', 
'password' => 'pass',
 'sendmail' => '/usr/sbin/sendmail -bs',
 'pretend' => false,
);
/***********************************************************/
 Mail::send('emails.alert.send', compact('jobs'), function($message) use($alert) { $message->from('info@test.com'', 'admin');
            $message->replyTo('info@test.com', 'admin')
                    ->to('email1@test.com')
                    ->subject("New Alert");


        });

I want to send email with info@test.com

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

aissahimid aissahimid Joined 21 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.

© 2025 Laravel.io - All rights reserved.