You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How do I send a Django email with a custom From header? #161
However, this yields the Sparkpost API error pasted below. I'm using Django Anymail 1.3 with python-sparkpost 1.3.5. Any suggestions would be tremendous!
Sending a message to test@example.com from mail@bounces.example.com
SparkPost API response 422: Unprocessable Entity
{
"errors": [
{
"message": "Invalid header",
"description": "Error while validating header From: 'From' header must be specified in content.from.name and content.from.email",
"code": "3002"
}
]
}
@YPCrumble awesome work digging up all the parts of this issue! I will document return_path for this lib and check if there are any other params that need documenting. It looks like your use case is currently possible, so I'm going close this issue. If you still still think we should update to better match how Django does this, please create another issue so we can discuss it in more detail.
Activity
YPCrumble commentedon Feb 6, 2018
Update - it looks like the way this library constructs the
from_emaildiffers from how Django constructs thefrom_emailattribute. Django first looks forFromin itsextra_headersattribute, while this library takes thefrom_emailwithout allowing the override.I'd be happy to submit a PR if that's helpful. I could also potentially understand suggesting that I add a custom
return_pathto Anymail'sesp_extradictionary, which I believe would adjust the currently undocumentedreturn_pathparameter on thetransmissions.sendmethod. Happy to add a PR to documentreturn_pathhere if that's helpful instead: http://python-sparkpost.readthedocs.io/en/latest/api/transmissions.html?highlight=transactional#sparkpost.transmissions.Transmissions.sendjgzamora commentedon May 16, 2018
@YPCrumble awesome work digging up all the parts of this issue! I will document
return_pathfor this lib and check if there are any other params that need documenting. It looks like your use case is currently possible, so I'm going close this issue. If you still still think we should update to better match how Django does this, please create another issue so we can discuss it in more detail.