Re: [exim] Problem with emails sent by php4

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Werner Amon
Date:  
À: exim-users
Sujet: Re: [exim] Problem with emails sent by php4
Wiesiek wrote:

>Hi
>
>I use debian sarge (testing) with exim 4.34 + PHP4.
>
>I send mail with use mail function: www.php.net/mail
>
>its works, but not as I want
>
>I create my own From, To, subject and "user-defined" headers.
>Mail function use "sendmail -io".
>Emails send was send from: www-data@mydomain (from mainlog), but From and To headers are other.
>
>Now I change sendmail params to: "sendmail -io -f <my@email>", but exim still send mail from: www-data@mydomain.
>
>How I can change it ? I have a forum, and when user enter wrong account (for example non-exist or domain has incorrect or somting else), then I want to remove that emails from my database, but mails sent to www-data@mydomain is not what I want.
>
>I know... I can use SMTP class, but why exim 4 sent always from www-data?
>This user is not in trusted_users list.
>I checked header, All is ok, but return-path was set to www-data@mydomain.
>
>I don't know how I change it. Rewrite seems to not support it. I had standard config + auth.
>
>This sample:
>
> $message = "This is sample body";
> $headers = "MIME-Version: 1.0\r\n";
> $headers .= "Content-Transfer-Encoding: 8bit\r\n";
> $headers .= "From: Test <sample@???>";
> mail("dest@???", "Sample subject", $message, $headers,"-io -f my@email");
>
>in exim mail was sent from www-data@mydomain
>in other MTA (like postfix, qmail, sendmail) was sent from: <my@email>
>
>Please help me.
>
>
>

Hi,

It works for me, when i do it so

mail("dest@???", "Sample subject", $message, $headers,"-i -f my@email");

just skip the o and it will work

greets
Werner