• 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.

Can't get mail to send

K

keiron77

Guest
I have recently moved som of the sites I work on to a new Plesk controlled dedicated server. I have just found out that the forms are not being sent. I have alway used mail() before nad that worked fine.

This is the basic form for the script that I am using:
PHP:
<?
$headers = "From: name <email>\n";
$headers .= "Reply-To: name <email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain;charset=us-ascii\r\n";
$to="[email protected]";
$subject = "Testing email";
$body = "test";
$err = mail($to, $subject, $body, $headers);
?>
It doesn't cause an error, it just never reaches it's destination. I have read that adding a couple of line like this would help:
PHP:
putenv ("QMAILUSER=admin");
putenv ("QMAILNAME=Administrator");
But that just caused an error.

How can I get this to work. I only have access to the sites web pages and the Plesk control panel. I have about 4 live websites that need this running.
 
Your mail function may need to authenticate to the mail host.

You would need to specify outgoing mail user and password in order to be able to forward mail out.

This used to work on old plesk installations but the newer ones refuse relay.

You can also use phpmailer class which is what I use in my sourcecode. It's much more reliable.

http://phpmailer.sourceforge.net/
 
Back
Top