Question : Is it possible to encrypt an email message using PHP?

Experts,

I am using the mail function in php to send an email message via our web server.  I am trying to figure out the best way to encrypt the message so that when my recipient receives the email in their Lotus Notes inbox, that it is encrypted.

1.  Is this even possible using php - and -
2.  If possible, how could I do so?

Any ideas?  I know that php can encrypt almost anything using either SHA or MD5 but, can this be done within the mail function or does it have to be handled by my server?

Answer : Is it possible to encrypt an email message using PHP?

Please let me suggest a different design pattern (This is what PayPal and other sophisticated sites use).

When you have a message for me, use the current DATETIME, my client id, and the message content and make up a message digest using md5().  Store my message and the md5() string in your data base.

Send me a plain-text email with a link to the message-reader script.  The script has the md5() key in the URL and it is only available behind HTTPS.

The script requires my client ID and password and validates these.  Then when I am authenticated it shows the message over the HTTPS web page.

In this design pattern you have essentially no risk of interception of the email -- anyone who sniffs it would still need to know the UID and Password.  And since you present the message over HTTPS, you do not need to encrypt anything, and your client does not need to decrypt anything - it is all automatic.  You could even use advanced HTML styling to make your message look nice!

Does that make sense for your app?

Best, ~Ray
Random Solutions  
 
programming4us programming4us