8.3. howdy_email_demo_gui
This is a test-bed platform for creating and sending HTML emails using reStructuredText. Its functionality and behavior intersects significantly with howdy_email_gui. The help output, when running howdy_email_demo_gui -h
, produces the following output,
usage: howdy_email_demo_gui [-h] [--info] [--noverify]
optional arguments:
-h, --help show this help message and exit
--info Run info mode if chosen.
--noverify Do not verify SSL transactions if chosen.
Here are the command line arguments,
--info
prints outINFO
levellogging
output.--noverify
is a standard option in many of the Howdy CLI and GUIs to ignore verification of SSL transactions. It is optional and will default toFalse
.
Here is the main window that pops up when running howdy_email_demo_gui --noverify
.
The first sections detail the standard work flow of sending an email into five steps, in order.
However, you can do steps 1-4 in any order before sending the email. In addition, I describe the following optional functionalities.
I send from myself (Tanim Shahriar Islam
) and send only to myself, but to different email addresses I control, in this demonstration.
8.3.1. Specifying a sender
First, we specify a sender by clicking on the FROM
button.
Second, once this dialog window opens, specify at least the email. Completion functionality exists when setting both the email address and the recipient.
If you choose an email address that is already known, the sender’s name is automatically filled out. Even though names can be completed, the email address won’t be specified even if you choose a known contact name. This happens because a contact can have multiple email addresses.
Third, once you have chosen a sender email, and optionally a sender name, then you can close this dialog window by clicking the upper left close box, or typing Ctrl+W1
on Windows and Linux or Cmd+W
on Mac OS X.
8.3.2. Selecting recipients
You can then select recipients by clicking on the TO
button. Here we start from Fig. 8.20. This will open up a dialog window that allows you to add and optionally remove email addresses.
Next, you can add recipients individually. In the dialog window launched in Fig. 8.21, either launch a context menu (right-click your mouse) or press Ctrl/Cmd+A
.
Finally, once you have specified the first recipient’s email and (optionally) name, press Shift+Ctrl/Cmd+A
to add that recipient.
Subsequent recipients can be added by going through new contacts as shown in Fig. 8.22 and then Fig. 8.23. However if you specify a name or the email address matches all or in part to an address that already exists in that recipient table, then that email address won’t be added – this machinery thinks you have already added this recipient, so why add them again?
Fig. 8.25 shows how to remove a specific email from the list of recipients.
One can also go to an existing recipient in the table, and change their email address or name.
However, just as in Fig. 8.23, if we change the name or email to something that matches whatever is already in the table of recipients, then that contact will not be changed – like before, this machiinery will not let you add a recipient that is already in the table.
If you have many (say \(\ge 20\)) recipients, filtering functionality can be useful.
You can do a regex filtering by specifying a filter string on the FILTER
dialog box at the top of this TO
recipient dialog window.
Once you are done specifying your recipients, you can upper-left click on the close box of this recipient dialog window, or press Ctrl/Cmd+W
. This will hide
this recipient dialog window. If you click TO
again, then you will see the recipients you have already specified.
8.3.3. Writing out the subject
Next, just write out the subject into the SUBJECT
dialog box. The subject cannot be blank. Once you are satisfied, press Enter
or Return
in this line. The subject will have all white spaces removed.
8.3.4. Writing and verifying the email
Now that you have specified a sender, recipients, and subject, you can write an email. You can write some valid reStructuredText into the main text area described in Fig. 8.17, and then click on CONVERT
to render the HTML. One can find some good tutorials on how to write valid reStructuredText online or on the Sphinx website. I have included this example restructuredText file
that allows one to independently verify how this reStructuredText renders. This is the example file shown in Fig. 8.29.
8.3.5. Sending the email
Finally, once you have sender, recipients, subject, and email, you can send the email out. Just click SEND
, and the email should go to your TO
recipients. The sender, usually yourself, will also receive a BCC
email, to allow you to record and archive this email if needed.
8.3.6. Optional functionalities
In addition to the required operations needed to send emails with a subject and body, from a single sender to multiple TO
recipients, there are five other functionalities that can be used to assist or enhance the emails you choose to send out. These optional functionalities are specified in a context menu that is launched from empty real estate in the main email dialog window, as shown in Fig. 8.17.
8.3.6.1. Specifying CC
and BCC
recipients
One can also specify CC
and BCC
recipients. The CC
and BCC
dialog recipients look very similar, and have the same functionality, as the TO recipients. The only difference is that the recipients are CC
’d and BCC
’d, respectively.
To select the CC
or BCC
recipients, right-click to launch a context menu event in the empty real estate inside main email dialog window: outside the email text area and outside the subject dialog box. Choose the CC
or BCC
context menu item to specify CC
or BCC
recipients, respectively.
The CC
and BCC
recipient dialog windows look very similar to the TO recipients dialog window.
8.3.6.2. Identifying and selecting PNG images
You can specify the PNG images from your main Imgur library. To select your PNG images, right-click to launch a context menu event in the empty real estate inside main email dialog window.
The PNG image dialog window operates the same as what is described in Section 8.2.1.1 for howdy_email_gui.
8.3.6.3. Loading and saving reStructuredText
Often times, the email you want to send is fairly complicated reStructuredText. It is either hard to remember or reconstruct the document, so you may find it useful to save it to a file (keeping you from starting from scratch if you made a mistake), or load it from a file (if you had made a mistake in your email).
To save the email to a reStructuredText file, let us start from the email we have sent out, taken from example restructuredText file
. In some empty real estate, right-click to launch the context menu and select SAVE RST
. Save the file with some .rst
suffix.
Likewise, to load a reStructuredText file into the email, right-click on some empty real estate and select LOAD RST
.
This will fill the email text area with that reStructuredText file. You can then click on CONVERT
to verify that this is the email you want to send.