# Signed email using Powershell

**URL:** <https://forums.powershell.org/t/signed-email-using-powershell/1963>\
**Category:** PowerShell Help\
**Created:** [October 15, 2013, 3:48am UTC](https://forums.powershell.org/t/signed-email-using-powershell/1963 "2013-10-15T03:48:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bishafr](https://avatars.discourse-cdn.com/v4/letter/b/edb3f5/32.png) [@bishafr](https://forums.powershell.org/u/bishafr)\
**Post date:** [October 15, 2013, 3:48am UTC](https://forums.powershell.org/t/signed-email-using-powershell/1963/1 "2013-10-15T03:48:15Z")

</div>

Have a script that sends an email report. Need to have the email digitally signed.  
Any way i can send a digitally signed email using Powershell ?

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [October 15, 2013, 4:05am UTC](https://forums.powershell.org/t/signed-email-using-powershell/1963/2 "2013-10-15T04:05:26Z")

</div>

That gets into a lot of complexity. Using just the native Send-MailMessage, you’d have to construct the signed, multipart MIME body of the message manually, and then PowerShell could definitely send it.

If you’re using the .NET Framework’s SMTPClient, you might be able to.

```
$cert = # get a certificate object from the CERT: drive
$smtp = new-object -type system.net.mail.smtpclient
$smtp.clientcertificates.add($cert)
```

Something like that. See the conversation at [http://www.vistax64.com/powershell/159699-powershell-certificate-encrypted-signed-email.html](http://www.vistax64.com/powershell/159699-powershell-certificate-encrypted-signed-email.html).

Also check out [PowerShell Send Signed Email using PFX File](http://www.example-code.com/powershell/smtp_sendSignedPfx.asp) and see if that helps. It relies on a third-party class, but there’s a download link provided.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/signed-email-using-powershell/1963/3 "2024-05-16T20:57:34Z")

</div>

Closed on May 16, 2024, 8:57pm UTC


