This Powershell Script sends an S/MIME Signed Email. You need to have a PFX of your Certificate with a Password. From will be extracted from the PFX Certificate
Send Email without SMTP authentication
.\Send-SMIMESignedMail.ps1 -MailFromPFXFile E:\[email protected] -MailFromPFXPassword "MyPFXPassword" -MailTo [email protected] -Subject "Test" -Body "Just a Test" -SMTPServer 172.21.175.61 -SMTPPort 25
Send Email with SMTP authentication
.\Send-SMIMESignedMail.ps1 -MailFromPFXFile E:\[email protected] -MailFromPFXPassword "MyPFXPassword" -MailTo [email protected] -Subject "Test" -Body "Just a Test" -SMTPServer 172.21.175.61 -SMTPPort 25 -SMTPUsername "YourSMTPUsername" -SMTPPassword "YourSMTPPassword"