mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #526] Something changed since version 24 in data structures #337
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @baiomys on GitHub (Jun 23, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/526
Processing email data obtained from WebSockets no longer work in v26
Here is queue:
This is processing:
And this is faulty code since I upgraded to v26
TypeError: can only concatenate list (not "NoneType") to list
Looks like something changed in To, Cc or Bcc
@axllent commented on GitHub (Jun 23, 2025):
Just so I'm clear, you had version 1.24.0 and now you have v1.26.2? I'm not aware of any changes that would have altered the websocket data structure, so narrowing down the exact version you were on and the version you updated to is necessary so I can compare the code. Please confirm.
@baiomys commented on GitHub (Jun 24, 2025):
working:
image: axllent/mailpit:v1.24.2not working (updated on sunday):
image: axllent/mailpit:latestI guess it is v1.26.2 now, used sendtestemail.com to send test messages
@axllent commented on GitHub (Jun 24, 2025):
From what I can tell, there are no changes at all to any of that message summary data sent via the webhook - with the exception of a new object value called "Username". Everything else should be the exact same as it was before.
What would be helpful is if you could please capture and compare the websocket output (you are processing) from
v1.24.2andlatestfor the same message - and spot the difference (if there is any). Obviously some fields like the ID would differ, but the address details should be identical.@baiomys commented on GitHub (Jun 24, 2025):
Was:
Now:
@axllent commented on GitHub (Jun 24, 2025):
Thank you, that helps me a lot and explains it! I will look into this within the next day or two.
@baiomys commented on GitHub (Jun 24, 2025):
Thanks!
I already altered the code just in case. =)
rcpt = (hook.get('To') or []) + (hook.get('Cc') or []) + (hook.get('Bcc') or [])@axllent commented on GitHub (Jun 24, 2025):
Yes, but this doesn't align with the API docs which say the values return an object, which
nullis not :) Some languages don't care, others do. It's good to have that check in your code anyway, but I still need to fix this either way...@axllent commented on GitHub (Jun 24, 2025):
The fix was pretty easy - and it only impacted the websocket data. I've pushed a fix for this in the edge build and it will be included in a new release this weekend 👍
@ghost commented on GitHub (Jun 24, 2025):