3
I am trying to send an email with a CSV attachment, however it is not possible to locally create the file.
Is there any way to pipe the content (I have the content in a variable in memory), to sendmail/mail in a way the data would appear as an attachment?
It is possible, of course. If you are willing and able to build the complete MIME mail by hand, you can pipe it to
sendmail
. IIRC,mail
will mangle the result. It mighty be easier to usemutt
ormailx
. – Michael Vehrs – 2016-06-13T06:02:20.293Update: both
mailx
andmutt
are unable or unwilling to read an attachment from a fifo, so process substitution doesn't work. – Michael Vehrs – 2016-06-13T06:13:14.823Hmm, sounds like sendmail or telnet might be my friend here. – user2360915 – 2016-06-13T06:21:01.343