-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
tempmailplus.py
34 lines (20 loc) · 871 Bytes
/
tempmailplus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from account_generator_helper import TempMailPlus
from account_generator_helper.temp_mail.tempmailplus import Domains
mail = TempMailPlus()
print('Mail :', mail.set_email('test-mail', Domains.MAILTO_PLUS)) # Mail : test-mail@mailto.plus
for _letter in mail.get_inbox():
print('Letter :', _letter) # Letter : <Letter ...>
print('Letter content :', _letter.letter) # Letter content : ...
@mail.letter_handler()
def new_mail(letter):
print('New mail :', letter)
@mail.letter_handler(from_email='den70007.ua@gmail.com')
def test_from(letter):
print('Test from :', letter)
@mail.letter_handler(re_subject='.* test .*')
def test_re_subject(letter):
print('Test re subject :', letter)
@mail.letter_handler(from_email='den70007.ua@gmail.com', subject='Test letter')
def test_handler(letter):
print('Test handler :', letter)
mail.poling()