I use the following code below to send and email to a user from my register form, It works but it slows my register page down. if i click register with out the code bam done. but if i have it in place it take a while for the registration to complete. I am using php7 is there a way of speeding this up?
$from = "Mysite <noreply@mysite.com>";
$to = $email;
$subject = "Registration";
$body_message = "Hello!
Thank you for registering.
You must verify the email address associated with your account.
This message was sent from an unmonitored account. Any responses will not be read.
If you have any questions or concerns, please contact support@mysite.net";
$headers = "From: $from
Reply-To: $from
Content-Type: text/plain";
mb_send_mail($email, $subject, $body_message, $headers);