I done this before but don't have the code handy. Here is how I done it though I was using gmail.
Firstly sometimes gmail marks those confirmation emails as spam. So to counteract it you need to create a filter with a really long string such as dkughrdhglisdrhguirt84 and tell gmail any email that doesn't have this is not spam.
Next install an imap php class. Not sure which one I used but there are a few.
Find a tutorial on using php with gmail (pretty easy to do).
Your code will then be able to turn the email body into a string where you will just need to regex your link and Curl it.
Hopefully this is enough to get you started or someone else might just post a ready made script.