Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Decode Base64 MIME BodyDecoding a MIME body from Base64. LOCAL loMime LOCAL lnSuccess LOCAL lcMimeStr1 LOCAL loMime2 LOCAL lcDecodedBody loMime = CreateObject('Chilkat.Mime') lnSuccess = loMime.UnlockComponent("Anything for 30-day trial") IF (lnSuccess = 0) THEN =MESSAGEBOX("Failed to unlock component") QUIT ENDIF * Create MIME with base64 encoding: loMime.SetBodyFromPlainText("This is a test") loMime.Charset = "windows-1252" loMime.Encoding = "base64" lcMimeStr1 = loMime.GetMime() ? lcMimeStr1 ? "-------------------------------" * Output looks like this: * Content-Type: text/plain; * charset="windows-1252" * content-transfer-encoding: base64 * * VGhpcyBpcyBhIHRlc3Q= * Load the MIME into another Chilkat MIME object: loMime2 = CreateObject('Chilkat.Mime') loMime2.LoadMime(lcMimeStr1) * Get the MIME body decoded: lcDecodedBody = loMime2.GetBodyDecoded() * Prints: this is a test ? lcDecodedBody |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser