Add self signed certificate using PHPMailer on Gmail account

1.3k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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