Skip to content

Better explain the most common problems when testing emails #7115

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

Closed
wants to merge 6 commits into from

Conversation

javiereguiluz
Copy link
Member

Testing emails is simple but in the past I've suffered lots of problems related to this. In fact, a few minutes ago I fixed a long standing wrong test thanks to this comment about page redirections and collectors: symfony/symfony#20282 (comment)

I propose to create a new mini section to better explain the problems that you may face when testing emails.


If the action that sends the email redirects to another page (for example when
you send an email after a form is processed and before redirecting to another
page) make sure that the test client doesn't follow the redirects, as explained
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing comma after the closing parenthesis

If the action that sends the email redirects to another page (for example when
you send an email after a form is processed and before redirecting to another
page), make sure that the test client doesn't follow the redirects, as explained
in :doc:`/testing`. Otherwise, the collector will lose the original email when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last sentence is a bit misleading. It's not that the collector loses the mail, but that you are just looking at the "wrong" profile after being redirected, right?

@xabbuh
Copy link
Member

xabbuh commented Nov 6, 2016

👍 Great work Javier!

Status: Reviewed

@wouterj
Copy link
Member

wouterj commented Nov 7, 2016

Are there any specific error messages/problem descriptions that lead to one of these 2 problems? I like troubleshooting sections, but it would be even greater if it's structured like:

## Problem: The mail collector returns `null`

The profiler must be enabled ...

## Problem: The email is not listed in the collections

Make sure you don't allow redirections ...

@javiereguiluz
Copy link
Member Author

@wouterj I agree. I've added some subtitles. Thanks!

@wouterj
Copy link
Member

wouterj commented Nov 7, 2016

(btw, my subtitles where just examples, I don't know if these are the true indicators of the problems).

If you've checked the cases: 👍 Otherwise, please check before merging :)

@xabbuh
Copy link
Member

xabbuh commented Nov 22, 2016

@javiereguiluz What about Wouter's last comment?

@javiereguiluz
Copy link
Member Author

@xabbuh I've made some minor rewords.

@xabbuh
Copy link
Member

xabbuh commented Nov 28, 2016

Thank you @javiereguiluz.

xabbuh added a commit that referenced this pull request Nov 28, 2016
…ls (javiereguiluz)

This PR was squashed before being merged into the 2.7 branch (closes #7115).

Discussion
----------

Better explain the most common problems when testing emails

Testing emails is simple but in the past I've suffered lots of problems related to this. In fact, a few minutes ago I fixed a long standing wrong test thanks to this comment about page redirections and collectors: symfony/symfony#20282 (comment)

I propose to create a new mini section to better explain the problems that you may face when testing emails.

Commits
-------

c2e0608 Better explain the most common problems when testing emails
xabbuh added a commit that referenced this pull request Nov 28, 2016
@xabbuh xabbuh closed this Nov 28, 2016
xabbuh added a commit that referenced this pull request Dec 1, 2016
* 2.7: (31 commits)
  fix a typo
  [#7115] fix headlines
  Better explain the most common problems when testing emails
  Clarify the mappings that require no method prefix.
  Make some long lines shorter to fit our soft limit of 80 chars per line
  Microsoft Azure update step by step article and screenshots for the new Microsoft Azure Portal
  Minor rewords in the text and the code example
  Update questionhelper.rst
  Add docs about console question answer normalizing.
  [#7105] add XML and PHP service config examples
  Minor rewordings
  When talking about generic responses, don't spell it as Response (which is a Symfony class)
  xabbuh review
  fix typo
  fix yml marker to yaml
  add documentation about access denied handler
  Update outdated link to AWS ELB security groups
  Added missing comma
  Reworded the caution about open redirects
  Warn user about open redirects
  ...
xabbuh added a commit that referenced this pull request Dec 2, 2016
* 2.8: (37 commits)
  fix a typo
  [#7115] fix headlines
  Better explain the most common problems when testing emails
  Clarify the mappings that require no method prefix.
  Make some long lines shorter to fit our soft limit of 80 chars per line
  Microsoft Azure update step by step article and screenshots for the new Microsoft Azure Portal
  Minor rewords in the text and the code example
  Update questionhelper.rst
  Add docs about console question answer normalizing.
  [#7105] add XML and PHP service config examples
  Minor rewordings
  When talking about generic responses, don't spell it as Response (which is a Symfony class)
  xabbuh review
  fix typo
  fix yml marker to yaml
  add documentation about access denied handler
  Update outdated link to AWS ELB security groups
  Added missing comma
  Reworded the caution about open redirects
  Warn user about open redirects
  ...
xabbuh added a commit that referenced this pull request Dec 2, 2016
* 3.1: (41 commits)
  fix a typo
  [#7115] fix headlines
  Better explain the most common problems when testing emails
  Clarify the mappings that require no method prefix.
  Make some long lines shorter to fit our soft limit of 80 chars per line
  Microsoft Azure update step by step article and screenshots for the new Microsoft Azure Portal
  Minor rewords in the text and the code example
  Update questionhelper.rst
  Add docs about console question answer normalizing.
  [#7105] add XML and PHP service config examples
  Minor rewordings
  When talking about generic responses, don't spell it as Response (which is a Symfony class)
  xabbuh review
  fix typo
  fix yml marker to yaml
  add documentation about access denied handler
  Update outdated link to AWS ELB security groups
  Added missing comma
  Reworded the caution about open redirects
  Warn user about open redirects
  ...
@javiereguiluz javiereguiluz deleted the email_test branch May 24, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants