[sclug] Php mail

Bob Franklin r.c.franklin at reading.ac.uk
Tue Nov 29 09:35:28 UTC 2005


On Tue, 29 Nov 2005, Simon Huggins wrote:

> ... From: header. ...

And, of course...

The University mailsystem (like most, I guess) verifies both the header 
and envelope senders; just specifying a From: header won't override the 
envelope sender (unless PHP does something special here?).

Some mail programs (e.g. Exim) require you to specifiy a list of 
usernames/IDs which are allowed to override the envelope sender from the 
user's own name (here 'www-data'), if submitting using the 
/usr/lib/sendmail method.  If it works by connecting to localhost and 
doing an SMTP transaction (which can be tricky, so most people avoid it), 
then it will be able to do this.


The important part (along with getting it working) is that the sender 
should be somethign sensible for what you're trying to do; even if you 
override it with a 'nobody', still put a real name as something useful 
(e.g. 'Project X - DO NOT REPLY <nobody at reading.ac.uk>').  If you do want 
people replying, you'll need to specify the return address (this sender 
will also get any bounces).

   - Bob


-- 
  Bob Franklin <r.c.franklin at reading.ac.uk>          +44 (0)118 378 7147
  Systems and Communications, IT Services, The University of Reading, UK


More information about the Sclug mailing list