Implementação para funcionalidades básicas do MailTrap usando Python.
Tudo que você precisa é Python versão 3.6 ou acima
pip3 install mailtrap-handlerPara documentação dedicada, clique aqui
from mailtrap_handler import MailTrapHandler
mailtrap = MailTrapHandler ( TOKEN , ACCOUNT_ID )
# then do what you need with the mailtrap objectObtenha ID de e -mail:
# 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 idsObtenha o conteúdo HTML de e -mail:
# 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 contentLimpe a caixa de entrada:
MailTrapHandler . clean_inbox ( inbox )Exclua o correio -alvo:
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! Congratulamo -nos com questões e puxamos pedidos contra este repositório!
Este repositório segue commits convencionais
<type>(optional scope): <description> Exemplo: feat(pre-event): Add speakers section
Os tipos disponíveis são:
feat: Add table on landing page , feat: Remove table from landing pagefix: Illustration overflows in mobile view Rótulos por página Ex: feat(pre-event): Add date label
Se não houver escopo, você não precisa escrever
Descrição deve explicar completamente o que está sendo feito.
Adicione a mudança de mudança na descrição se houver uma mudança significativa.
Se houver várias alterações, então comece um por um
feat: Add somethingfix , indique o problema ex: fix: File size limiter not workingComprometa-se de acordo com a Spec Spec acima e deixe o Circleci (e o Renomado Semântico) fazer a magia.