I have tried understanding SPF but the terms used are beyond my experience, so I turn to you guys now.
I have a Virtual private server (VPS) which I manage myself.
I have installed postfix on it, and have a server named:
server1.domain.se
Now, the IP of my VPS is for example this:
111.111.11.1
Then I have my DOMAIN registered at an ISP, where I can manually setup my own DNS Records.
I have these records setup (IP REPLACED WITH "111.111.11.1"):
NAME TYPE DATA
www.domain.se A 111.111.11.1
domain.se A 111.111.11.1
server1.domain.se A 111.111.11.1
domain.se TXT v=spf1 a mx ptr ~all
When I send email using php:s mail function the emails are considered spam by gmail, hotmail, and all other email-servers. Why is this?
Here is how I send the mail in php:
$mail_message= "THE MESSAGE GOES HERE";
$headers="MIME-Version: 1.0"."\n";
$headers.="Content-type: text/plain; charset=UTF-8"."\n";
$headers.="From: Domain <[email protected]>"."\n";
$subject="Subject goes here";
mail($email, '=?UTF-8?B?'.base64_encode($subject).'?=', $mail_message, $headers, '[email protected]');
Above, the email adress [email protected] doesn't even exist, just so you know.
I am as I said before very new to email servers, so please explain in detail how to solve this...
If you need more input, like my postfix configuration or something, just let me know.
Thanks