-   Linux - Newbie (
-   -   Using mail from the command line (

rkaran 12-19-2002 12:00 AM

Using mail from the command line
I would like to send out email to a Java User Group list using the mail program on Linux. I have a script that will read a list of email addresses from a file and send out email to each of the required recipients.

The man pages for the program do not show any any way of adding a reply-to address as the first few lines from the man pages quoted below show.


MAIL(1) BSD General Commands Manual MAIL(1)

mail - send and receive mail

mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr...
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]

Mail is an intelligent mail processing system, which has a command syntax
reminiscent of ed(1) with lines replaced by messages.
Is there any way of changing the default reply-to address which is myUserName@ourLinuxBoxDomain to my work email address?

I can't seem to find any kind of documentation on doing this. I'd be just as happy if someone could point me to some place that has the appropriate documentation.


Mara 12-19-2002 12:54 PM

As far as I know, you can't do this using mail (but I may be wrong). Instead I'd use a script that reads a list of emails, and an email with "From:" line and send it via your mail server.

All times are GMT -5. The time now is 10:43 AM.