Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-57293

Improve emailfromvia lang string

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Install mailcatcher and configure it as your smtp server (https://blog.danpoltawski.co.uk/2014/10/testing-email-features-with-mailcatcher/)
      2. Clear allowedemaildomains setting and emailfromvia settings
      3. Add two users, one with @example.com email address
      4. Enrol one @example.com user as teacher in a course, other user as student
      You'll need to repeat this a number of times for the cases below:
      1. As teacher post a forum post in announcement forum, tick the 'no editing time' button
      2. Run

        php admin/tool/task/cli/schedule_task.php --execute=\\mod_forum\\task\\cron_task
        

        to enforce the mail being sent out

      3. View the headers of the mail's source tab in mailcatcher and pay attention to the 'From' field.
      Case 1
      1. When you first conduct this test with default settings, the mail should always be formatted so From is
        "Name (via siteshortname) <noreplyaddress>"
      Case 2
      1. Now add "example.com" to the allowed domains, it should then become:
        "Name (via siteshortname) <realaddress@example.com>".
      Case 3
      1. If you set emailfromvia to "Only when from a no-reply address" it should become
        "Name <realaddress@example.com>"
      Show
      Setup Install mailcatcher and configure it as your smtp server ( https://blog.danpoltawski.co.uk/2014/10/testing-email-features-with-mailcatcher/ ) Clear allowedemaildomains setting and emailfromvia settings Add two users, one with @example.com email address Enrol one @example.com user as teacher in a course, other user as student You'll need to repeat this a number of times for the cases below: As teacher post a forum post in announcement forum, tick the 'no editing time' button Run php admin/tool/task/cli/schedule_task.php --execute=\\mod_forum\\task\\cron_task to enforce the mail being sent out View the headers of the mail's source tab in mailcatcher and pay attention to the 'From' field. Case 1 When you first conduct this test with default settings, the mail should always be formatted so From is " Name (via siteshortname) <noreplyaddress> " Case 2 Now add " example.com " to the allowed domains, it should then become: " Name (via siteshortname) <realaddress@example.com> ". Case 3 If you set emailfromvia to " Only when from a no-reply address " it should become " Name <realaddress@example.com> "
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-57293-master

      Description

      As suggested by Dan Poltawski in MDLSITE-4856:

      emailvia string could be better - we should strip the https:// part of the url in that lang string, or use the site shortname for the 'via' part to be more pleasing to read.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              tsala Helen Foster
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              cameron1729, David Mudrák (@mudrd8mz), Helen Foster, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jan/17