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

Improve emailfromvia lang string

XMLWordPrintable

    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_32_STABLE
    • MDL-57293-master
    • 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> "

      As suggested by 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.

            poltawski Dan Poltawski
            tsala Helen Foster
            Jun Pataleta Jun Pataleta
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.