I am very new to email servers and sending email with PHP...
Is it possible to have email sent from a PHP script on my server encrypted using SSL or TLS before it is sent to the recipient's mail server?
I need to ensure only the intended recipient can read the email, in case the transmission is intercepted on its journey to their mail server.
I am not sure if this is possible, as the recipient's mail server would not know the public key right? So how could it decrypt the email?
As background, I am not actually hosting email accounts for anyone - so it is not a case of the users authenticating with my server and downloading emails for them hosted there. I just have a script triggering an alert email to be sent from "notifications@danbaylis.com" (which is not a real email address on the server so you can't reply to it) to the user's real email address (which my application knows). I need a way to make sure this email is securely sent from PHP on my server, to the recipients mail server.
I have looked at the mail() function in PHP, as well as the PHPMailer class - but I am not sure how I would configure either of these methods to securely send the email.
All my research just shows how to install SSL in on my server so users can securely download email stored on my server - which is not what I am trying to do here.
I am running Centos5.7 which I believe has a mail server installed, though I am not sure if PHP actually uses that by default..
Thanks for any help!