Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP mail
October 30, 2008, 9:28 am
rate this thread
I want to find whether the message is send by the original user or
some one send the message in another name.
In the PHP mail function I specified the from address as some other
How can I find, whether that user sends the mail or it is send by some
other user using PHP script
How can we check that.
- C. (http://symcbean.blogspot.c
October 30, 2008, 1:10 pm
Re: PHP mail
If you want to establish the origin of an email, then the only
effective way to do so is via encryption using a key that the 'other'
person using the account does not have access to. How you implement
this is pretty much up to yourself. PGP (and GPG) use assymetric
encryption alogirthms - formerly the signature was appended to the end
of the email but more recent versions include the signature as an
attachment in the same way that x509 signed emails work. But you could
easily just generate a sha1 hash of the message body (contatenated
with a secret salt) and add that as an extra header, e.g. X-My-
Re: PHP mail
You can't in any absolute sense. Any header that isn't added by the
receiving mail server can be forged, absent verifiable cryptographic
signing of the headers.
At best you might be able to check the X-Mailer header to see if it's
a known client, but that won't always be present even in messages sent
by a human and it can be easily added to a message sent by a script.
Charles Calvert | Web-site Design/Development
Celtic Wolf, Inc. | Software Design/Development
http://www.celticwolf.com/ | Data Conversion
(703) 580-0210 | Project Management