PowerTCP Mail for .NET
ToSmime(EncodingMethod,Certificate,SigningMethod,ArrayList,EncryptingMethod) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > MessageStream Class > ToSmime Method : ToSmime(EncodingMethod,Certificate,SigningMethod,ArrayList,EncryptingMethod) Method




encodingMethod
The form of S/MIME encoding to be applied to the message.
signingCertificate
The Certificate to use when signing a message (in/out). If the provided certificate is null or it's EmailAddress property does not match the sender's, then the user's "My" certificate store will be search for a matching certificate, and will be used to update this parameter.
signingMethod
The signing method to use.
encryptingCertificates
An optional ArrayList of certificates to be used if encrypting a message (can be null). This list is updated with any additional certificates retrieved from the user's "AddressBook" certificate store.
encryptingMethod
The encryption method to use.
Returns a MessageStream that was encoded using the specified EncodingMethod, obtaining needed certificates from the provided ArrayLists.

Syntax

Visual Basic (Declaration) 
Public Overloads Function ToSmime( _
   ByVal encodingMethod As EncodingMethod, _
   ByRef signingCertificate As Certificate, _
   ByVal signingMethod As SigningMethod, _
   ByVal encryptingCertificates As ArrayList, _
   ByVal encryptingMethod As EncryptingMethod _
) As MessageStream
Visual Basic (Usage)Copy Code
Dim instance As MessageStream
Dim encodingMethod As EncodingMethod
Dim signingCertificate As Certificate
Dim signingMethod As SigningMethod
Dim encryptingCertificates As ArrayList
Dim encryptingMethod As EncryptingMethod
Dim value As MessageStream
 
value = instance.ToSmime(encodingMethod, signingCertificate, signingMethod, encryptingCertificates, encryptingMethod)

Parameters

encodingMethod
The form of S/MIME encoding to be applied to the message.
signingCertificate
The Certificate to use when signing a message (in/out). If the provided certificate is null or it's EmailAddress property does not match the sender's, then the user's "My" certificate store will be search for a matching certificate, and will be used to update this parameter.
signingMethod
The signing method to use.
encryptingCertificates
An optional ArrayList of certificates to be used if encrypting a message (can be null). This list is updated with any additional certificates retrieved from the user's "AddressBook" certificate store.
encryptingMethod
The encryption method to use.

Return Value

MessageStream object that is S/MIME encoded.

Remarks

When not specified the default EncodingMethod is EncodingMethod.SignDetached.

When not (or incorrectly) specified, the certificate used for signing is retrieved from the "My" certificate store for the current user. The email address of the sender is used to identify the required certificate.

When not specified, the default signing method is SigningMethod.Md5 and the default form of encryption used is EncryptingMethod.TripleDes.

When not (or incorrectly) specified, the certificates used for encrypting is retrieved from the "AddressBook" certificate store for the current user. The email address of each recipient is used to locate the required certificate.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.