1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +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:
Ralph Slooten 2023-01-12 16:04:08 +13:00
parent 47a556d05e
commit 594c4817a4

View File

@ -181,7 +181,7 @@ func Store(body []byte) (string, error) {
return "", nil
}
var from *mail.Address
from := &mail.Address{}
fromJSON := addressToSlice(env, "From")
if len(fromJSON) > 0 {
from = fromJSON[0]