fix: panic when no params available
This commit is contained in:
@ -75,7 +75,11 @@ func (p *Part) ConvertToUTF8() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// HELP: Is this okay? What about when the charset is embedded in structured text type eg html/xml?
|
// HELP: Is this okay? What about when the charset is embedded in structured text type eg html/xml?
|
||||||
|
if params == nil {
|
||||||
|
params = make(map[string]string)
|
||||||
|
}
|
||||||
params["charset"] = "utf-8"
|
params["charset"] = "utf-8"
|
||||||
|
|
||||||
p.Header.SetContentType(t, params)
|
p.Header.SetContentType(t, params)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -38,4 +38,4 @@ Feature: SMTP wrong messages
|
|||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Then SMTP response is "SMTP error: 554 Error: transaction failed, blame it on the weather: multipart: NextPart: EOF"
|
Then SMTP response is "SMTP error: 554 Error: transaction failed, blame it on the weather: unexpected EOF"
|
||||||
|
|||||||
Reference in New Issue
Block a user