Guest User

Untitled

a guest
Jul 21st, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. open(XMLFILE, ">:utf8", $xmlfile);
  2. print XMLFILE "<?xml version="1.0" encoding="utf-8"?>n";
  3. print XMLFILE "<data>n";
  4. #print XMLFILE "...n";
  5. print XMLFILE "</data>n";
  6. close (XMLFILE);
  7.  
  8. open(MUTT, "|/usr/bin/mutt -s "TestSubject" -a $xmlfile "test@example.com"");
  9. binmode MUTT, ":utf8";
  10. print MUTT ("TestBody");
  11. close (MUTT);
  12.  
  13. $ mutt -e "set content_type=text/html" Email address -s "subject" < test.html
  14.  
  15. open(MUTT, "|/usr/bin/mutt -e "set content_type=text/xml" -s "TestSubject" -a $xmlfile "test@example.com"");
  16.  
  17. ### method #1
  18. $ mail -a 'MIME-Version: 1.0' -a 'Content-Type: text/xml; charset=iso-8859-1' -a 'X-AUTOR: Some Guy' -s 'MTA STATUS: mail queue' <to user> -- -f <from user> < /tmp/eximrep.xml
  19.  
  20. ### method #2
  21. $ mail -a 'Content-type: text/xml; charset="us-ascii"' <to user> < /tmp/file.xml
  22.  
  23. (
  24. echo "From: myuser@example.com"
  25. echo "To: user@example.net"
  26. echo "MIME-Version: 1.0"
  27. echo "Content-Type: multipart/mixed;"
  28. echo ' boundary="BOUNDARY"'
  29. echo "Subject: Test Message"
  30. echo ""
  31. echo "This is a MIME-encapsulated message"
  32. echo "--BOUNDARY"
  33. echo "Content-Type: text/plain"
  34. echo ""
  35. echo "This is what someone would see without an HTML capable mail client."
  36. echo ""
  37. echo "--BOUNDARY"
  38. echo "Content-Type: text/html"
  39. echo ""
  40. echo "<html>
  41. <body bgcolor='black'>
  42. <blockquote><font color='green'>GREEN</font> <font color='white'>WHITE</font> <font color='red'>RED</font></blockquote>
  43. </body>
  44. </html>"
  45. echo "--BOUNDARY--"
  46. ) | sendmail -t
  47.  
  48. <?xml ... ?>
  49. <?comment <!-- ł€èÄöÜß --> ?>
  50. <content>
  51. ...
  52. </content>
  53.  
  54. -e 'set send_charset="utf-8"'
Add Comment
Please, Sign In to add comment