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

core\message invalid property replytoname

XMLWordPrintable

    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-60997-master
    • 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.

      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 benchen71 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 ?

            ak4t0sh Arnaud Trouvé
            ak4t0sh Arnaud Trouvé
            Jun Pataleta Jun Pataleta
            David Monllaó David Monllaó
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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