it's possible in laravel to send a default php email without the smtp config ? Like in php with X-Mailer ?
Without an SMTP server, you cannot send your email to its destination. When you click the “send” button from your email client, your email messages get automatically converted into a string of codes and are transferred to your SMTP server.
In the same way, you can also set up other Mail providers like Mailgun, Sendgrid, Mandrill, Mailchimp, etc. to send the mail from Localhost in Laravel.
Laravel provides a clean, simple email API powered by the popular Symfony Mailer component. Laravel and Symfony Mailer provide drivers for sending email via SMTP, Mailgun, Postmark, Amazon SES, and sendmail , allowing you to quickly get started sending mail through a local or cloud based service of your choice.
I use the standard PHP mail() function for situations when I want to specify the sender email hardly:
$to = env('MAIL_USERNAME');
$subject = $request->title;
$message = $request->message;
$headers = 'From: ' . $request->email . "\r\n" .
'Reply-To: ' . $request->email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With