Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

pgp php sendmail problem

  • 22-01-2007 3:51pm
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    Hi


    i'm trying to set up a script so as the info submitted in a form is encrypted with pgp and sent to the admin.

    However it will not work fOr somereason.

    ive tryed teh net and cant find any tutorial how to do this.

    does anyone know where i can get info?

    tNX






    [PHP]


    $username = "buyaustr";
    $pgp="/usr/bin/gpg";
    $user = "buyaustr";


    $carddata = 'qsdqs qsdsqdqs sq sqsqsq';
    $subject = "Wine Payment";


    $recp = 'wsaorders@mydomain.com';


    $command = 'echo "'.$carddata.'" | '.$pgp.' -a --always-trust --batch --no-secmem-warning -e -u "'.$user.'" -r "'.$recp.'"';

    echo $command;

    $encrypted='';
    putenv("GNUPGHOME=/home/buyaustr/.gnupg");
    $result = exec($command, $encrypted, $errorcode);

    echo $errorcode;


    $message = implode("\n", $encrypted);
    if(ereg("
    BEGIN PGP PUBLIC KEY BLOCK
    .*
    END PGP PUBLIC KEY BLOCK
    ",$message))
    {
    echo "It Worked";
    }else
    {
    echo "It failed";
    }

    mosMail( $email, $name , 'wsaorders@mydomain.com', $subject, $message ,0);



    [/PHP]


Comments

  • Registered Users, Registered Users 2 Posts: 684 ✭✭✭Gosh


    This might help ...


  • Closed Accounts Posts: 382 ✭✭misterq


    Are you 100% sure the server has pgp installed and you have the right paths and settings?

    Any time I have had issue it has been this kind of thing rather than the script itself.


Advertisement