If you want to specify the font, color or insert pictures in your email, you should use Html email format instead of Plain text email format.
The following example codes demonstrate how to send HTML email using SMTP server.
Before you can use the following sample codes, you should download the EASendMail Installer and install it on your machine at first.Add Reference of EASendMail ActiveX Object to VB6 Project
To use EASendMail SMTP ActiveX Object in your project, the first step is "Add reference of EASendMail to your project". Please choose menu->"Project" -> "References"- > and choose the "EASendMailObj ActiveX Object", click "OK", the reference of EASendMail ActiveX Object will be added to your project, and you can start to use EASendMail to send email in your VB6 project.
After you received the email by your email client, the body text is like this:
Of course, you don't have to write the HTML source body text in your application manually. You can build a html file with HTML tools and use ImportMailEx method to import the html file directly.
You can also refer to the htmlmail.xx samples in EASendMail Installer. Those samples demonstrate how to build a HTML email editor and send HTML email with attachment or embedded images/pictures.
If you have any comments or questions about above example codes, please click here to add your comments.
Free Email Support
Not enough? Please contact our technical support team.
We usually reply emails in 24hours. The reason for getting no response is likely that your smtp server bounced our reply. In this case, please try to use another email address to contact us. Your Gmail, Hotmail or Yahoo email account is recommended.