Skip to content

Test stage of server does not take from email in settings #8885

Open
@cweitat

Description

@cweitat

Describe the bug
Currently in the test version, the server does not take From Email into part of the payload that is sent to sendgrid, resulting in 403 Forbidden as Sendgrid only allows authenticated domains to send from. Currently its hardcoded in the settings to [email protected] as seen from the logs.
image
image

Current circumvent have added fossasia.org to Sendgrid to allow test server to be functioned

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Admin
  2. Go to 'Mail Settings'
  3. Send Test email
  4. 403 Error if not a eventyay or fossasia domain

Expected behavior
Should reference to user's domain

Stacktrace
Triggers send email function

def send_email(to, action, subject, html, attachments=None, bcc=None, reply_to=None):

Function check for ENV state, email from is taken off build config if in ENV = TEST

def get_settings(from_db=False):

Issue was brought up indirectly in 2018 #4910 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Inbox

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions