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

core\message invalid property replytoname

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4, 3.5
    • Fix Version/s: 3.3.5, 3.4.2
    • Component/s: Email, Messages
    • Labels:
    • Testing Instructions:
      Hide
      Prerequisites
      1. Outgoing email server. Alternatively, you can use Mailcatcher:
        1. Open your terminal
        2. Install Mailcatcher: gem install mailcatcher
        3. Run mailcatcher: mailcatcher
        4. Open your browser and go to http://localhost:1080
        5. Edit your moodle instance's config.php and add the following line:

          $CFG->smtphosts = 'localhost:1025';
          

      Test
      1. Copy emailtest.php to your Moodle root folder.
      2. Login to your Moodle instance as an authenticated user. (admin is fine)
      3. Open the file on your browser (e.g. http://localhost/integration_master/emailtest.php)
        • Confirm that you get a success notification that the email has been sent.
      4. Go to your browser window/tab with the Mailcatcher page.
        • Confirm that you see an email.
      5. View the email's source.
      6. Check the "Reply-To:" field.
        • Confirm it contains the name and email of the user that you used to log in.
      Show
      Prerequisites Outgoing email server. Alternatively, you can use Mailcatcher: Open your terminal Install Mailcatcher: gem install mailcatcher Run mailcatcher: mailcatcher Open your browser and go to http://localhost:1080 Edit your moodle instance's config.php and add the following line: $CFG->smtphosts = 'localhost:1025'; Test Copy emailtest.php to your Moodle root folder. Login to your Moodle instance as an authenticated user. (admin is fine) Open the file on your browser (e.g. http://localhost/integration_master/emailtest.php ) Confirm that you get a success notification that the email has been sent. Go to your browser window/tab with the Mailcatcher page. Confirm that you see an email. View the email's source. Check the "Reply-To:" field. Confirm it contains the name and email of the user that you used to log in.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-60997-master

      Description

      As explained in comment-399078 on MDL-51382
      message_ouput_email::send_message() correctly use "replytoname" (if specified) message/output/email/message_output_email.php#L88 and pass it to email_to_user (message/output/email/message_output_email.php#L94).
      But "replytoname" is not a valid property of core\message (lib/classes/message/message.php#L117) so even if we wanted to we could not use it.

      In my (misplaced) commit b5aaa1 on MDL-51382 i set it and use it in forum_cron() to see the original post author when replying by mail.

      As suggested by Ben Chenoweth in his comment-490402 on MDL-51382 i think we should include it into master.

      I'll provide a patch without forum_cron() changes.

      Should i add them or should it be discussed in an other issue ?

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  19/Mar/18