Skip to content
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

Permission error thrown when setting default a from_email_name through Django send_mail syntax #156

Open
chrisconlan opened this issue Jul 5, 2018 · 0 comments

Comments

@chrisconlan
Copy link

chrisconlan commented Jul 5, 2018

Supposedly, Django expects the following syntax when setting a display name for the from email:
https://stackoverflow.com/questions/9911542/how-to-specify-name-in-django-mail

DEFAULT_FROM_EMAIL = 'My Company Name <do_not_reply@example.com>'

When I use that syntax with django-ses, and supply it to the sender= argument, I get a Boto error:

boto.exception.BotoServerError: BotoServerError: 403 Forbidden
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
  <Error>
    <Type>Sender</Type>
    <Code>AccessDenied</Code>
    <Message>User xxxxxxxxxxxxx is not authorized to perform `ses:SendRawEmail' on resource do_not_reply@example.com</Message>
  </Error>
  <RequestId>xxxxxxxxxxxxxxxxxxxxxxx</RequestId>
</ErrorResponse>

When I am otherwise able to send email fine from do_not_reply@example.com if I don't use the Django syntax for supplying a from_email_name.

The error message is a clue that the 'My Company Name <do_not_reply@example.com>' syntax is being parsed correctly at some point, but the permission-checking part is not the same as if I were to supply 'do_not_reply@example.com'.

@chrisconlan chrisconlan changed the title Permission error thrown when setting default a from_email_name through Django send_mail syntax Permission error thrown when setting default a from_email_name through Django send_mail syntax Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant