0
I want to send email via php however function mail()
is not returning nor an error, and I do not know if my code is wrong:
<?php
$to = "MEU EMAIL";
$subject = "Php Mail";
$body = "Test Message From PHP";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'From: Your name <[email protected]>' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to, $subject, $body, $headers);
?>
Does not return even an error, but also does not arrive email, I use the Hotmail.
It wasn’t for spam box?
– David Alves
I haven’t checked.
– Everton Figueiredo
It is very common for mail function not to perform properly due to some problem with server configuration. SMTP is not an option for you?
– Samuel Fontebasso
First time working with Email I don’t know where to start so I found this function, could send an example?
– Everton Figueiredo
I put my email in
$to
published on my server and worked well.– user60252