1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
package mail_test
const mailString = "Subject: Your Name\r\n" +
"Content-Type: multipart/mixed; boundary=message-boundary\r\n" +
"\r\n" +
"--message-boundary\r\n" +
"Content-Type: multipart/alternative; boundary=text-boundary\r\n" +
"\r\n" +
"--text-boundary\r\n" +
"Content-Type: text/plain\r\n" +
"Content-Disposition: inline\r\n" +
"\r\n" +
"Who are you?\r\n" +
"--text-boundary--\r\n" +
"--message-boundary\r\n" +
"Content-Type: text/plain\r\n" +
"Content-Disposition: attachment; filename=note.txt\r\n" +
"\r\n" +
"I'm Mitsuha.\r\n" +
"--message-boundary--\r\n"
const nestedMailString = "Subject: Fwd: Your Name\r\n" +
"Content-Type: multipart/mixed; boundary=outer-message-boundary\r\n" +
"\r\n" +
"--outer-message-boundary\r\n" +
"Content-Type: text/plain\r\n" +
"Content-Disposition: inline\r\n" +
"\r\n" +
"I forgot.\r\n" +
"--outer-message-boundary\r\n" +
"Content-Type: message/rfc822\r\n" +
"Content-Disposition: attachment; filename=attached-message.eml\r\n" +
"\r\n" +
mailString +
"--outer-message-boundary--\r\n"
|