Hi,
I have a mail header like this:
$header .= "Return-Path:andre@shukr.de<Andre> \n";
If I send this email to an unknown email address, the mail delivery error message doesn't arrive back to the Return-Path specified above, but it goes to info@shukr.de, my website's main email address.
I don't know if the following information from phpinfo() helps, but I copied it here anyway:
sendmail_from: root@localhost.com
sendmail_path: /usr/sbin/sendmail -t -i
SMTP: localhost
smtp_port: 25
I might have to change the setup in php.ini, but I don't have access to php.ini because my web server provider resides somewhere else, and for security and technical reasons they can not change the php.ini setup only for me.
How can I deal with it?
mail() header: Return-Path does not take affect...?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
See my signature for Swift Mailer if you want a solid solution.ansa wrote:Can you tell me a little more?
What kind of extra parameters would I need?
I have used phpmailer() obtained from internet but it doesn't work as well. How many (popular) mail functions are there actually in PHP?
Extra parameters:
The php.net mail() page wrote: additional_parameters (optional)
The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.
The user that the webserver runs as should be added as a trusted user to the sendmail configuration to prevent a 'X-Warning' header from being added to the message when the envelope sender (-f) is set using this method. For sendmail users, this file is /etc/mail/trusted-users
Example from mail() page wrote: Example 3. Sending mail with an additional command line parameter.
The additional_parameters parameter can be used to pass an additional parameter to the program configured to use when sending mail using the sendmail_path.Code: Select all
<?php mail('nobody@example.com', 'the subject', 'the message', null, '-fwebmaster@example.com'); ?>