User Tools

Site Tools


Sidebar

Network and communication

k24:k24.4:k24.4.1:start

24.4.1 SMTP client

The SMTP-Client project provides you with a fully-fledged SMTP client. Almost all properties and methods of the class SmtpClient as well as the most important constants of the Net class are used. To manage e-mail accounts, you can call up a manager (→ Chapter 24.3.4) in the menu.

B1
Figure 24.4.1.1: GUI SMTP client

The complete project is provided in the download area. We will therefore not present the source code. The introduction to working with the SMTP client and the manager for e-mail accounts is more comprehensive. Numerous illustrations support the description.

24.4.1.1 Starting the programme

When the programme is started for the first time, a hidden directory is created in the user's home directory where the configuration file is saved. The SMTP client as well as the manager access this configuration file. You will be informed that no e-mail account exists yet:

B2
Figure 24.4.1.1: Message

24.4.1.2 Working with the Manager for EMail Accounts - Basic Data

Then a dialogue window of the Manager for EMail Accounts is started. You can enter the basic data for the e-mail account:

B3
Figure 24.4.1.2.1: Dialogue for basic data

OK' saves the data entered in the form in the newly created configuration file in the existing hidden directory. The name is optional. It is the name that the reader of an email reads in the line containing the email address of the sender of the email. When the window is closed, the manager starts.

24.4.1.3 Working with the manager for email accounts

B4
Figure 24.4.1.3.1: Account manager

With the manager you can

  • add another email account,
  • modify an existing email account (basic data, data for SMTP and POP3) or
  • delete an existing account.

24.4.1.4 Working with the Manager for EMail Accounts - SMTP Data

In order to work with the SMTP client, further (SMTP) details are required in addition to the basic data. A click on the SMTP entry for the edited account in the treeview opens another dialogue window:

B5
Figure 24.4.1.4.1: SMTP dialogue box

Some default values are already selected - all others have to be entered according to the specifications of your provider. Attention: For Freenet and T-Online the user name is the complete e-mail address. Press 'OK' to close the dialogue and return to the manager:

B6
Figure 24.4.1.4.2: Account Manager

You could now close the manager and thus start the SMTP client for the first time.

However, it is recommended that you also complete the account data with the POP3 details so that they are also available to a POP3 client later:

B7
Figure 24.4.1.4.3: POP3 Dialogue

You can only select the authentication option 'Password encrypted (APOP)' in the figure on the right if you are sure that the POP3 server also offers this method of authentication - for example, the POP3 server of Freenet.

With 'OK' this dialogue is also closed and you return to the manager:

B8
Figure 24.4.1.4.4: Account Manager

The details of the first account are now complete and 2 more accounts are added here:

B9
Figure 24.4.1.4.5: Account manager with 3 email accounts.

You can fold or unfold the display in the TreeView with the two buttons below the account overview if you have more than one account.

24.4.1.5 SMTP Client

Closing the manager opens the SMTP client with the currently edited email account. Therefore, the sender email address is already entered:

B10
Figure 24.4.1.5.1: SMTP client

Now you can make all relevant entries and optionally add attachments. You can delete individual attachments via the context menu in the list. You can enter several e-mail addresses (To:, Copy (CC): or Blind Copy (BCC):) as a list - with a comma as separator.

Before sending, the mandatory entries are checked:

  • A missing recipient address is indicated.
  • The specification of a subject is necessary.
  • A missing message text is noticed and a corresponding note is output.
  • All entered email addresses are checked for correct syntax.

When you send the email, the email is transferred to the SMTP server (MTA) for forwarding.

B11
A progress symbol in front of the button 'Send EMail' informs about the sending process.

If no error occurred, you will receive a success message:

B12
Figure 24.4.1.5.2: Success!

Download

Project

Download

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k24/k24.4/k24.4.1/start.txt · Last modified: 16.08.2022 (external edit)

Page Tools