Hi Everyone,
I just have a quick question with regards to using sendmail.
I currently use the following sendmail command to read mail
headers from a file as oppose to specifying them via the command line:
sendmail -t < mailfile
The mailfile contains something like:
From: root
To:
user@domain.com
Subject: Mail Subject
Other header info here if desired...
This is the message body.
This works fine, no problems here.
Now, what I want to know is can I use the sendmail command to read and split an appended file into multiple emails, going to different users..
For example, if I had an appended file that looked like:
From: root
To:
user@domain.com
Subject: Mail Subject
Other header info
Message body.
From: root
To:
otheruser@domain.com
Subject: Mail Subject
Different message body
Would it be possible to use the sendmail command to split/parse the appended file into multiple emails... I tried using a "." on a seperate line by itself after the first Message body, but it doesn't work, it sends one email to the first To: address it comes across...
I've also tried using EOF after the first message body, but that didn't work...
Any ideas, or help would be much appreciated... I'm trying to get batch emailing working...
Thanks in advance.