Guest User

Untitled

a guest
Mar 15th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. bash-4.1$ cat test.txt
  2. HelloWorld !
  3.  
  4. bash-4.1$ uuencode test.txt test_attachment.txt|mailx -s 'testing' mail@mail.com
  5.  
  6. begin 664 test_attachment.txt
  7. /2&5L;&]7;W)L9"`A(`H*
  8. `
  9. end
  10.  
  11. From: Alice <alice@example.edu>
  12. To: Bob <bob@example.com>
  13. Subject: Those files you requested
  14.  
  15. Here you go:
  16.  
  17. begin 644 something.tar.Z
  18. M'YV04HH$(=*D"("#"!,J7,BPH<.'$"-*1`BC(@P;%0%8C'$#H:*'#U:'%EQ
  19. M1@T`,63<F!&CQHP;,&3,T!@#QLJ9(&!,W,FSI^?`.K,H1-&#@@0`-*02?.&
  20. M#E"&2IDZ?4JUJM6K6+-JE9CE31T08<;0J1.&#9L(,K@H2,G+)TR9$#009-F
  21. MS@%6_/JW<NWK]^_@`,+'DRXL.'#B!,K7LRXL>/'D"-+GDRYLN7+F#-KWLRY
  22. ML^?/H$.+'DVZM.G3J%.K7LVZM>O7L&/+GDV[MNW;N'/KWLV[M^_?P(,+'TZ
  23. JN/'CR),K7ZN?/GT*-+GTZ]NO7KV+-KWZ]N_?OX,.+'T^^O/GSZ',#
  24. `
  25. end
  26.  
  27. --
  28. Alice
  29.  
  30. $ uuencode test.txt test_attachment.txt >file.uue
  31. $ mailx -A file.uue -s "testing" someone@example.com </dev/null
  32.  
  33. uuencode test.txt test_attachment.txt | mailx **-m** -s 'testing' mail@mail.com
  34.  
  35. echo "
  36. Subject: My Email Subject at `date "+%m/%d/%Y %r UTC"`
  37. MIME-Version: 1.0
  38. Content-type: multipart/mixed; boundary="^A^A^A^A^A"
  39. Content-Transfer-Encoding: 7bit
  40.  
  41. --^A^A^A^A^A
  42. Content-Type: text/plain; charset=US-ASCII; name="BDY.TXT"
  43. Content-Disposition: inline; filename="BDY.TXT"
  44. Content-Transfer-Encoding: 7bit
  45.  
  46. My Email Subject at `date "+%m/%d/%Y %r UTC"`
  47.  
  48. --^A^A^A^A^A
  49. Content-Type: text/plain; charset=US-ASCII; name="ZIP_FILE"
  50. Content-Disposition: attachment; filename="ZIP_FILE"
  51. Content-Transfer-Encoding: 7bit
  52.  
  53. " > /tmp/ZIP_FILE
  54.  
  55. cat /tmp/MySourceZipFile >> /tmp/ZIP_FILE
  56. echo "
  57. --^A^A^A^A^A--" >> /tmp/ZIP_FILE
  58.  
  59.  
  60. /usr/sbin/sendmail "GodSend@Heaven.godcom" < /tmp/ZIP_FILE
Add Comment
Please, Sign In to add comment