• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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