<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
yeah thats a posibility but I was hoping to do this for Purchase Orders
and such generated from our Buisiness System (oracle reports). We fax
POs internationally, easier and cheaper to email them. Wouldn't work to
well for that. May have to settle for emailing it to the users, and
then they could forward the email.<br>
<br>
<br>
Brett Hamann wrote:<br>
<blockquote type="cite" cite="mid006e01c3787c$535a98f0$4300010a@inv">
  <pre wrap="">----- Original Message -----
From: "Justin Bennett" <a class="moz-txt-link-rfc2396E" href="mailto:justin.bennett@dynabrade.com">&lt;justin.bennett@dynabrade.com&gt;</a>
To: <a class="moz-txt-link-rfc2396E" href="mailto:nflug@nflug.org">&lt;nflug@nflug.org&gt;</a>
Sent: Thursday, September 11, 2003 10:39 AM
Subject: Samba PDF Email


  </pre>
  <blockquote type="cite">
    <pre wrap="">I'm creating a samba printer that will email a PDF, could be usefull for
emailing POs ect. I have the script and printer setup, I modified the
script to create a PDF from samba, and had it attach to an email and
send, rather than save it in a users home directory. It works fine when
I hard code the to address in the script. I was wondering how to pass an
email address to samba from windows, so I can then hand it to my script.
I assume I may need a custom print driver?

My Setup:
[pdfmail]
   path = /tmp
   printable = yes
   guest ok = yes
   print command = /usr/bin/emailpdf %s %u
   lpq command =
   lprm command =

emailpdf:
#!/bin/sh
DATE=`date +%b%d-%H%M%S`


OUTDIR=/tmp
/usr/bin/ps2pdf13 /tmp/$1 $OUTDIR/$2-$DATE.pdf
chmod 660 $OUTDIR/$2-$DATE.pdf
sendEmail -m "Emailed PDF" -f <a class="moz-txt-link-abbreviated" href="mailto:xxx@dynabrade.com">xxx@dynabrade.com</a> -t <a class="moz-txt-link-abbreviated" href="mailto:xxx@dynabrade.com">xxx@dynabrade.com</a> -u
"Emailed PDF" -a $OUTDIR/$2-$DATE.pdf
rm $1
rm $OUTDIR/$2-$DATE.pdf

Justin Bennett
Network Administrator
RHCE (Redhat Certified Linux Engineer)
Dynabrade, Inc.
8989 Sheridan Dr.
Clarence, NY 14031




---------------------------------------------
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
---------------------------------------------

    </pre>
  </blockquote>
  <pre wrap=""><!---->Maybe have the user put the recipient's email in the document, then you
could use awk to pull out <a class="moz-txt-link-rfc2396E" href="Email:user">"Email:user"</a>. I did this to pull out a word
documents title before I fax it.

HTH
Brett




--------------------------------------------- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.  
---------------------------------------------

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Justin Bennett
Network Administrator
RHCE (Redhat Certified Linux Engineer)
Dynabrade, Inc.
8989 Sheridan Dr.
Clarence, NY 14031
 
</pre>
</body>
</html>