|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I need to periodically email a file to multiple recipients. The script
that handles this was moved from a linux box to an aix server and the way mail is handled has changed. I am using the command: cat email.txt | /usr/sbin/sendmail -oi dave\@domain.com The file does arrive at my mailbox just fine but none of the recipients in the document header receive the file. Here is an example of the file: From: dave@domain.com To: bob.smith@domain.com,dave@domain.com Subject: [ALERT] Company has received your New Account File Content-type: text/html MIME-Version: 1.0 <html><head><title>Client Number has uploaded a file</title></head><body><center> <h3>Client Number has uploaded a New Account File</h3> <table cellspacing="3" bgcolor="#FFFFFF"> <tr><td align="right">Filename:<td> <td>assign102706.txt</td><tr> <tr><td align="right">Number of Accounts In Batch:<td> <td>10</td><tr> <tr><td align="right">Number of Accounts Listed:<td> <td>10</td><tr> <tr><td align="right">Dollars of Listed:<td> <td>$ 3369.42</td><tr> <tr><td align="right">Accounts NOT Listed:<td> <td></td><tr> <tr><td align="right">Dollars NOT Listed:<td> <td>$ 0</td><tr> </table> <br><h3>Errors in File</h3><table cellspacing="3" border="1" bgcolor="#FFFFFF"> <tr><td>Error Description</td> <td>Account</td> <td>Balance</td><tr> </table></center></body></html> </body></html> I'm sure there is a better way to achieve this that would work better. Temporarily I am simply executing the sendmail command for each recipient which works but is very slow. About 30-45 seconds per person. Any advice would be wonderful. Dave |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
davemchine@gmail.com wrote:
> cat email.txt | /usr/sbin/sendmail -oi dave\@domain.com Any reason you're not using /usr/bin/sendmail -oi -t < email.txt > The file does arrive at my mailbox just fine but none of the recipients > in the document header receive the file. You need the -t option to sendmail. [...] > MIME-Version: 1.0 > <html><head><title>Client Number has uploaded a You need a blank line between the last header and the message body. Regards, David. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks for the replies. I found a typo in my script which eliminated
part of the headers and that blank line you mentioned, doh! Alas I tried running the email.txt file through sendmail both in my current maner and with your syntax with the same result, only I receive the email. Here is my new email.txt, perhaps you see anything else wrong? Thank you for your . Dave From: dave@domain.com To: dave@domain.com,dave@domain2.com Subject: [ALERT] a client has uploaded a New Account File Content-type: text/html MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="---mail-part-boundary" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 ---mail-part-boundary Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html><head><title>Client number has uploaded a New Account File</title></head><body><center> <h3>client name has uploaded a New Account File</h3> <table cellspacing="3" bgcolor="#FFFFFF"> <tr><td align="right">Filename:<td> <td>collects.txt</td><tr> <tr><td align="right">Number of Accounts In Batch:<td> <td>38</td><tr> <tr><td align="right">Number of Accounts Listed:<td> <td>38</td><tr> <tr><td align="right">Dollars of Listed:<td> <td>$ 23668.7</td><tr> <tr><td align="right">Accounts NOT Listed:<td> <td></td><tr> <tr><td align="right">Dollars NOT Listed:<td> <td>$ 0</td><tr> </table> <br><h3>Client notes on file</h3> <table cellspacing="3" bgcolor="#FFFFFF"> <tr><td>dave was here</td><tr> </table> <br><h3>Errors to show client</h3> None <br></body></html> |
|
![]() |
| Outils de la discussion | |
|
|