Send-SMIMEEmail Cmdlet
Parameters Output Objects Configuration Settings
The Send-SMIMEEmail cmdlet is used to send Signed and Encrypted Internet mail using the SMTP protocol (the Internet mail standard).
Syntax
Send-SMIMEEmail [parameters]
Remarks
This cmdlet is the SMIME enabled equivalent of SENDEMAIL. In addition to implementing a standard SMTP client as specified in RFC 821, the cmdlet can sign and/or encrypt messages in a PKCS envelope.
To send a message, set the Server, To, Subject, From, and Message parameters.
The CertStoreType, CertStore, CertPassword, and CertSubject parameters specify the signing certificate.
The RecipientCertStoreType, RecipientCertStore RecipientCertPassword, and RecipientCertSubject parameters specify the encryption certificate.
Additional recipients can be set with the CC and BCC parameters. To specify multiple recipients, in the To, CC, and BCC parameters, simply specify the destination email addresses separated by commas.
One or more attachments can be added by setting the Attachment parameter. HTML Messages may be sent by setting the MessageHTML parameter.
The CertStoreType, CertStore, CertPassword, and CertSubject parameters specify the decryption certificate.
The SignerCertStoreType, SignerCertStore SignerCertPassword, and SignerCertSubject parameters specify the recipient's public certificate used for signature verification.
#Decrypt a message
Get-SMIMEIMAP -Server mailserver -User test -Password test -view 123 -SMIME Decrypt -CertStore c:\mine.pfx -CertStoreType PFXFile -CertPassword test -CertSubject *
#Verify the signature of a message
Get-SMIMEIMAP -Server mailserver -User test -Password test -view 124 -SMIME Verify -SignerCertStoreType PublicKeyFile -SignerCertStore c:\sender.
public
.cer -SignerCertSubject *
#Decrypt and Verify the signature
Get-SMIMEIMAP -Server mailserver -User test -Password test -view 125 -SMIME DecryptAndVerify -CertStore c:\mine.pfx -CertStoreType pfxfile -CertPassword test -CertSubject * -SignerCertStore c:\sender.
public
.cer -SignerCertSubject * -SignerCertStoreType PublicKeyFile
Connection Handling
This cmdlet supports persistent connections through the Connection parameter. To establish a new SMIMEEmail connection, use the Connect-SMIMEEmail cmdlet. To close the connection, use the Disconnect-SMIMEEmail cmdlet.
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
Connection | An already established connection. |
LogFile | The location of a file to which debug information is written. |
Attachment | The path to any files which are to be attached to the message. |
BCC | A comma separated list of addresses for blind carbon copies (optional). |
CC | A comma separated list of addresses for carbon copies (optional). |
CertPassword | The password to the certificate store. |
CertStore | The name of the certificate store for the signing certificate. |
CertStoreType | The type of certificate store for the decryption certificate. |
CertSubject | The subject of the certificate used for decryption. |
Config | Specifies one or more configuration settings. |
Credential | The PSCredential object to use for user/password authentication. |
FirewallHost | Name or IP address of firewall. |
FirewallPassword | A password if authentication is to be used when connecting through the firewall. |
FirewallPort | The port of the firewall to which to connect. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
Force | Forces the cmdlet to accept the default behavior instead of querying the user. |
From | The email address of the sender (required). |
Importance | Importance of the mail message. |
LocalIP | The IP address of the local interface to use. |
LogFile | The location of a file to which debug information is written. |
Message | The full text of the message to be sent (without headers). |
MessageHTML | The full text of the HTML message to be sent (without headers). |
MessageId | Sets the message Id used by the cmdlet. |
Password | The password to use for authentication. |
Port | The TCP port in the remote host to which to connect. |
RecipientCertPassword | The password to the certificate store. |
RecipientCertStore | The name of the certificate store for the encryption certificate. |
RecipientCertStoreType | The type of certificate store for the signature verification certificate. In most cases PublicKeyFile is used. |
RecipientCertSubject | The subject of the recipient's public certificate used for encryption. |
ReplyTo | The email address to which replies should be sent. |
Server | The address of the Server. |
SMIME | Specifies the protection level on the outgoing messages. |
Subject | The subject of the email. |
Timeout | The maximum time allowed for the operation. |
To | A comma separated list of addresses for destinations. |
User | The username to use for authentication. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
Configuration Settings
The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.
UseBackgroundThread | Whether threads created by the cmdlet are background threads. |
UseInternalSecurityAPI | Tells the cmdlet whether or not to use the system security libraries or an internal implementation. |