• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

function mail() + php + only problems + sendmail

J

Jorge Rozas C.

Guest
Hi Friends.

I viewed and reviewed all information about the script of php mail(), I did all the typical things about this function, put in php.ini


sendmail_path = /var/qmail/bin/sendmail
changed
sendmail_path= /var/qmail/bin/qmail-inject
changed
sendmail_path= /var/qmail/bin/qmail-inject
changed
sendmail_path= /usr/sbin/sendmail -t -i
changed
sendmail_path= /usr/sbin/sendmail


and restart the Apcache and Qmail, i did all possible combinations of the configuration

The problem is a one domain in my Plesk with this problem (a client)

nothing happened, the programmer sed to me I can´t send the Form mail in php.


Somebody could fix this thing or my next step is to give up.

Thanks.

Jorge R.
Santiago
 
Mail

wagnerch

The main idea is:

I have a client, he has a Web page in Flash with php, the problem is that he uses a function mail(), this function use sendmail application.

When use this function doesn´t work the typical form. i used all recommendations of the Forum to fix this problem , changed the sendmail_path, ussing the different paths to find the sendmail, but i didn´t get success.

i wrote to SWsoft and the sent me this

To set the correct headers for the Return-Path you need to use the code like below:

putenv ("QMAILUSER=USER");
putenv ("QMAILNAME=FULL_USER_NAME");
putenv ("QMAILHOST=DOMAIN");
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain;charset=us-ascii\r\n";
$headers .= "From: FULL_USER_NAME <USER@DOMAIN>";
$to="[email protected]";
$subject = "Testing email";
$body = "";
$err = mail($to, $subject, $body, $headers);

In result mail will have FULL_USER_NAME<USER@DOMAIN> in Return-Path.


but i don´t what to do with this. give to the programmer or use by myself, becuase the programmer sed to me the problem is mine.

Thnaks for the help.

JORGE
 
Use sendmail_path = /usr/sbin/sendmail -t -i in /etc/php.ini and show the example code to your client. However, I believe you need to use \n line endings with qmail instead of \r\n.
 
Originally posted by breun
However, I believe you need to use \n line endings with qmail instead of \r\n. [/B]

Yes, that's true. You can also find this in the mail() documentation on php.net.
 
Back
Top