Answer the question
In order to leave comments, you need to log in
Error sending laravel mail, what is the reason?
When setting the condition, it gives an error 500 server error
Error in the logs
prod.ERROR: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. {"exception":"[object] (Swift_RfcComplianceException(code: 0): Address in mailbox given [] does not comply with RFC 2822, 3.6.2. at /var/www/vhosts/movewheels.com/httpdocs/external-form/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:355)
public function build()
{
$entity = Entity::find($this->entityId);
if(isset($_COOKIE['utm_sources']) && $_COOKIE['utm_sources'] == 'google') {
return $this
->markdown('order_mail')
->from(env('MAIL_FROM_ADDRESS_UTM'), env('MAIL_FROM_NAME'))
->subject('Order from Movewheels.com')
->with([
'entity' => $entity
]);
}
else {
return $this
->markdown('order_mail')
->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'))
->subject('Order from Movewheels.com')
->with([
'entity' => $entity
]);
}
}
Answer the question
In order to leave comments, you need to log in
It looks like you don't have a valid email address. With spaces or with special characters except for the dog sign
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question