Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
|
Add S/MIME Signature using PFXAdd a digital signature to a MIME message using the certificate + private key from a PFX file. LOCAL loMime LOCAL lnSuccess LOCAL loCert LOCAL lcPfxFilepath LOCAL lcPfxPassword loMime = CreateObject('Chilkat.Mime') lnSuccess = loMime.UnlockComponent("Anything for 30-day trial") IF (lnSuccess = 0) THEN ? loMime.LastErrorText QUIT ENDIF * Load a PFX file into a certificate object. loCert = CreateObject('Chilkat.Cert') lcPfxFilepath = "pfxFiles/something.pfx" lcPfxPassword = "secret" lnSuccess = loCert.LoadPfxFile(lcPfxFilepath,lcPfxPassword) IF (lnSuccess = 0) THEN ? loCert.LastErrorText QUIT ENDIF loMime.SetBodyFromPlainText("This is the plain-text MIME body.") loMime.Charset = "utf-8" loMime.Encoding = "quoted-printable" * Sign the MIME: lnSuccess = loMime.AddDetachedSignature(loCert) IF (lnSuccess = 0) THEN ? loMime.LastErrorText QUIT ENDIF * Save the S/MIME to a file. lnSuccess = loMime.SaveMime("c:/temp/signedMime.txt") IF (lnSuccess = 0) THEN ? loMime.LastErrorText QUIT ENDIF =MESSAGEBOX("success!") |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser