@@ -25,19 +25,30 @@ func main() {
25
25
26
26
req := resty .New ().R ()
27
27
28
- // set the url-encoded-data
29
- req .SetFormData (map [string ]string {
28
+ formData := map [string ]string {
30
29
"id" : msg .MessageID ,
30
+ "date" : msg .Date .String (),
31
31
"subject" : msg .Subject ,
32
32
"body[text]" : string (msg .TextBody ),
33
33
"body[html]" : string (msg .HTMLBody ),
34
34
"addresses[from]" : c .From ().Address ,
35
35
"addresses[to]" : strings .Join (extractEmails (msg .To ), "," ),
36
+ "addresses[reply-to]" : strings .Join (extractEmails (msg .ReplyTo ), "," ),
37
+ "addresses[resent-to]" : strings .Join (extractEmails (msg .ResentTo ), "," ),
38
+ "addresses[resent-cc]" : strings .Join (extractEmails (msg .ResentCc ), "," ),
39
+ "addresses[resent-bcc]" : strings .Join (extractEmails (msg .ResentBcc ), "," ),
40
+ "addresses[resent-from]" : strings .Join (extractEmails (msg .ResentFrom ), "," ),
36
41
"addresses[in-reply-to]" : strings .Join (msg .InReplyTo , "," ),
37
42
"addresses[cc]" : strings .Join (extractEmails (msg .Cc ), "," ),
38
43
"addresses[bcc]" : strings .Join (extractEmails (msg .Bcc ), "," ),
44
+ "resent-date" : msg .ResentDate .String (),
45
+ "resent-id" : msg .ResentMessageID ,
46
+ "references" : strings .Join (msg .References , "m" ),
39
47
"spf_result" : strings .ToLower (spfResult .String ()),
40
- })
48
+ }
49
+
50
+ // set the url-encoded-data
51
+ req .SetFormData (formData )
41
52
42
53
// set the files "attachments"
43
54
for i , file := range msg .Attachments {
0 commit comments