Article Preview
Buy Now
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):
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 buttonsAdd an Attachment
andSend
(see Figure 2).The Code
In the
action
event of the buttonAdd an Attachment
we place the file to be attached in aFolderItem
that is available as the propertyAttachment
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.