email - PHP mail() not sending a mail -


this question has answer here:

i'm trying learn bit of basics of php, start living examples mailing. i'm not sure tutorial prepared or made couple of silly mistakes. there may problem " ' because haven't figured out 1 should :) so, mail not sending email, , it's not going spam believe screw ' , " part. help!

$name = $_post['nick']; $visitor_email = $_post['email']; $visitor_tel = $_post['tel']; $message = $_post['msg'];  $email_from = 'mail@mail.pl'; $email_subject = "nowe zlecenie: "; $email_body = "nowe zlecenie od $name.\n". "email kontaktowy: $visitor_email". "telefon kontaktowy: $visitor_tel". "zlecenie: $message". $to = 'mail@mail.pl'; $headers = "od: $email_from \r\n";  mail($to,$email_subject,$email_body,$headers); 

for debugging below: if(mail($to,$email_subject,$email_body,$headers)) echo "mail sent"; else echo "not send";


Comments