A one file script to check, delete or write yopmail mails from command line
pip3 install beautifulsoup4
Other requirements should already be installed in a standard linux python3 environment
git clone https://github.com/law0/yopy.git
# In yopy git directory./yopy.py --helpusage: yopy.py [-h] [-v] [--show number] [--delete number] [--delete-all] [--send] mailpositional arguments: mail mail address (without the @yopmail.com)optional arguments: -h, --help show this help message and exit -v, --verbose increase output verbosity --show number show mail with given number --delete number delete mail with given number --delete-all delete all mails in the inbox --send send an mail, reading from stdin Note that the mail must have the form: To: ADRESSE Subject: SUBJECT CONTENT
Default usage, without args -> list the mails:
$ ./yopy.py mail_test_yopy0 from:'mail_test_yopy2@yopmail.com', subject:'test2'1 from:'mail_test_yopy2@yopmail.com', subject:'test1'
The first number can be used to show a mail:
$ ./yopy.py mail_test_yopy --show 1From: mail_test_yopy2@yopmail.comSubject: test1Does it work ?
Or delete one:
$ ./yopy.py mail_test_yopy --delete 1$ ./yopy.py mail_test_yopy0 from:'mail_test_yopy2@yopmail.com', subject:'test2'
To write a mail use redirection from a file or heredoc:(Works even if the sending mail doesn't exist yet)
$ ./yopy.py mail_test_yopy2 --send << EOF> To: mail_test_yopy> Subject: test5> > Works fine> It seems> EOF$ ./yopy.py mail_test_yopy0 from:'mail_test_yopy2@yopmail.com', subject:'test5'1 from:'mail_test_yopy2@yopmail.com', subject:'test3'2 from:'mail_test_yopy2@yopmail.com', subject:'test2'$ ./yopy.py mail_test_yopy --show 0From: mail_test_yopy2@yopmail.comSubject: test5Works fineIt seems$ ./yopy.py mail_test_yopy --show 1From: mail_test_yopy2@yopmail.comSubject: test3Youpi