Parse Reply-To header while parsing envelope
This commit is contained in:
parent
3338dce8a1
commit
59c24523af
|
@ -150,6 +150,10 @@ func parseEnvelope(h *mail.Header) (*models.Envelope, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not read bcc address: %v", err)
|
return nil, fmt.Errorf("could not read bcc address: %v", err)
|
||||||
}
|
}
|
||||||
|
replyTo, err := parseAddressList(h, "reply-to")
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("could not read reply-to address: %v", err)
|
||||||
|
}
|
||||||
subj, err := h.Subject()
|
subj, err := h.Subject()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not read subject: %v", err)
|
return nil, fmt.Errorf("could not read subject: %v", err)
|
||||||
|
@ -163,6 +167,7 @@ func parseEnvelope(h *mail.Header) (*models.Envelope, error) {
|
||||||
Subject: subj,
|
Subject: subj,
|
||||||
MessageId: msgID,
|
MessageId: msgID,
|
||||||
From: from,
|
From: from,
|
||||||
|
ReplyTo: replyTo,
|
||||||
To: to,
|
To: to,
|
||||||
Cc: cc,
|
Cc: cc,
|
||||||
Bcc: bcc,
|
Bcc: bcc,
|
||||||
|
|
Loading…
Reference in New Issue