[Asterisk-Users] *HOWTO* : using mime-construct with outlook - send fax to email recipient

Asterisk asterisk at dotr.com
Mon Feb 7 11:36:21 MST 2005


We've managed to setup spandsp to receive faxes and email them to the 
appropriate person.

We did all of our testing using Thunderbird, and the attached pdf files 
worked very well. However, when we went "live", some people complained 
that the attachments in outlook were named <<subject>>.dat instead (for 
example) of 123456.pdf

Having looked into the mime-construct script, we noticed a subtle 
difference between working Outlook attachments and Thunderbird. The 
differences are shown below in case anyone is interested.

left is the original mime-construct, right is our modified version

332c332
<           $part_header .= "Content-Disposition: attachment; filename="
---
 >           $part_header .= "Content-Disposition: inline; filename="
405c405
<               $p .= cont "Content-Type: $type\n"
---
 >               $p .= cont "Content-Type: $type;\n name=" . 
token_quote($arg) . "\n"

Outlook now names the attachment correctly, and Thunderbird also seems 
to work just as well with the changes.

Hope someone finds this useful.

Julian.




More information about the asterisk-users mailing list