AttributeError while adding another email address to your account
Bug #1437866 reported by
Pavan Koli
This bug report is a duplicate of:
Bug #1430682: AttributeError at /postorius/users/address_activation/.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Postorius |
In Progress
|
Undecided
|
Pavan Koli |
Bug Description
Under settings tab, after selecting add email address option.
If any email id is entered for saving
The following error arises
AttributeError at /postorius/
'Settings' object has no attribute 'EMAIL_
After looking into it, the error seems to be in models.py file under postorius.
The line containing error(http://
Adding self.mail solves the problem
getattr(settings, 'EMAIL_
Tried after editing the line and got Email address activation sent message on the screen
Attaching a patch
Changed in postorius: | |
status: | New → In Progress |
assignee: | nobody → Pavan Koli (pskoli93) |
To post a comment you must log in.
settings. EMAIL_CONFIRMAT ION_FROM is supposed to contain the general From-Address for email confirmations. self.email in this context however contains the new address someone wants to add to a Mailman user record -- which means the confirmation email would come from the same address it has been sent from.
I think a better fallback for settings. EMAIL_CONFIRMAT ION_FROM could be settings. DEFAULT_ FROM_EMAIL which is suggested as a general Email-` from`-default in the Django docs. If both don't exist it's probably best to raise Django's `ImproperlyConf igured` exception. This will still raise a 500 if settings.DEBUG == False, but the traceback sent to the Admins will be much more meaningful and will alert them to check the configuration rather than looking for a bug in the code.