python mailtrap handler
0.2.0
使用Python實現MailTrap基本功能。
您只需要Python版本3.6或更高版本
pip3 install mailtrap-handler有關專用文檔,請單擊此處
from mailtrap_handler import MailTrapHandler
mailtrap = MailTrapHandler ( TOKEN , ACCOUNT_ID )
# then do what you need with the mailtrap object獲取郵件ID:
# default value for title is None
list_of_ids = mailtrap . get_mail_id ( inbox , email , title = "Some Title here" )
# returns a list of found mails ids獲取郵件HTML內容:
# default value for title is None
# default value for waiting_time is 0
MailTrapHandler . get_mail ( inbox , email , title , waiting_time = 30 )
# returns mail html content清潔收件箱:
MailTrapHandler . clean_inbox ( inbox )刪除目標郵件:
MailTrapHandler . delete_mail ( inbox , email , title = "Some Title here" )
# default value for title is None from mailtrap_handler import MailTrapHandler
# requirements
token = "123wellthiswouldbeyourtokenhere098"
account_id = 987654
inbox = 12349876 # this is your mailtrap inbox id
email = "[email protected]"
title = "Oy! Congrats on getting Your new T-shirt"
# creating mailtraphandler object
mailtrap = MailTrapHandler ( token , account_id )
# getting the html content
mails = mailtrap . get_mail ( inbox , email , title = title , 10 )
# we do now whatever we need with the recieved mails
# and now we delete this mail
mailtrap . delete_mail ( inbox , email , title = title )
# you know what let's just delete every mail in the inbox
mailtrap . clean_inbox ( inbox )
# I got no more mails! 我們歡迎問題並提出針對此存儲庫的請求!
此存儲庫遵循傳統提交
<type>(optional scope): <description>示例: feat(pre-event): Add speakers section
可用類型是:
feat: Add table on landing page , feat: Remove table from landing pagefix: Illustration overflows in mobile view每頁標籤ex: feat(pre-event): Add date label
如果不需要範圍,則不需要寫
描述必須充分說明正在做什麼。
如果發生重大變化,則在描述中添加破壞變化。
如果有多個更改,則一一提交
feat: Add somethingfix類型時,請陳述問題: fix: File size limiter not working根據上面的語義發行規范進行提交,讓Circleci(和語義釋放)做魔術。