• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

emails in Junk for Hotmail

S

sanvera

Guest
Hi,

Whenever i sent emails from my server, it gets into others like gmail, yahoo correctly i.e. in inbox but in hotmail it gets delivered as Junk, please help.
 
Hi,

We had that problem too. Actually it's stupid Hotmail that makes a problem out of it...

Anyway, we solved it by adding a 'return_path' pointing to the same domain as is sending the email. (Otherwise it points to the mailserver of your host, not your own, and hotmail then 'suspects' it's spam).

You can do this:
a. by adding a fifth parameter to your call to PHP's mail() function.
Simply add : ,"[email protected]"
to that call.

mail($email_to,$subject,$body,$headers, "[email protected]");

b. by adding a line to the PHP.INI file (local folder or system) :
[email protected]

You can also add it to .htaccess :
php_value [email protected]
(I'm not quite sure about that syntax tho. You can google for it, if it doesn't work).

We added it in the code itself (a.), because then we didn't have to change system settings. PLUS the system settings act for the server, and we will add a domain and we can only set 1 return_path for the server.

Also, we set a SPF record for our domain in our DNS settings.
(http://old.openspf.org/wizard.html)
An SPF record is sth only the owner/administrator of a domain can setup. In that record you say which servers may or may not send email for your domain. It is to prevent other servers to send mail AS you.
It has not much to do with YOU sending mail AS you... But Hotmail does see it as an extra sign that your email is not spam.

Hope this helps.
Paul
 
i am having the same problem. I am running centos. with plesk


am I just suppose to edit /etc/php.ini
where do i edit the php mail function to add the line?

and can you tell me what directory I would edit the .htaccess file?
 
Hi,

you could edit the etc/php.ini file, but this does not always work. What you can do, is create a text file, named php.ini in the folder that the script running is. This would mean it only applies to scripts in that folder, and does not change a setting for multiple folders/projects. (It is also easier if you wanna test things).
You can always move the changes to a higher level/bigger scope when you get it to work as you want it to work.

Same idea for the .htaccess file. Create it as text file in the folder with the script. That makes it work for the scripts in that folder only. You can move the changes to a higher level .htaccess, same as with the php.ini file.

(actually, .htacces works immediately... php.ini requires a restart of PHP or some service on some servers. We have to stop/start webservices before php.ini is re-read)

The mail() function can be found in one (or more) of your .php scripts. Do a search for 'mail(' you should find it easily. This solution has the littlest scope. Only the 1 script is affected.

Hope this helps!

Paul
 
can you direct mean as in what directory and what exact file to edit I appologize I just dont quite understand. I have edited the php.ini file. thank you in advance.

p.s. can you give me a the list of files you edited so I can just go to those and edited the to what u have done thank you once again
 
Back
Top