Preventing SPAM feeling when subscribed

Preventing SPAM feeling when subscribed

by Darren Smith -
Number of replies: 8
We all know that a lot of new moodlers do get confused when they start to receive e-mails from forums which they have posted / subscribed to.

I have also had complaints and confusion from students this week about other teachers over using (IMHO) their news forums.

I have noticed in the footer of some forum posts sent by email from another site they include something like ...


Go to the below address to turn off forum emailing:
http://moodle.org/somethiunglike/forumname=unsubscribe


... which I think would be great. You could also have one something like:


You are receiving this email because you previously enrolled on the Using Moodle course at www.moodle.org
To unenroll from this course follow the link below.



Thoughts?
Average of ratings: -
In reply to Darren Smith

Re: Preventing SPAM feeling when subscribed

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Darren,

Perhaps you could consider making "Complete (daily email with full posts)" the default email digest type instead of "No digest (single email per forum post)"?

I've done so and found that everyone loves receiving just one email per day! big grin Teachers comment about Moodle being very clever sending a single email each day! wink
In reply to Helen Foster

Re: Preventing SPAM feeling when subscribed

by Darren Smith -
Hello

I could change the default to digest which would reduce the traffic from certain courses but it would still not explaing to the kids why they were getting them. Of course we explain it in lessons but you know what kids are like.

Actually, I could just hard code a static footer - this must be fairly straight forward to do. Anyone care to give me a clue on which file I need to edit?

TIA

Darren
In reply to Darren Smith

Re: Preventing SPAM feeling when subscribed

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Darren, the file you need is mod/forum/lib.php

I have edited mine to say: You have received this email because you are a member of the Virtual Learning Centre at www.baillie.org.uk

which appears immediately before the normal "Unsubscribe from this forum" link.

You need to edit the fourth instance of $canunsubscribe (about line 662) for plain text emails and the sixth instance (about line 701) for HTML emails.

So for the section for plain text emails, the code would look like this:

if (!$bare && $canunsubscribe) {

$posttext .= "\n---------------------------------------------------------------------\n";

$posttext .= "You have received this email because you are a member of the Virtual Learning Centre at www.baillie.org.uk.";

$posttext .= "\n\n";

$posttext .= get_string("unsubscribe", "forum");

$posttext .= ": $CFG->wwwroot/mod/forum/subscribe.php?id=$forum->id\n";

}

and for the HTML emails it would look like this:

if ($canunsubscribe) {

$posthtml .= '<br /><div class="unsubscribelink">You have received this email because you are a member of the Virtual Learning Centre at <a href="http://www.baillie.org.uk">www.baillie.org.uk</a><br /><a href="Click here to '.$CFG->wwwroot.'/mod/forum/subscribe.php?id='.$forum->id.'">'.

get_string('unsubscribe', 'forum').'</a></div>';

}

$posthtml .= '</body>';

return $posthtml;

}

There's probably a much better way than hard-coding it, but I hope this helps until someone else chips into the discussion!
In reply to Jon Bolton

Re: Preventing SPAM feeling when subscribed

by Darren Smith -
Superb. Thanks for your time on this. I will do this in the morning.

Thanks again cool
In reply to Darren Smith

Re: Preventing SPAM feeling when subscribed

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes, I think the last one is very good.
Note it can only be shown if the student has the right to unenroll or turn off getting forum posts.

Just yesterday I had a rather nervous mail from a father who has received suddenly over hundred mails in one afternoon, because his doughter created two accounts (forgotten password and not looked good enough for the button - happens also all the time) with different aliasses from her fathers mailbox and was twice in a course that suddenly became rather busy (due to exams smile ).
In reply to Darren Smith

Re: Preventing SPAM feeling when subscribed

by N Hansen -
Darren-Are you sure you didn't fiddle with something in your installation? All the emails from my site come with a footer that says "Stop sending me email from this forum." I think this is standard for Moodle, isn't it?
In reply to N Hansen

Re: Preventing SPAM feeling when subscribed

by Darren Smith -
Hello. Thanks for the reply.

Right on cue a student just made a post to our Moodle install smile

All it has at the bottom is show parent and reply to forum and that's it sad

This is on 1.4.4+. I have not used forums/email on 1.5 much yet. Is this a new feature perhaps?
In reply to Darren Smith

Re: Preventing SPAM feeling when subscribed

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Ah, that's a different issue... the unsubscribe link will only show in emails IF the student is allowed to unsubscribe from the forum.

Check the settings for "Force everyone to be subscribed?" in the Forum settings. The unsubscribe link will only show in emails if the settings is at NO or YES, INITIALLY.