PGP mail - is there a code command ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jramaro
Forum Commoner
Posts: 58
Joined: Tue Jun 26, 2007 7:46 am

PGP mail - is there a code command ?

Post by jramaro »

Hi ,
I have PGP mail on Host/server. Already set-up and public and private keys generated.

I'm re-doing this part of a website that was formerly done by someone else.
They used a lot of their own script mail forms that are not functional now and those that were left are 'bugged'
example: = sending encrypt mails to themselves. (had to delete their PGP keys as well)
their scripts looked wacked and bugged like they were James Bond freaks.

Starting fresh with PGP script. already have custom php mail form created.
Is there a command i can put into the = mail($to etc.?
to tell it user/cgi-bin etc.
or will i have to rebuild the handling of the keys ?


looked through PHP manual - and found excessive GnuPG info that didnt relate as far as i know.
Thanks
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

You probably will want to reconfigure which sendmail binary is being used, which is what I assume PGP Mail is using to intercept your emails and encrypt them. There relevant ini directive is sendmail_path.

If no such facility exists, you will need to manually call the pgp/gpg binaries to encrypt the data before passing it to $data.
jramaro
Forum Commoner
Posts: 58
Joined: Tue Jun 26, 2007 7:46 am

Post by jramaro »

Ok, but what i mean is can i have something in the mail form send?

so if my original line to send the mail in regular format is:

Code: Select all

$ok = mail($to, $subject, $message, $headers);
Then is there a way to include something as say:

Code: Select all

$ok . = mailto:pgp-public-keys@mydomain.com/userbin/pgp
or something like that? Since the mail is already created and its only a matter of redirecting it to the pgp encryption which is already
set up on the host . it seems al lthe rest should be taken care of within the pgp program on the Host?

Thank you
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

No, you'll have to handle it at a lower level if you want to use mail().

If you know the sendmail arguments that are needed you can pass them as the 5th parameter in mail().
jramaro
Forum Commoner
Posts: 58
Joined: Tue Jun 26, 2007 7:46 am

Post by jramaro »

d11wtq or Ambush commander,
do you have a website offhand that would show this?

= newbie in PGP.

I wont be doing PGP full time so im wondering if theres a simple functionality or does it require
that you get into the grease and bolts at the bottom of it ?

because i was hoping that there would be possible a few standard requisite lines like

1. a call to send the mail pgp , where = the userbin/pgp
2. if its open ok , encrypt mail ..else say cannot send.
3. Send mail to recipient

does pgp simplify their program like that?
writing a heck of a lot of code to encrypt a message seems pretty crazy.

Thanks for help
Post Reply