For programmers to need to send mail by python,this tested source code is useful.
It is available to send by SMTP and receiving POP3 or IMAP4.
TLS is supported for these connections and SMTP AUTH is available.
Specification
ID | STCD_0000000007 |
Language | Python |
Steps | 233 |
Purpose | Send and receive mail. |
Function | Send mail with SMTP. Receive mail with POP3. Receive mail with IMAP. |
Environment | Anaconda3(Python 3.9.7) IDE : Visual Studio Code smtplib mimetypes poplib ssl imaplib |
Restriction | free license You can use source code copy as owner . You can customize and distribute it freely. |
Price | 7 dollars or 700 yen (Pay with PayPal) |
References | https://docs.python.org/ja/3/library/email.message.html https://cercopes-z.com/Python/tips-mail-py.html https://www.hai2mail.jp/column/2021/1207.php https://qiita.com/takey/items/a7e843255da8052c64b8 https://docs.python.org/ja/3/library/poplib.html https://docs.python.org/ja/3/library/imaplib.html https://docs.python.org/ja/3/library/email.compat32-message.html |
Source Code
Test Result
NO | test case | result |
01 | send mail with SMTP. | OK |
02 | send mail attached files with SMTP. | OK |
03 | Retrieve mail with POP3. | OK |
04 | Retrieve mail with Imap. | OK |
Test Code
*) Modify “path” along your PC environment.
History
5/12/2022 created
Provider Profile
Nick name is “Dead Fish” employed as an engineer in Japan.
I am grad if you need my code.
Thanks !
Download
Get download passwordSTCD_0000000007
1 file(s) 0.18 KB
Following files and data are zipped.
├── MailClass.py ├── test1.txt ├── test2.png └── test3.zip
Remarks
None
Comments