Re: Sending email through shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Christian wrote:
mail email@xxxxxxxxx -s <subject> < mail_text.txt

but i am using qmail server with virtual domain, how can i set the
sender to a specific address?

If you have the list of recipients in file recipients.txt (one per line), and the mail message (both headers and body, separated by a blank line) in mail.txt, you can do:

$ /usr/sbin/sendmail -f sender@xxxxxxxxxxx $(cat recipients.txt) < mail.txt

Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux