Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 12.2 ('Inefficiencies')
Instant purchase and download via GumRoad!

FEATURE

Inside Email

About the EmailMessage class and SMTPSocket

Issue: 12.2 (March/April 2014)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software Xojo/Real Studio Plugins.
Article Description: No description available.
Article Length (in bytes): 10,071
Starting Page Number: 15
Article Number: 12204
Resource File(s):

Download Icon project12204.zip Updated: 2014-03-03 00:47:57

Related Link(s): None

Excerpt of article text...

In a lot of projects we use the EmailMessage class and the SMTPSocket to send emails to people. For example, your web app can email people their login password or email yourself status information every morning. Also, you can email newsletters, serial numbers, or invoices from your apps.

The EmailMessage class

The EmailMessage class represents an email message. It has properties to various headers of the email and also properties for content and attachments. You can compose an email using those properties and later query the source of the email. Or, you receive an email as text file and assign the raw email data to the source property to parse it.

Please note that the source is generated for you each time and generating source can update the headers, so a second source call may give a different result. Also, if you assign and query, you do not receive the exact same source data.

The Properties

First you can assign a subject with the subject property. Be aware that inline encodings of emails are not supported by the EmailMessage class, so you can only assign ASCII text here.

...End of Excerpt. Please purchase the magazine to read the full article.