Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash-4.1$ cat test.txt
- HelloWorld !
- bash-4.1$ uuencode test.txt test_attachment.txt|mailx -s 'testing' mail@mail.com
- begin 664 test_attachment.txt
- /2&5L;&]7;W)L9"`A(`H*
- `
- end
- From: Alice <alice@example.edu>
- To: Bob <bob@example.com>
- Subject: Those files you requested
- Here you go:
- begin 644 something.tar.Z
- M'YV04HH$(=*D"("#"!,J7,BPH<.'$"-*1`BC(@P;%0%8C'$#H:*'#U:'%EQ
- M1@T`,63<F!&CQHP;,&3,T!@#QLJ9(&!,W,FSI^?`.K,H1-&#@@0`-*02?.&
- M#E"&2IDZ?4JUJM6K6+-JE9CE31T08<;0J1.	L(,K@H2,G+)TR9$#009-F
- MS@%6_/JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
- ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ
- JN/'CR),K7ZN?/GT*-+GTZ]NO7KV+-KWZ]N_?OX,.+'T^^O/GSZ',#
- `
- end
- --
- Alice
- $ uuencode test.txt test_attachment.txt >file.uue
- $ mailx -A file.uue -s "testing" someone@example.com </dev/null
- uuencode test.txt test_attachment.txt | mailx **-m** -s 'testing' mail@mail.com
- echo "
- Subject: My Email Subject at `date "+%m/%d/%Y %r UTC"`
- MIME-Version: 1.0
- Content-type: multipart/mixed; boundary="^A^A^A^A^A"
- Content-Transfer-Encoding: 7bit
- --^A^A^A^A^A
- Content-Type: text/plain; charset=US-ASCII; name="BDY.TXT"
- Content-Disposition: inline; filename="BDY.TXT"
- Content-Transfer-Encoding: 7bit
- My Email Subject at `date "+%m/%d/%Y %r UTC"`
- --^A^A^A^A^A
- Content-Type: text/plain; charset=US-ASCII; name="ZIP_FILE"
- Content-Disposition: attachment; filename="ZIP_FILE"
- Content-Transfer-Encoding: 7bit
- " > /tmp/ZIP_FILE
- cat /tmp/MySourceZipFile >> /tmp/ZIP_FILE
- echo "
- --^A^A^A^A^A--" >> /tmp/ZIP_FILE
- /usr/sbin/sendmail "GodSend@Heaven.godcom" < /tmp/ZIP_FILE
Add Comment
Please, Sign In to add comment