Hello @jeromnimoman
For me it isn't clear, do you get an error from the code or didn't you receive the email? Because it can be a lot of different steps where it fails outside this code :)
hi, thank you for reply.
no I do not receive any error, neither in the laravel logs nor in the apache logs, the only log is that one of the function (journal.log), and no I do not receive the mail, sendmail is disabled in my environment, I really don't understand where the problem is, I installed phpmailer and it is included it should work
If I'm correctly you mean that it is using sendmail while that shouldn't be what it want.
I see this options that maybe can help.
//Tell PHPMailer to use SMTP
$mail->isSMTP();
//Whether to use SMTP authentication
$mail->SMTPAuth = true;
Source: https://github.com/PHPMailer/PHPMailer/blob/master/examples/smtp.phps
Thank you again for your help, the problem is not directly related to phpmailer, the problem is that laravel should not use sendmail since I start a phpmailer instance from the controller and send the mail with phpmailer , we notice in the journal.log that
Sending with mail()Sendmail path: /usr/sbin/sendmail -t -i
Sendmail is used and not phpmailer, we also notice that :
X-Mailer: PHPMailer 6.8.1
This header is added by phpmailer, this problem is very strange, I can't find the reason, a laravel expert would be welcome in this thread
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community