Hi,
I am using smtp for sending the email and attachments from my system. What I want to accomplish is that I should be able to send information in an encrypted form so that the message cannot be tempered. I am using https for sending the emails. But is there any way I can encrypt the emails and attachments with AES or SHA1 and the reciever that is recieving that email can decrypt it. For example I send an encrypted email at gmail or any mail server. The user can decrypt the email.
Thanks in advance.

try this ..give the key to your reciever and provide him with the function to decrypt..

Thanks for replying. I was able to create the encrypted code and send it on gmail but my question is that how I am able to decrypt the message.

Since, there is no built-in decrypter on gmail except, their own localized encryptor (python), you will have to download the message and run it on your own localhost with PHP server?

There are many portable apache-mysql-php servers you can download today. Not to mention xampp and many others google search results can provide. You just have to search which one supports POP3.. I am pretty sure most of the compiled WAMPs and LAMPs are capable of working with POP3.Xampp comes with mercury mail which is a POP3 capable, your reciever just have to enable it in the control panel..

You provide him the script to retrieve the message from gmail using PHP, and the just parse the message locally and then eventually decrypting it,.

Search google on how to retrieve POP3 email from gmail using PHP.

HINT for your search : 1. MIME parser class 2. POP3 email client class php

You must pre-packaged the mime parser and the pop3 client, and the script instantiating the class using the receiver's username and password as parameters. The parsed data will then have to be process by your decrypter function using the key.

IMPORTANT! The first time your receiver run your application, he has to login to his gmail account and confirm the remote accesss authorization for his IP address, otherwise your application will be blocked from accessing gmail pop3 for ever and ever, or until someone notices your countless email requests for account reset.

From what I've read it should be possible to use OpenPGP, which can be read in the browser with a plugin. Haven't used it myself though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.