mailhog / MailHog

Web and API based SMTP testing
MIT License
13.98k stars 1.06k forks source link

Mail list shows `{{ getSender(message) }}` when mail doesn't have a `From:` header #262

Open dpursehouse opened 4 years ago

dpursehouse commented 4 years ago

Send a mail without a From: header:

telnet localhost 1025
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mailhog.example ESMTP MailHog
ehlo example.com
250-Hello example.com
250-PIPELINING
250 AUTH PLAIN
mail from:<username@example.com>
250 Sender username@example.com ok
rcpt to:<foo@example.com>
250 Recipient foo@example.com ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Testing 123

hello
this is a test
.
250 Ok: queued as FnWXFpbAru8yuXL0t7p69WvvobTB1MfPMMAhYYON3Xo=@mailhog.example

Then the mail list shows {{ getSender(message) }} as the sender.

Screen Shot 2019-10-30 at 16 58 30
dpursehouse commented 4 years ago

Ah, I didn't realise this project doesn't include the UI. This should have been raised on the MailHog-UI project instead.

dpursehouse commented 4 years ago

It seems I can't move this issue. Anyway, I've also noticed that there is this in the javascript console log:

TypeError: Cannot read property '0' of undefined
    at ChildScope.$scope.getSender (controllers.js:194)
    at $parseFunctionCall (angular-1.3.8.js:12332)
    at Object.expressionInputWatch (angular-1.3.8.js:12735)
    at Scope.$digest (angular-1.3.8.js:14217)
    at Scope.$apply (angular-1.3.8.js:14488)
    at done (angular-1.3.8.js:9646)
    at completeRequest (angular-1.3.8.js:9836)
    at XMLHttpRequest.requestLoaded (angular-1.3.8.js:9777)

which seems to correspond to the getSender method, matching the name that appears in the template fragment in the UI.