mirror of
https://github.com/axllent/mailpit.git
synced 2025-07-05 00:48:52 +02:00
Bugfix: Correctly index missing 'From' header in database
When an email with a missing `From: ` header is stored in the database, a null value was stored. This broke the search. Fixes #31
This commit is contained in:
@ -181,7 +181,7 @@ func Store(body []byte) (string, error) {
|
|||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var from *mail.Address
|
from := &mail.Address{}
|
||||||
fromJSON := addressToSlice(env, "From")
|
fromJSON := addressToSlice(env, "From")
|
||||||
if len(fromJSON) > 0 {
|
if len(fromJSON) > 0 {
|
||||||
from = fromJSON[0]
|
from = fromJSON[0]
|
||||||
|
Reference in New Issue
Block a user