You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I did: We are using your code to decode the real-time SMTP mail and add footer text at the end of the mail. After necessary changes, we encode the mail again and if the original mail contains eml files(message/rfc822) as an attachment, the eml file is converted in base64 content, which is not supported as per RFC ( https://www.w3.org/Protocols/rfc1341/7_3_Message.html ) . We have found the issue in encode.go file where any attachment is found it was setting the Encoding to base64.
What I expected: We changed the encode.go file on the 89 line. Below is the code.
cte := te7Bit
if len(p.Content) > 0 { if strings.Contains(p.ContentType, "message") {
cte = 6
} else {
cte = teBase64
}
// cte = teBase64
if p.TextContent() {
cte = selectTransferEncoding(p.Content, false)
if p.Charset == "" {
p.Charset = utf8
}
}
// RFC 2045: 7bit is assumed if CTE header not present.
switch cte {
case teBase64:
p.Header.Set(hnContentEncoding, cteBase64)
case teQuoted:
p.Header.Set(hnContentEncoding, cteQuotedPrintable)
}
}
What I got:
Release or branch I am using:
(Please attach a sample message if you feel it will help reproduce the issue)
The text was updated successfully, but these errors were encountered:
What I did: We are using your code to decode the real-time SMTP mail and add footer text at the end of the mail. After necessary changes, we encode the mail again and if the original mail contains eml files(message/rfc822) as an attachment, the eml file is converted in base64 content, which is not supported as per RFC ( https://www.w3.org/Protocols/rfc1341/7_3_Message.html ) . We have found the issue in encode.go file where any attachment is found it was setting the Encoding to base64.
What I expected: We changed the encode.go file on the 89 line. Below is the code.
cte := te7Bit
if len(p.Content) > 0 {
if strings.Contains(p.ContentType, "message") {
cte = 6
} else {
cte = teBase64
}
// cte = teBase64
if p.TextContent() {
cte = selectTransferEncoding(p.Content, false)
if p.Charset == "" {
p.Charset = utf8
}
}
// RFC 2045: 7bit is assumed if CTE header not present.
switch cte {
case teBase64:
p.Header.Set(hnContentEncoding, cteBase64)
case teQuoted:
p.Header.Set(hnContentEncoding, cteQuotedPrintable)
}
}
What I got:
Release or branch I am using:
(Please attach a sample message if you feel it will help reproduce the issue)
The text was updated successfully, but these errors were encountered: