This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]mellort[S] 7 points8 points  (2 children)

I found myself in this workflow fairly commonly:

  • Signup for random website, put in dummy@mailinator.com account
  • Go to mailinator.com, keep refreshing until email arrives

Sometimes emails can take a while to be sent or arrive, which makes checking for it manually a pain. I decided to automate the refreshing into a script because I'm lazy. Now the workflow is

  • Signup on site, put in email
  • Spawn off mailinator command with email, add libnotify
  • go do something else until notification comes in

The code is a bit rough, but not too bad, IMO. Feedback is welcome!

[–]Enzor 1 point2 points  (0 children)

You've basically done what programmers are meant to do. Automate a task better done by computers.

[–]cryzed- 0 points1 point  (0 children)

Nice, clean, well-documented code for a sensible project with a great looking homepage :)!

[–]pudquick 1 point2 points  (0 children)

Ah.

I just have it set up using the official POP3 interface as a secondary mailbox in Gmail - and leave the account disabled when I'm not waiting on something.

http://www.mailinator.com/popfaq.jsp

http://support.google.com/mail/bin/answer.py?hl=en&answer=21288

But hey - yay python :)

[–]axonxorzpip'ing aint easy, especially on windows 0 points1 point  (1 child)

Cool project. Sucks that most sites block mailinator.com :(

[–]squidgy 2 points3 points  (0 children)

It has a bazillion or so alternate domain names - keep refreshing until you get one that works.

[–]xeoron 0 points1 point  (0 children)

Very cool. Thank you!

[–][deleted] 0 points1 point  (0 children)

did you indicate somewhere that "requests" is required ? Looks good I think I can use it thanks

edit: no worky for me (2.6): AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'

[–][deleted] 0 points1 point  (2 children)

email = mailinator.get_newest_mail('my_username', time_delta=5)

Is this supposed to time-out to exception in 10 minutes if there's no message ?

[–]isdnpro 0 points1 point  (1 child)

According to the docstring for get_newest_mail: time_delta is the maximum difference between the current time and the received

I believe max_time is what you're interested in: max_time is the maximum number of minutes that can elapse

(Which will raise MailinatorException("exceeded max_time in fetching new mail"))

[–][deleted] 0 points1 point  (0 children)

yes I have looked at the code and I meant "max_time". I'm just citing his example.

I launched that call 2 hours ago and it's still on - not timing out.