Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Aug 2002 02:02:13 -0700
From:      Benjamin Krueger <benjamin@seattleFenix.net>
To:        francisv@dagupan.com
Cc:        kevin@caomhin.demon.co.uk, freebsd-isp@FreeBSD.ORG
Subject:   Re: Setting default e-mail sender on Apache
Message-ID:  <20020817020213.J3109@mail.seattleFenix.net>
In-Reply-To: <10F29E27A956D511B0940050DA8D86A985C568@mailserver.dagupan.com>; from francisv@dagupan.com on Sat, Aug 17, 2002 at 08:19:37AM %2B0800
References:  <10F29E27A956D511B0940050DA8D86A985C568@mailserver.dagupan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* francisv@dagupan.com (francisv@dagupan.com) [020816 17:16]:
> Adding $headers to any outgoing mail doesn't work with Postfix :-/
> 
> -----Original Message-----
> From: Kevin Golding [mailto:kevin@caomhin.demon.co.uk] 
> Sent: Monday, August 12, 2002 9:37 PM
> To: francisv@dagupan.com
> Cc: freebsd-isp@freebsd.org
> Subject: Re: Setting default e-mail sender on Apache
> 
> Someone, quite probably , once wrote:
> >but testing the web application still sends e-mail coming from the ID
> runnig
> >the web process. BTW, my MTA is Postfix if this helps in troubleshooting
> the
> >problem. Thanks also for the link :)
> 
> It's imperfect but you could always try telling them to use:
> 
> $headers = From: webmaster@client.tld
> mail("to@address.com", "Subject line", "Test message", $headers);
> 
> 
> What do you get from a phpinfo()?  (just the mail settings really)
> 
> Kevin
> -- 
> kevin@caomhin.demon.co.uk

This does work with Postfix. I use it all the time. See the following code
snippet.

$headers = "From: TheDude@somewhere.dom\n";
$headers .= "X-Origin-IP: $REMOTE_ADDR\n";
$headers .= "X-HTTP-Agent: $HTTP_USER_AGENT\n";
$headers .= "X-Mailer: SomeSoftware (C) 2002 Benjamin Krueger\n";
$headers .= "cc: $cc\n";

$to = "someone@somewhere.dom";

$subject = "my subject";
$mail_body = "my message";

mail($to, $subject, $mail_body, $headers);

Regards,

-- 
Benjamin Krueger

"Life is far too important a thing ever to talk seriously about."
- Oscar Wilde (1854 - 1900)
----------------------------------------------------------------
Send mail w/ subject 'send public key' or query for (0x251A4B18)
Fingerprint = A642 F299 C1C1 C828 F186  A851 CFF0 7711 251A 4B18

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020817020213.J3109>