DEV Community

Dexter
Dexter

Posted on

FS PBX Email to Fax integration using Postmark Inbound Email Parsing

This is a submission for the Postmark Challenge: Inbox Innovators.

What I Built

I built a seamless email-to-fax module as part of FS PBX, a FreeSWITCH-based business phone system. This new feature allows users to send faxes simply by emailing an attachment to a formatted Postmark email address. The system parses the incoming email, processes attachments, and delivers the fax using FreeSWITCH. All status notifications, including errors, are sent back to the user via Postmark, creating a smooth and reliable faxing experience directly from any email client.

Demo

To send a fax with FS PBX:

1. Compose an email:

In the “To” field, enter the 10-digit destination fax number (no spaces or dashes) followed by @fax.yourdomain.com
Example: 9093655050@fax.yourdomain.com

2. Add your company’s fax number in the Subject field (optional).

If you want to include a cover page, add the word body to the subject and place your cover text in the email body.

3. Attach your document.

Supported file types: .pdf, .doc, .docx, .rtf, .xls, .xlsx, .csv, .txt.

Send the email.

Code Repository

https://github.com/nemerald-voip/fspbx
The fax module and Postmark integration are included in the project.
See app/Http/Webhooks/Jobs/ProcessPostmarkWebhookJob.phpand app/Models/Faxes.php (EmailToFax function)

How I Built It

  • Stack:

    • FreeSWITCH for telephony/faxing
    • Laravel for backend logic
    • Postmark for inbound and outbound email handling
    • Vue.js for the admin front end
  • Integration:

    • Inbound faxes:

      Users send faxes by emailing attachments to @fax.nemerald.com. Postmark's inbound webhook delivers the parsed email as JSON to FS PBX.

    • Processing:

      FS PBX extracts the destination number, source number (if present), and any cover page text. It saves the attachment, then launches a FreeSWITCH script to send the fax to the destination.

    • Notifications:

      The app sends back a confirmation or error notice via Postmark, detailing the fax status. If there are errors (e.g., invalid attachment, transmission failure), users get a descriptive email so they can quickly resolve the issue.

  • User Experience:

    No portals, plugins, or learning curves---just email your fax and get instant feedback. The system is designed for reliability and ease of use, making faxing as simple as sending an email.

Team:
Solo submission

Image description

Top comments (0)