File: mail_test.go

package info (click to toggle)
golang-github-emersion-go-message 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,061 bytes parent folder | download | duplicates (2)
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"