Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Create Multipart/Alternative MIMECreate a simple multipart/alternative MIME message. LOCAL loMime LOCAL lnSuccess LOCAL loPtMime LOCAL loHtMime loMime = CreateObject('Chilkat.Mime') lnSuccess = loMime.UnlockComponent("Anything for 30-day trial") IF (lnSuccess = 0) THEN =MESSAGEBOX("Failed to unlock") QUIT ENDIF * Make this a multipart/alternative MIME message: loMime.NewMultipartAlternative() * Create a plain-text part and add it to the multipart/alternative MIME. loPtMime = CreateObject('Chilkat.Mime') loPtMime.SetBodyFromPlainText("This is the plain-text body") loMime.AppendPart(loPtMime) * Now do the same for HTML: loHtMime = CreateObject('Chilkat.Mime') loHtMime.SetBodyFromHtml("<html><body>This is the HTML body</body></html>") loMime.AppendPart(loHtMime) * Show the full multipart/alternative MIME text which includes both parts: ? loMime.GetMime() * Need to change the boundary string? loMime.Boundary = "__NewBoundaryString__123" * Need to change the charset? loPtMime = loMime.GetPart(0) loPtMime.Charset = "utf-8" loHtMime = loMime.GetPart(1) loHtMime.Charset = "utf-8" * Need to change the encoding? loHtMime.Encoding = "base64" * Now show the MIME again: ? "---- After Changes ----" ? loMime.GetMime() |
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