• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PHP mail never arrives - no error

W

willgnosis

Guest
i tried to change my sendmail path

sendmail_path = /usr/local/psa/qmail/bin/sendmail

in my php.ini file



but still i cant send php mail!

what do i have to do to be able to send php mail?


i get this is my mail log:

Mar 9 16:34:59 minimacs-Computer qmail: 1173458099.125566 new msg 223393
Mar 9 16:34:59 minimacs-Computer qmail: 1173458099.128400 info msg 223393: bytes 300 from <[email protected]> qp 3254 uid 70
Mar 9 16:34:59 minimacs-Computer qmail: 1173458099.130578 end msg 223393


nothing arrives!

I can send successfully using the plesk mass mailer. & my php code it good - using the mail(); function.

but no php mail...!??


stramgely enough Mime mail DOES work..

but the basic php mail(); function doesn't
 
Hello,

The path to sendmail should be:

/usr/sbin/sendmail

For the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.
 
The problem is more likely due to remote mail server checking the domain (minimacs-Computer.local) - sending the mail from a correctly formed email address should work fine.
 
ok... it seems that actually my php WAS working but for some reason if i send a message to a hotmail.com address it never arrives - doesn't evem get junked.

If send a message to a yahoo address it arrives - but gets junked!

anyone know what on earth happens to these messages sent to hotmail???

dop they just automatically delete them?

I am sending using mime mail

with these headers:

$mail->setHeader('From',"$email");
$mail->setHeader('Reply-To',"$email");
$mail->setHeader('MIME-Version','1.0');
$mail->setHeader('Content-Type','text/html; charset=iso-8859-1');
$mail->setFrom("$Name1<$email>");
$mail->setSubject($subject);
$mimego = $mail->send(array($to),'smtp');
echo $mimego ? ' ' : '<br>Failed to send mail';
 
I would suggest checking what I mentioned above and also ensuring that the server's IP's all have reverse DNS set up.
 
I have the same issue:

- Plesk 8.1.1
- RHEL4
- PHP 5.0.4

PHP.INI
extension_dir /usr/lib/php/modules/ /usr/lib/php/modules/
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/share/pear .:/usr/share/pear
...
safe_mode On Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from me@localhost me@localhost
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off

When I try send any mail with this script is impossible send it:
*******************
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
********************

Do you have any idea about this issue???

Thanks!!!
 
Back
Top