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