Bug in from_email_option
The email API can take a parameter from_email_option
(see #20 (closed) for more details) which specifies a from email that can be used.
We should be using the option value label but we are using the option value name.
Aside: when the option value is created we set the label and the name is automatically set to be the same as the label (this is the default behaviour when name is not passed). But when option value is updated, we update the label and the name remains unchanged. This is easy to miss since it only bites you when you update a from email address.
Here is an example in case you are wondering. I created a from email address of "Mikey McA" michael@3sd.io and then updated it to "Andy McM" <andrew@3sd.io>
. The result from calling the API was as follows...
[
{
"id": 908,
"option_group_id": 31,
"label": "\"Andy McM\" <andrew@3sd.io>",
"value": "2",
"name": "\"Mikey McA\" <michael@3sd.io>",
MR !44 (merged) solves this, I am pretty sure. We are testing locally and I will confirm once we know. Let me know if you have any other questions in the mean time.