Email is not coming with mail()

Asked

Viewed 21 times

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?

  • I haven’t checked.

  • 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?

  • First time working with Email I don’t know where to start so I found this function, could send an example?

  • I put my email in $to published on my server and worked well.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.