General discussion

Locked

FaxPress - Using Telnet with PDF Attachments, Email to Fax

By Logick1 ·
Many people have asked about sending Email-to-Fax programmatically using FaxPress. We use
FaxPress 5000. You need to install the FaxPress SMTP Gateway to convert between SMTP and the proprietary Castelle Program Interface (CPI). You can then address the SMTP Gateway like any other SMTP server. The transcript below is a working Telnet example. If you can get your application to submit the data in this format, you're good to go. Note that the
Content-Type:application/octet-stream, line breaks before & after boundaries, and From: header are all necessary. Content-Type:application/pdf does NOT work (PDFs are Faxed using Content-Type:application/octet-stream). The PDF was converted to Base 64 using base64.exe
base64 -e myfile.pdf myfile2.pdf
The procedure is: Open myfile2.pdf (the Base 64 output of the operation above) in Notepad, Select All, Copy to copy/paste buffer, paste into the SMTP dialogue in the DOS window (see below) using Edit -> Paste menu of DOS Window. base64 of the 338 KB PDF file is about 462 KB. In this example, 91234567@10.10.10.100 is the target Fax number (prefixed with 9 to get an outside line), followed by the IP address of the FaxpPress 5000. It's set up in Faxmain to use our SMTP server for delivering response emails etc. 10.20.20.200 is the address of the FaxPress SMTP Gateway.

C>telnet 10.20.20.200 25
220 mycomputer FaxPress email Gateway is ready at Mon, 14 Sep 2009 11:20:12 Eastern Daylight Time
helo mycompany.com
250 mycomputer Hello mycompany.com
mail from:<me@mycompany.com>
250 <me@mycompany.com> Sender OK
rcpt to:<91234567@10.10.10.100>
250 <91234567@10.10.10.100> Recipient OK
data
354 Ready to receive data

To: me@mycompany.com
From: me@mycompany.com
Subject: Testing FaxPress - Attachments
MIME-Version: 1.0
Content-Type:multipart/mixed;boundary="KkK170891tpbkKk__FV_KKKkkkjjwq"
--KkK170891tpbkKk__FV_KKKkkkjjwq
Content-Type: text/plain; charset=US-ASCII
testing
--KkK170891tpbkKk__FV_KKKkkkjjwq
Content-Type:application/octet-stream;name="myfile.pdf"
Content-Transfer-Encoding:base64
Content-Disposition:attachment;filename="myfile.pdf"

JVBERi0xLjUNJeLjz9MNCjEgMCBvYmoNPDwvTWV0YWRhdGEgNTMgMCBSL1BhZ2VzIDIgMCBSL09D
UHJvcGVydGllczw8L0Q8PC9SQkdyb3Vwc1tdL09OWzIyIDAgUl0vT3JkZXIgMjEgMCBSPj4vT0NH
<snip>

--KkK170891tpbkKk__FV_KKKkkkjjwq--
.
250 Ok
quit
221 mycomputer closing connection

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

"Many people have asked ...." Really? Name three.

by CharlieSpencer In reply to FaxPress - Using Telnet w ...

You've been a member here for nine years and this is how you choose to introduce yourself?

Collapse -

Sleeper Agent

by GSG In reply to "Many people have asked . ...

I think he's a sleeper agent for a horde of aliens from outer space. He's posted this cryptic message which is hiding the coordinates that he's picked for their landing.

Collapse -

Not cryptic at all.

by CharlieSpencer In reply to Sleeper Agent

The coords are for Springfield, Missouri. :-)

Collapse -

Odd, I thought Fax over VOIP was the one everyone asked about.

by seanferd In reply to FaxPress - Using Telnet w ...

Maybe I have a confirmation bias going on, though. Hm.

Collapse -

See? That's why you're not a 'Systems Programmer / Development"

by CharlieSpencer In reply to Odd, I thought Fax over V ...

Like Logick1. He's spent over nine years researching and documenting the intricacies of this. Maybe if he'd moved a bit quicker he might have had time to learn that faxing is a dying technology regardless of the transmission method.

Collapse -

Hah !

by Logick2 In reply to See? That's why you're n ...

This is choice :-) I am in fact a sleeper agent for a horde of aliens from outer space, and I did dedicate 9 full years of my life to that little posting, which I worked on night and day at a Zen monastery. I harbor secret fears of investing efforts in dying technologies, and I always wished to be a bit quicker. I take myself so seriously I am paralyzed :-) I wish I was Palmetto.

Collapse -

Most people do.

by CharlieSpencer In reply to Hah !

Don't feel alone.

Back to Networks Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums