Re: Sendmail Return-Path
| From: | Enda Nagle - Lists | Date: | Tue, 27 Jul 2004 21:45:27 +0000 |
| Subject: | Re: Sendmail Return-Path | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192038@lists.php.net to get a copy of this message | ||
Hi Justin,
I just tried this code:
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: Webstore <info@domain.com>\n";
$headers .= "To: $email_address\n";
$headers .= "Bcc: enda@category9.com\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: My Website\n";
$headers .= "X-Return-path: ME <user@domain.com>\n";
$subject = "Your Order";
$from = "enda@category9.com";
$message .="xxxxxx";
mail($to, $subject, $message, $from, $headers)
or print "Could not send mail to customer";
But I get a SAFE MODE error, so I guess I¹ll just have to try that PEAR
package.
Regards
Enda
--
On 27/07/2004 22:25, "Justin Patrin" <papercrane@gmail.com> wrote:
> On Tue, 27 Jul 2004 22:07:52 +0100, Enda Nagle - Lists
> <lists@nightsol.net> wrote:
>> > Hi Guys,
>> >
>> > I¹m using PHP¹s mail() function on several sites, but have difficulty
>> > sometimes with the mails being tagged as SPAM.
>> >
>> > I want to have the Return-Path set to the site admin, but can¹t see where
>> to
>> > do this.
>> >
>> > I know that it can be done at server root level but I can¹t really do that
>> > as its a shared server.
>> >
>> > I do have my own php.ini file for my site, but can only see the following
>> > vars:
>> >
>> > mail function]
>> > ; For Win32 only.
>> > SMTP = localhost
>> >
>> > ; For Win32 only.
>> > sendmail_from = me@localhost.com
>> >
>> > ; For Unix only. You may supply arguments as well (default: "sendmail -t
>> > -i").
>> > sendmail_path = /usr/sbin/sendmail -t -i
>> >
>> > I¹m working off a Linux box, so presumably I can¹t use the sendmail_from
>> > variable?
>
> Nope, that's only for windows.
>
>> >
>> > I also tried to set the following variable in the headers for the mail:
>> >
>> > $headers .= "X-Return-path: ME <user@domain.com>\r\n";
>
> This should work if you put it in the right place in the call. Try
> just \n as well. If it doesn't work, try using a mailing class such
> as:
>
> http://pear.php.net/package/Mail
>
>> >
>> > Any help appreciated,
>> >
>> > Thanks
>> >
>> > Enda
>> > --
>> >
>> > - + - + - + - + - + - + - + - + - + - + - + - + -
>> >
>> > Enda Nagle
>> > +353 86 168 0774
>> > enda@category9.com
>> > www.category9.com
>> >
>> > - + - + - + - + - + - + - + - + - + - + - + - + -
>> >
>> > !DSPAM:4106c542182671082813648!
>> >
>