@insight Probably this is the reason. Have you checked this? https://stackoverflow.com/questions/74098045/symfony-component-mailer-exception-transportexception-with-message-expected-res
Jun 21, 2023
5
Level 2
How to send test email from localhost ?
Dear Friends, I need to test my email functionality from my localhost. I try to use sendgrid and give in .env file as
MAIL_MAILER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=SG.6sWi-0PqQ8K055dVYMMA0Q.8AfxFU23JrnhHofhNfB1bxxxxxxxxxxxxxxxxxxxxxxxxxx
MAIL_ENCRYPTION=tls
[email protected]
MAIL_FROM_NAME="${APP_NAME}"
But I got error as
My Controller call is
Mail::send('emails.Help', $request->all(), function($message) use ($name) {
$message->to('[email protected]');
$message->subject('New Help Request from ' .$name);
});
My view is
<!DOCTYPE html>
<html>
<head>
<title>New Help Request Submission</title>
</head>
<body>
<h1>New Help Request Submission</h1>
<p>
This email is to inform you that a new help request form has been submitted.
</p>
<p>
The following information was submitted:
</p>
<ul>
<li>Name: {{ $name }}</li>
<li>Email: {{ $email }}</li>
<li>Mobile: {{ $mobile }}</li>
<li>Details: {{ $details }}</li>
</ul>
</body>
</html>
Please help to solve this issue
Thanks
Anes P A
Level 122
if you are going to specify tls then you need to use port 465
1 like
Please or to participate in this conversation.