WebJan 12, 2012 · I have a bash script that runs a query in postgres, it outputs to csv. I want to add to that script to use mailx to email that .csv file to a particular email. The problem I am having is it will not email the file. I can get the email so I know mailx is setup correctly. I just cannot get it to email it as an attachment. WebThe usual way is to use uuencode for the attachments and echo for the body: (uuencode output.txt output.txt; echo "Body of text") mailx -s 'Subject' [email protected]. For Solaris and AIX, you may need to put the echo statement first: (echo "Body of text"; uuencode output.txt output.txt) mailx -s 'Subject' [email protected].
Sending Email Using mailx/s-nail in Linux Through Gmail SMTP
WebThe mail/mailx command needs a local smtp server (MTA) running in order to deliver the emails. THe route taken by the email is somewhat like this –. mail -> sendmail -> local … WebApr 11, 2024 · Basic implementation for email sending with mailx: The mailx package has 2 equal command syntax (mail and mailx both work in the exact same way). The most simplistic command consists of the … box shape in html
How do I send HTML email using linux
Webmime-construct --your-options mailx -s your_subject youruser@domain Share. Improve this answer. Follow edited Nov 17, 2024 at 5:51. cas. 74k 7 7 gold badges 114 114 silver badges 181 181 bronze badges. answered Feb 17, 2014 at 13:01. user55518 user55518. 1. WebApr 19, 2024 · yum install -y mailx . But if our server uses Debian or Ubuntu, then type the command to install it: sudo apt install mailutils -y . And here are examples of email using the mailx application: 1. Send a … WebJan 20, 2012 · mailx command. Code: ( cat textfile.txt; ) mailx -s "test mail " `cat mailids.lst`. from : '[email protected]'. to : for all contacts in text file mailids.lst. above command is sending mails correctly for all contacts in text file mailids.lst, but 'from' address is showing as '[email protected]' but i want desired mail id as if i sent a ... box shared file system