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(和语义释放)做魔术。