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

XOAuth: Sending mail via Google using smptmailer results in exception: call to a member functionhasExpired() on string

XMLWordPrintable

    • 2
    • Team Hedgehogs 2025 Sprint 1.2, Team Hedgehogs 2025 Sprint 1.3

      Sending a message as an email to users results in the following crashlog. The email does appear to be sent. Logging shows that the string in question seems to be an access token string, rather than an oauthToken object.

      Default exception handler: Exception - Call to a member function
      hasExpired() on string Debug:
      Error code: generalexceptionmessage

      • line 128 of /lib/phpmailer/src/OAuth.php: Error thrown
      • line 618 of /lib/phpmailer/src/SMTP.php: call to PHPMailer\PHPMailer\OAuth->getOauth64()
      • line 2262 of /lib/phpmailer/src/PHPMailer.php: call to PHPMailer\PHPMailer\SMTP->authenticate()
      • line 2062 of /lib/phpmailer/src/PHPMailer.php: call to PHPMailer\PHPMailer\PHPMailer->smtpConnect()
      • line 1689 of /lib/phpmailer/src/PHPMailer.php: call to PHPMailer\PHPMailer\PHPMailer->smtpSend()
      • line 145 of /lib/phpmailer/moodle_phpmailer.php: call to PHPMailer\PHPMailer\PHPMailer->postSend()
      • line 1523 of /lib/phpmailer/src/PHPMailer.php: call to moodle_phpmailer->postSend()
      • line 5941 of /lib/moodlelib.php: call to PHPMailer\PHPMailer\PHPMailer->send()
      • line 102 of /message/output/email/message_output_email.php: call to email_to_user()
      • line 506 of /lib/classes/message/manager.php: call to message_output_email->send_message()
      • line 382 of /lib/classes/message/manager.php: call to core\message\manager::call_processors()
      • line 349 of /lib/classes/message/manager.php: call to core\message\manager::send_message_to_processor
        s()
      • line 341 of /lib/messagelib.php: call to core\message\manager::send_message()
      • line 2100 of /blocks/paradigm_enrolment/classes/ParadigmEnrolment.php: call to message_send()
      • line 1645 of /blocks/paradigm_enrolment/classes/ParadigmEnrolment.php: call to block_paradigm_enrolme
        nt\ParadigmEnrolment->send_notification()
      • line 214 of /blocks/paradigm_enrolment/data.php: call to block_paradigm_enrolment\ParadigmEnrolment->
        submit_enrolment_application()

            huongn@moodle.com Huong Nguyen
            nicholasvanoudtshoorn Nicholas van Oudtshoorn
            Raquel Ortega Raquel Ortega
            David Woloszyn David Woloszyn
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 4 hours, 46 minutes
                1w 4h 46m

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