PHP MAIL() is not working in ASP.NET hosting


New Member
We are unable to send email using php mail() from our server i.e. windows shared server.
None of the support can help in this regards. Even we can not send mail using smtp as we do not have smtp server and port details.
Secondly there is no option for adding White List email id from which Newsletter type email can be sent.


Staff member
As far as I know php mail will not work on windows, but does on cpanel/standard hosting. For windows normally you would use as the smtp hostname
25 as the port
your email username as the username
the email password created in plesk

For whitelist, there is no outbound whitelist for plesk. You could filter outgoing mail with spamassassin or limit emails per hour, but those are not set by default. I don't think whitelist is what you would be looking for.

If there is a ticket number please let me know.


New Member
Windows server won't support many of PHP functions, its always better to host your PHP application on linux server.
But if you want to run your php mail function on windows server then it cannot be accepted to all receivers as some of them are using windows server.
You can try to add below code to resolve this issue, may be it con't work but you can try it.
ini_set (“SMTP”,””);
ini_set(“sendmail_from”, “”);

But if it cannot work then you its better to use PHP mailer() function with SMTP authentication to send your mail from windows server.
It can definitely work with windows server.