Certificate (plugin)

'Email others' - email is not being sent

 
 
Picture of Tracey Collins
'Email others' - email is not being sent
 

Hi,

We have been using the Certificate plugin for many years and have always been able to use the 'Email others' feature successfully.

We recently upgraded to Moodle v2.6 and installed the latest Certificate plugin (2013102300). Since the upgrade we have found that no email is being sent (or received) even though a valid email address is entered in the 'Email others' field.

Could you please let me know if there is something else I need to setup to get this to work again or if there is a problem with the plugin?

Thanks,

Tracey

 
Average of ratings: -
Picture of Paul McCullough
Re: 'Email others' - email is not being sent
 

Hi tracey - we updraded to 2.6 recently and we also found that the email notification stopped.  Has anyone found a solution?  This was a great part of the certificate module and I am really missing it!.

 

Thanks,

Paul

 
Average of ratings: -
Grizzly Bear Print with Deer Print
Re: 'Email others' - email is not being sent
 

. . . same dilemma has occurred here . . . after a Moodle upgrade (2.6) the email notifications have stopped . . . anyone with any thoughts/suggestions would be greatly appreciated! smile

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: 'Email others' - email is not being sent
Group DevelopersGroup Particularly helpful Moodlers

Hello,

Yes, the "Email Others" function of the certificate module is no more working.

This is because this function call the email_to_user Moodle function but it is somewhat abusing it as we are not really sending a mail to a real user. email_to_user is now doing some verifications and our fake user is no more accepted

If you activate debugging you will see

Can not send email to null user

    line 5677 of \lib\moodlelib.php: call to debugging()
    line 392 of \mod\certificate\lib.php: call to email_to_user()
    line 658 of \mod\certificate\lib.php: call to certificate_email_others()
    line 88 of \mod\certificate\view.php: call to certificate_get_issue()

I will create a tracker issue and post a quick fix so that users of the certificate module don't have to wait that Mark fix the code (he seems currently very busy working for Moodle HQ)

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: 'Email others' - email is not being sent
Group DevelopersGroup Particularly helpful Moodlers

Tracker issue created CONTRIB-4892.

 

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: 'Email others' - email is not being sent
Group DevelopersGroup Particularly helpful Moodlers

Hello,

To fix the "email others" feature until Mark release  a corrected function, add the line:

$destination->id = 1;

just after the line

$destination = new stdClass;

line 381 in the mod/certificate/lib.php file

After your modification, lines 380-382 should read:

                    $destination = new stdClass;
                    $destination->id = 1;
                    $destination->email = $other;

 
Average of ratings:Useful (1)
Picture of Jean-Michel Védrine
Re: 'Email others' - email is not being sent
Group DevelopersGroup Particularly helpful Moodlers

Hi,

Just to report that this issue is now fixed in Mark's github repository for the master, MOODLE_25_STABLE and MOODLE_24_STABLE.

 

 
Average of ratings:Useful (2)