VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



VB.NET Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
SSH Key
SSH
SSH Tunnel
SFTP

Byte Array
VB.NET FTPS
System.IO

Unreleased...
Bzip2
LZW
Bz2
Icon

 

 

 

 

 

 

Send iso-8859-1 Email

VB.NET source code example to send an email using iso-8859-1 characters.

        Dim success As Boolean = False

        ' Create a mailman object for sending email.
        Dim mailman As New Chilkat.MailMan()

        ' Any string argument automatically begins the 30-day trial.
        mailman.UnlockComponent("30-day trial")

        ' Set the SMTP server.
        mailman.SmtpHost = "smtp.earthlink.net"

        ' Create an email that uses characters with diacritics (accented characters)
        Dim email As New Chilkat.Email()

        ' Set the basic email stuff: body, subject, "from", "to"
        email.Body = "Þ ß à á This is the email body"
        email.Subject = "Þ ß à á This is the email subject"
        email.AddTo("Þ ß à á", "support@chilkatsoft.com")
        email.From = "Þ ß à á <programmer@chilkatsoft.com>"

        ' Chilkat should automatically recognize this as having characters with diacritics,
        ' and will by default encode the email as iso-8859-1
        ' It is possible to verify this by examining the full MIME text of the email:
        MessageBox.Show(email.GetMime())

        ' The MIME that Chilkat generates for this email looks like this:
        '
        'MIME-Version: 1.0
        'Date: Thu, 02 Sep 2004 15:18:45 -0500
        'Message-ID: <CHILKAT-MID-d8e999ca-2691-48ef-9e10-abedbbaad1c1@DotNetDev>
        'X-Mailer: Chilkat Software Inc (http://www.chilkatsoft.com)
        'X-Priority: 3 (Normal)
        'Content-Type: text/plain;
        '	 charset="iso-8859-1"
        'Content-Transfer-Encoding: quoted-printable
        'subject: =?iso-8859-1?Q?=DE_=DF_=E0_=E1_This_is_the_email_subject?=
        'To: =?iso-8859-1?Q?=DE_=DF_=E0_=E1?= <support@chilkatsoft.com>
        'From: =?iso-8859-1?Q?=DE_=DF_=E0_=E1?= <programmer@chilkatsoft.com>
        'return-path: programmer@chilkatsoft.com
        '
        '=DE =DF =E0 =E1 This is the email body

        ' To be absolutely sure the email is encoded as iso-8859-1, set the Charset property:
        email.Charset = "iso-8859-1"
        ' One point to remember: Chilkat does not "Q" encode header fields that do not need encoding.
        ' (i.e. fields that are 7-bit us-ascii already and have no accented (8-bit) characters)

        success = mailman.SendEmail(email)
        If success Then
            MessageBox.Show("Sent email!")
        Else
            MessageBox.Show(mailman.LastErrorText)

        End If



Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · XML Parser