I've created a page in which I send an email.
I use PostCast server and I have cnfigured all the settings correctly. (smtp port, php.ini etc.)
However when I send an emai it is considered as spam. The mail cannot be sent to gmail, hotmail or yahoo servers as it is blocked (possible spam). But it's sent to my school's server with a warning for possible spam.
here's the code of the page:
<?php $to = 'email@example.com'; $subject = 'xaxaxa'; $message = 'hello sflkmslfmsdfmsdlkfmsldmflskdmfldsf'; $headers = 'From: firstname.lastname@example.org' . "\r\n" . 'Reply-To: email@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); If (mail($to, $subject, $message, $headers)) echo"yoooo"; else "malakia egine"; ?>
Are there any functions that will help me avoiding all those things?
Thanks in advance.