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 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) 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 20.1 ('Debugging')
Instant purchase and download via GumRoad!

COLUMN

Send Your Emails

How to use the MBS Xojo plugins to send emails

Issue: 20.1 (January/February 2022)
Author: Stefanie Juchmes
Author Bio: Stefanie studied computer science at the university in Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at Monkeybread Software.
Article Description: No description available.
Article Length (in bytes): 9,836
Starting Page Number: 62
Article Number: 20107
Resource File(s):

Download Icon project20107.zip Updated: 2022-01-02 19:45:03

Related Link(s): None

Excerpt of article text...

In this article I want to show you how you can send emails using the MBS Xojo plugins and what advantages this has for you. For this project we will work with the classes from the CURL section of the MBS plugins.

We want to design an email that contains a subject, a header, a footer, and text entered by the user. This email should then be sent to the specified recipient addresses. We can choose what kind of recipient we want to set. We can specify a normal recipient and/or set recipients in copy and blind copy. In addition, we can add one or more attachments to the email (see Figure 1).

The GUI

First we build the GUI through which we want to send the email. It contains the fields to specify the recipients with To, Copy, and blind copy. We also have a field where we can enter the subject and a text field where the content will be. Below this text field there is a label that shows whether there was an error while sending the mail and if so, what kind of problem it was. For us it is called Error_Label. Additionally there are the buttons Add an Attachment and Send (see Figure 2).

The Code

In the action event of the button Add an Attachmentwe place the file to be attached in a FolderItem that is available as the property Attachment in our window. You can choose the file in an open dialog. The code looks like this:

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