Jump to content

setup GnuGP


kid85

Recommended Posts

I need to encrypt the body of my emails using PHP and later read those emails with Novell Evolution. Unfortunately, I see that GNUPG etc are a little messy to implement. Is there some other simpler alternative that works with Evolution ?

Link to comment
Share on other sites

I'm trying to setup GnuGP aka GPG but can't make it work. Where can I find path to gpg ??

 

I got part of this code from:

http://www.ibm.com/developerworks/opensource/library/os-php-encrypt/

 

	//set up users
$from = "myemail";
$to = "myemail";

//$gpg_path = '/usr/bin/gpg';
$gpg_path = '/usr/bin/gpg';
$home_dir = '/home/myusername';

$cmd = "echo $message | HOME=$home_dir $gpg_path" .
	"--quiet --no-secmem-warning --encrypt --sign --armor " .
	"--recipient $to --local-user $from";

$message = `$cmd`;

mail($to,'Message from Web Form', $message,"From: $from\n");

Link to comment
Share on other sites

Where can I find path to gpg ??

 

use the shell command "which"...

 

which gpg

 

It will tell you where in your path the gpg command is located at.  If it returns as not found, then make sure it's installed.  If it's not in a common location (/usr, /usr/local, /usr/sfw, /opt, etc...) then you may have to use the find command (IF you are sure that gpg is installed)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.