HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Attachment to fax send conformation



If you just copy+paste the script using the browser
(probably IE) you just add garbage in the final file,
wich is hide. Just do 

cat <file created from the web> | col -b > <new
notify.awk>

I've not tested the script so I'm not sure if is
working. Make a test and if you still have problems
just make a call :-).


--- Gerhard Engler <gerhard.engler.avmb1@gmx.de>
wrote:
> Pedro Rocadas schrieb:
> > --- Ilia Shapira <Ilia@tiltan-se.co.il> wrote:
> > 
> >>Currently when a user send a fax he receives an
> >>email after the fax is sent
> >>that tells him that the fax was sent ok etc.
> >>
> >>Is it possible to configure Hylafax to send with
> >>this email attachment that
> >>will include the sanded fax as PDF or something
> like
> >>that?
> >>
> > 
> > 
> > Yes. Mailling list is your friend ;-).
> > 
> >
> http://www.hylafax.org/archive/2003-06/msg00190.php
> 
> Hello Pedro,
> hello Mailinglist,
> 
> I tried the script. But I get Error-eMails like
> this:
> 
> 
> A message that you sent contained no recipient
> addresses, and therefore no
> delivery could be attempted.
> 
> ------ This is a copy of your message, including all
> the headers. ------
> 
> Received: from uucp by gustav with local (Exim 3.35
> #1 (Debian))
> 	id 19YPOe-0006B5-00; Fri, 04 Jul 2003 14:10:36
> +0200
> Message-Id: <E19YPOe-0006B5-00@gustav>
> From: uucp <uucp@gustav.duck>
> Date: Fri, 04 Jul 2003 14:10:36 +0200
> 
> Sorry, there was a problem sending notification;
> something went wrong in the shell script bin/notify.
> 
> 
> What´s wrong?
> 
> 
> Thank you!
> 
> 
> Gerhard
> 
> 
> P. S.
> 
> Here´s the notify.awk - script:
> 
> function printItem(fmt, tag, value)
> {
>      printf "%14s: " fmt "\n", tag, value;
> }
> 
> function printBanner(banner)
> {
>      print "";
>      print "    ---- " banner " ----";
>      print "";
> }
> 
> function docType(s)
> {
>      if (match(s, "\.cover"))
>       return "PostScript cover page";
>      else if (match(s, "\.ps"))
>       return "PostScript";
>      else if (match(s, "\.tif"))
>       return "TIFF";
>      else if (match(s, "\.pcl"))
>       return "PCL";
>      else
>       return "Unknown document type";
> }
> 
> #
> # Construct a return-to-sender message.
> #
> function returnToSender()
> {
>      printBanner("Unsent job status");
>      printItem("%s", "Destination", number);
>      printItem("%s", "JobID", jobid);
>      printItem("%s", "GroupID", groupid);
>      printItem("%s", "Sender", sender);
>      printItem("%s", "Mailaddr", mailaddr);
>      if (commid != "")
>       printItem("%s", "CommID", commid);
>      if (modem != "any")
>       printItem("%s", "Modem", modem);
>      printItem("%s", "Submitted From", client);
>      if (jobType == "facsimile") {
>       printItem("%u (mm)", "Page Width", pagewidth);
>       printItem("%.0f (mm)", "Page length",
> pagelength);
>       printItem("%.0f (lpi)", "Resolution",
> resolution);
>      }
>      printItem("%s", "Status", status == "" ? " 
> (nothing available)" :
> status);
>      printItem("%u (exchanges with remote device)",
> "Dialogues", tottries);
>      printItem("%u (consecutive failed calls to
> destination)", "Dials",
> ndials);
>      printItem("%u (total phone calls placed)",
> "Calls", totdials);
>      if (jobType == "facsimile") {
>          printItem("%u (pages transmitted)",
> "Pages", npages);
>       printItem("%u (total pages to transmit))",
> "TotPages", totpages);
>       printItem("%u (attempts to send current
> page)", "Attempts", ntries);
>       } else if (jobType == "pager") {
>       if (npins != 0) {
>           printBanner("Unsent pages submitted for
> transmission");
>           for (i = 0; i &lt; npins; i++)
>            printf "%15s\n",  "PIN " pins[i];
>       }
>       if (nfiles != 0) {
>           printBanner("Message text");
>           while ((getline &lt;files[0]) &gt; 0)
>            print $0;
>           close(files[0]);
>       }
>      }
> }
> 
> function returnTranscript()
> {
>      printBanner("Transcript of session follows");
>      comFile = "log/c" commid;
>      if ((getline &lt;comFile) &gt; 0) {
>       do {
>           if (index($0, "-- data") == 0)
>            print $0
>       } while ((getline &lt;comFile) &gt; 0);
>       close(comFile);
>      } else {
>       printf "    No transcript available";
>       if (commid != "")
>           printf "(CommID c" commid ")";
>       print ".";
>      }
> }
> 
> function printStatus(s)
> {
>      if (s == "")
>       print "&lt;no reason recorded&gt;";
>      else
>       print s
> }
> 
> function putHeaders(subject)
> {
>      print "MIME-Version: 1.0";
>      print "Content-Type: multipart/mixed;";
>      print "   
>
boundary=\"----=_NextPart_000_0012_01BF3CD4.528144C0\"";
> #
> # Uncomment and change to your domain if using
> smbfax and winbind
> #    sub(/DOMAIN\+./,"",mailaddr);
> #
>      print "To: " mailaddr;
>      print "Subject: " subject;
>      print "";
>      print "This is a multi-part message in MIME
> format.";
>      print "";
>      print
> "------=_NextPart_000_0012_01BF3CD4.528144C0";
>      print "Content-Type: text/plain;";
>      print "    charset=\"iso-8859-1\"";
>      print "Content-Transfer-Encoding: 7bit";
>      print "";
>      printf "Your " jobType " job to " number;
> }
> 
> BEGIN          { nfiles = 0;
>              npins = 0;
>              pagewidth = 0;
>              pagelength = 0;
>              resolution = 0;
>              jobType = "facsimile";
>              signalrate = "unknown";
>              dataformat = "unknown";
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*




Project hosted by iFAX Solutions