Search code examples
phpgmailphpmailer

Add self signed certificate using PHPMailer on Gmail account


Is it possible to use self signed or dedicated certificates on a Gmail account with the library PHPMailer? How to do this? And is this a secure option?


Solution

  • you can do :

    require("class.phpmailer.php");
    $mail = new PHPMailer();
    $mail->IsMail();
    
    $mail->AddAddress("[email protected]");
    $mail->Subject = "Test";
    $mail->Body = "Test";
    
    $mail->sign_cert_file = "/cert/key.pem";
    $mail->sign_key_file = "/key/key.pem";
    $mail->sign_key_pass = "password";
    
    $mail->Send();
    

    But, i don't know if Google gonna accept your certificate...

    Code Source : http://www.adam-makes-websites.com/discoveries/sending_secure_certified_s-mime_emails_via_php