Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open(XMLFILE, ">:utf8", $xmlfile);
- print XMLFILE "<?xml version="1.0" encoding="utf-8"?>n";
- print XMLFILE "<data>n";
- #print XMLFILE "...n";
- print XMLFILE "</data>n";
- close (XMLFILE);
- open(MUTT, "|/usr/bin/mutt -s "TestSubject" -a $xmlfile "test@example.com"");
- binmode MUTT, ":utf8";
- print MUTT ("TestBody");
- close (MUTT);
- $ mutt -e "set content_type=text/html" Email address -s "subject" < test.html
- open(MUTT, "|/usr/bin/mutt -e "set content_type=text/xml" -s "TestSubject" -a $xmlfile "test@example.com"");
- ### method #1
- $ 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
- ### method #2
- $ mail -a 'Content-type: text/xml; charset="us-ascii"' <to user> < /tmp/file.xml
- (
- echo "From: myuser@example.com"
- echo "To: user@example.net"
- echo "MIME-Version: 1.0"
- echo "Content-Type: multipart/mixed;"
- echo ' boundary="BOUNDARY"'
- echo "Subject: Test Message"
- echo ""
- echo "This is a MIME-encapsulated message"
- echo "--BOUNDARY"
- echo "Content-Type: text/plain"
- echo ""
- echo "This is what someone would see without an HTML capable mail client."
- echo ""
- echo "--BOUNDARY"
- echo "Content-Type: text/html"
- echo ""
- echo "<html>
- <body bgcolor='black'>
- <blockquote><font color='green'>GREEN</font> <font color='white'>WHITE</font> <font color='red'>RED</font></blockquote>
- </body>
- </html>"
- echo "--BOUNDARY--"
- ) | sendmail -t
- <?xml ... ?>
- <?comment <!-- ł€èÄöÜß --> ?>
- <content>
- ...
- </content>
- -e 'set send_charset="utf-8"'
Add Comment
Please, Sign In to add comment