#199 Add alternative method to test sending emails
Merged by jflory7. Opened by shraddhaag.
fedora-commops/ shraddhaag/fedora-happiness-packets send-mail  into  master

Download 199.patch

This commit adds the configurations to test sending emails using Gmail's SMTP server.

To test these changes:

  1. In settings/dev.py un-comment the Configurations to test sending emails using Gmail SMTP and comment out the Configurations for sending email on console and in docker-compose.yml un-comment the ports in celery service.
  2. Allow less secure apps in the Gmail accont which is to be used here.
    (It is strongly recommended to not allow less secure apps in your primary Gmail account. A separate account for testing is recommended with this setting enabled.)
  3. Replace <HOST@EMAIL.COM> and <HOST_EMAIL_PASSWORD> with the email address of the above account and its password.

@jflory7 Please find the time to review :)

I didn't remove the setting for sending emails on console since that makes more sense in a development environment as it will not lead to a cluster in Inbox. Please let me know if I need to revert that.

Also, if this works out, should I add the above steps in the documentation for others to refer to, should they choose to test this functionality?

Metadata Update from @jflory7:
- Pull-request tagged with: PASSED, improvement, needs testing, type - backend, type - quality assurance
- Request assigned

@jflory7 Please find the time to review :)

This wasn't as big of a change as I thought, actually this is easy to review!

I didn't remove the setting for sending emails on console since that makes more sense in a development environment as it will not lead to a cluster in Inbox. Please let me know if I need to revert that.

I agree this makes sense. :thumbsup:

Also, if this works out, should I add the above steps in the documentation for others to refer to, should they choose to test this functionality?

Yes. Actually this is the only feedback I have for this PR – it would be great if you could update the development environment instructions with an explanation of the two ways to test email functionality (i.e. basically what you wrote in the original comment in this ticket, but maybe an explanation of testing the console method too).

I think for now, you only need to update the "default" dev environment page and not the Windows-only page. Eventually, I want to reorganize the docs so only the Windows-specific variations from our default instructions on that page (so we aren't writing the same documentation twice). I need to get these thoughts into a new ticket.

Anyways this is a long way of me saying don't worry about cleaning up the docs in this PR, but you only have to include docs on the default dev environment docs page.

Metadata Update from @jflory7:
- Pull-request untagged with: needs testing
- Pull-request tagged with: needs changes, type - docs

rebased onto a3c209ef2a3bacd7c5843edd521350b00c366578

rebased onto f8397e273ddfe9bf0954c153b6570c553f7ecdd0

@jflory7 I've included the addition to the docs in this PR itself. I hope the way it's worded is easy enough to follow. Please let me know if I need to revise it.

@shraddhaag Excellent. This looks great! Thanks for working on this. Merging! :checkered_flag:

Pull-Request has been merged by jflory7