if password is None substitute settings.EMAIL_HOST_PASSWORD for self.username, if not substitute password for self.password.
self . password = settings . EMAIL_HOST_PASSWORD if password is None else password