Prerequisites: a. Basic Server (Debian 10.3 64bit) with Webmin, FTP, Firewall, iRedmail and Basic 3-page Flask Website functioning
Lastly, that one has created an email address such as 'info@example.com'
Via iRedadmin (eg. https://example.com/iredadmin), create a user's mailbox 'info' in one's own domain (eg. info@example.com).
From the first Flask website, there is the contactus page but without a form to create and send mail messages. To embed and activate such a form, one needs to install Flask WTF and Flask Mail on both the PC and server python environments.
On the PC, via 'PowerShell'[Win10] or in Win 7+, typing in 'cmd' to get the console:
Download the Enhanced 3-page Flask Website here and unzip the contents of this file to the PC's 'myapp' directory:
Modify myproject.py to change 'example.com' with your domain.
To test the new configuration, enter in the PC's browser, http://localhost:5000, the earlier three page Flask website should appear but with a contact form in 'Contact Us'.
Note: No email can be sent from the PC (no mailserver installed).
Prepare the server for Flask Mail
Via a FTP client (eg. Filezilla), transfer a of copy the modified myproject.py file of the PC's 'myapp' folder into corresponding server 'myapp' directory together with the other directories [templates, static] replacing the existing ones on the server.
With the browser: Enter one's domain at port:5000 (eg. http://example.com:5000), the same three page Flask website should appear with a functional mailform in 'contactus'. Test the mailform. If successful, use the key-combo 'ctl'+c to exit.
Flask