I would like to send (batch) emails from a linux (ubuntu, postfix) command line.
I would like to include a bcc header (that actually sends the mail to this address), and I would like to give a from: address.
I do not need attachments, text only. However, unicode support would be nice (not essential). I would like a solution that is simple and robust (less important: will works on other machines/MTAs as well)
So far I tried:
Thanks for any input.
If you have a local mail server running (exim, sendmail, ...) you can pipe a full, properly formatted message into it and it will be delivered. You must have a complete set of header (From:, To:, Cc:, Date: ...), there must be a blank line after the headers and before the message text, e.g.
exim -t -i < fullyFormattedMessage.txt
Most mailservers will pretend to be sendmail and will accept the -t flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With