-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"message" event doesn't fire for some types of messages #51
Comments
Hello -- strange issue. The message definitely being delivered to the email account's mailbox being monitored by switchboard? If it's, say, being caught by a spam filter switchboard wouldn't publish a notification. Otherwise, looks like I'll get to check out mandrill :) |
It's not the spam filter unfortunately. I'm 100% sure it's being monitored as any email I immediately send afterwards with a regular Gmail account works just fine. I can point the script at your email account and help test if you'd like. We can take it offline if you'd like to message me at [email protected]. |
Sounds good -- I emailed you, and will be trying to replicate on my side. |
There's been progress on this issue over email (thanks @Ostera!), but now that we're hammering out the details of the fix I thought we should move it back to Github. Here's the thread for background: Leandro Ostera writes:
|
I have the following workaround running seemingly fine: clean_addresses([[RawName, _, {string, MailBox}, Host] | Rest], Acc) ->
Address = case Host of
{string, Domain} -> [{email, <<MailBox/binary, $@, Domain/binary>>}];
nil -> [{email, nil}]
end,
clean_addresses(Rest,
[{address, case RawName of
nil -> [{name, <<"">>} | Address];
{string, Name} -> [{name, Name} | Address]
end} |
Acc]). Where I'm deferring the Host pattern matching to a |
I'll submit a pull request that handles the |
@jtmoulia implementation wise, a build_address private method that handles the Host being empty and just returns the built string should suffice IMO, but I'm open to suggestions. |
Sounds awesome, @Ostera. Another function, |
Fixes handling of no Host in an email address description Resolves #51
When I test switchboard by sending a test email from Mandrill, the "message" event never fires for some reason.
It works for all other types of emails... except emails from Mandrill. Any ideas? Here's how I'm sending them via the mandrill-api gem:
The text was updated successfully, but these errors were encountered: