imports: don't set empty Content-Type header field
This commit is contained in:
parent
0b790847d9
commit
346a0443db
|
@ -30,7 +30,9 @@ func ImportMessage(c *protonmail.Client, r io.Reader) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := p.Header.(*mail.InlineHeader); ok {
|
if _, ok := p.Header.(*mail.InlineHeader); ok {
|
||||||
hdr.Set("Content-Type", p.Header.Get("Content-Type"))
|
if t := p.Header.Get("Content-Type"); t != "" {
|
||||||
|
hdr.Set("Content-Type", t)
|
||||||
|
}
|
||||||
body = p.Body
|
body = p.Body
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue