Language-specific emails for supportemail setting?

Language-specific emails for supportemail setting?

by David Loscutoff -
Number of replies: 1

We just added Spanish-language support for our Moodle site, along with a soporte at nts dot edu email in addition to our usual support at nts dot edu email. However, our supportemail setting contains support at nts dot edu, and so that address is the only one that shows up in the $a->signoff section of our emails. Thus, some of our Spanish-speaking students have been emailing support instead of soporte. If at all possible, we want the Spanish support emails to go to soporte and the English ones to go to support.

What I could do: Hack the generate_email_signoff() function (in lib/moodlelib.php) to add the soporte address to the signoff. It's ugly, and I don't like customizing in the code like that, but it would work.

What would be nice: Allow a comma-separated list of emails in the supportemail field. I saw MDL-14559's reasons for not doing this, but there only seem to be two places where supportemail is used for sending email: lib/datalib.php (line 1739) and lib/moodlelib.php (line 5433, where $CFG->supportemail is copied to $supportuser->email for later use elsewhere). It shouldn't be too hard to change these two places to use only the first support email listed. (Use explode(',', $CFG->supportemail)[0] if my PHP is correct. I can put together a patch for that.) Or, add a new setting such as secondarysupportemails that will take a list of emails and modify the generate_email_signoff() function to add them at the proper place in $a->signoff.

What would be really nice: Add the capability to associate different support emails with different languages (so if a student sets their language to ES, they get an email from soporte at nts dot edu). This seems pretty complicated, but it's what I would choose if I had my druthers.

Thoughts? Anyone else with multilingual Moodle sites have any experience with this sort of thing?  Should I submit a feature request?

Average of ratings: -
In reply to David Loscutoff

Re: Language-specific emails for supportemail setting?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi,

What would be good would be to use multilang filter to specify email adress for each wanted language... and have it used well after that wink

Séverin