[asterisk-users] Mailing a fax with mutt does not succeed

Steve Edwards asterisk.org at sedwards.com
Sat Jun 22 01:17:37 CDT 2013


On Sat, 22 Jun 2013, Larry Moore wrote:

> echo >> "$MSGFILE"
> printf "%18s" "Sender: " >> "$MSGFILE"; printf "%-20s\n" "${REMOTESTATIONID}" >> "$MSGFILE"
> printf "%18s" "Pages: " >> "$MSGFILE"; printf "%-20s\n" "${FAXPAGES}" >> "$MSGFILE"
> printf "%18s" "Signal Rate: " >> "$MSGFILE"; printf "%-20s\n" "${FAXBITRATE} bit/s" >> "$MSGFILE"
> printf "%18s" "CallerID Number: " >> "$MSGFILE"; printf "%-20s\n" "${CIDNUMBER}" >> "$MSGFILE"
> printf "%18s" "CallerID Name: " >> "$MSGFILE"; printf "%-20s\n" "${CIDNAME}" >> "$MSGFILE"
> printf "%18s" "Call Duration: " >> "$MSGFILE"; printf "%-20s\n" "${DURATION}" >> "$MSGFILE"
> printf "%18s" "Status: " >> "$MSGFILE"; printf "%-20s\n" "${FAXERROR}" >> "$MSGFILE"

How about:

#!/bin/bash
 	FORMAT='%18s %-20s\n'
 	(
 	printf "${FORMAT}" 'Sender:'		"${REMOTESTATIONID}"
 	printf "${FORMAT}" 'Pages:'		"${FAXPAGES}"
 	printf "${FORMAT}" 'Signal Rate:'	"${FAXBITRATE} bits/s"
 	printf "${FORMAT}" 'CallerID Number:'	"${CIDNUMBER}"
 	printf "${FORMAT}" 'CallerID Name:'	"${CIDNAME}"
 	printf "${FORMAT}" 'Call Duration:'	"${DURATION}"
 	printf "${FORMAT}" 'Status:'		"${FAXERROR}"
 	) >>${MSGFILE}

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list