You'll notice a number of fields that need to be populated (e.g. App Name and the Config Variables). Choose an App name, and populate the API credentials fields with your production API credentials from Phaxio.
Skip to section 2 below.
git clone https://github.com/phaxio/phax_machine.git && cd phax_machine
heroku config:set PHAXIO_API_KEY=your_api_key
heroku config:set PHAXIO_API_SECRET=your_api_secret
git push heroku master
phaxmail.myapp.com. If you don't want to configure your own domain, you can use the sandbox domain already in your Mailgun account, but you'll have to manually add permitted user emails for the domain on Mailgun. If you're using the sandbox domain, you can skip to step 4 below.
[0-9]+@phaxmail.myapp.com. Then, under "Actions", tick the "Forward" box and enter the URL for your instance of PhaxMachine, followed by
/mailgun(e.g. If you're using a quick and dirty Heroku installation, this url might look something like https://WHATYOUNAMEDYOURAPP.herokuapp.com/mailgun.) The other fields should be left alone, and once you're finished click the "Create Route" button.
firstname.lastname@example.org(substituting the phone number and domain). Phone Numbers should not contain any special characters. If everything is set up correctly, you should have just sent a fax.
Head to the Callback URL's page in Phaxio.
In the second field which says "POST (or send email) to the above URL when a fax has been received," enter your application url followed by '/fax_received' (e.g. If you're using a quick and dirty Heroku installation, this url might look something like https://WHATYOUNAMEDYOURAPP.herokuapp.com/fax_received. Note: if you're using the quick and dirty setup, your faxing emails might be in your spam folder! )
(Optional) Test the everything is working correctly by sending a fax to your Phaxio number and and seeing if it shows up in your email inbox! Note: make sure to check your spam folder!
If you want to merge the latest code from this repository into a PhaxMachine instance deployed with the button above, you'll need to follow these instructions:
git clone https://github.com/phaxio/phax_machine.git
git remote add heroku https://git.heroku.com/HEROKU-APP-NAME.git(Substituting
HEROKU-APP-NAMEwith the name of your Heroku app)
git push heroku master