Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Bourke Hutchinson -
Number of replies: 13
Just wanted to see if anyone out there is using the Moodle Face to Face Module in conjunction with Microsoft Exchange Email Server?

I had previously made a post on this forum in which I indicated that when the .ics attachments come across via email, the .ics is stripped out and it is only a blank email message. I believe that MS Exhange or MS Outlook is stripping out the .ics attachment from Face to Face.

If you are successfully using Moodle Face to Face .ics attachments with MS Exhange and Outlook, was there any special configurations that you had to perform in order to get it working?

Thanks in advance,

BH
Average of ratings: -
In reply to Bourke Hutchinson

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -
I have experienced the same problem. Will be glad to learn of solutions.
In reply to Bourke Hutchinson

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Peter Carrero -
just a quick update: we (Hutch and I) just got the iCal to work through a MS Exchange server! We will go back, document our work and post what we did here.

-pcp
In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -
Waiting to learn of your solution.
This would be helpful.
In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Dustin Elliott -
YES! Please share. smile
In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Peter Carrero -
Alrighty! I got the solution up here. I hope this helps out some folks.

In the interest of searchability, I've c-n-p'd the current text below. Visit the link above the updated info.

Thanks,
-PCP

The Problem

Moodle's Face-to-Face module sends you an iCal invite that is not properly interpreted by MS Outlook client. The iCal invite comes through as a blank attachment. Apparently the iCal worked just fine on OWA and on Evolution running on Linux.

Our Environment

  1. Moodle v.1.94+
  2. MS Exchange server 2003 (don't know which patch level).

Disclaimer

The changes below are what got my problem fixed at work. I don't guarantee that it will work for you. Use this information at your own risk. I also won't pretend this is the best solution out there. I am positive it can be improve in many ways. If you have problems with this solution and if I have the time to revisit this in the future I may look into it.

A Tentative Solution

Change the /moodle/moodlelib.php and the /moodle/mod/facetoface/lib.php files on the following fashion:

moodle/mod/facetoface/lib.php

Around line 1374, change this code:

if (!email_to_user($user, $fromaddress, $attachment['subject'], $attachment['body'],
$attachment['htmlbody'], $attachment['filename'], $attachmentfilename)) {
into this:
if (!email_to_user($user, $fromaddress, $attachment['subject'], file_get_contents($CFG->dataroot . '/' .
 $attachment['filename']),'ical')) {

The change above will use the file attachment as the body if the user opted to send out an iCal invite and add a special marker ("ical") as the parameter for the changes we will make on the moodlelib.php

moodle/moodlelib.php

Around line 4117, after the global and static declarations, add the following code:

if ($messagehtml == 'ical') {
 $messagehtml = '';
 $is_this_an_ical_request = TRUE;
}

This will set a control variable if the user chose to send an iCal. Then, around the new line 4283, right before the if ($mail->Send()) {, add the following code:

if ($is_this_an_ical_request) {
 $mail->ContentType = 'text/calendar; method=REQUEST; charset="UTF-8"';
 $mail->Encoding = 'quoted-printable';
}

In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

Thanks,

Will try and report on outcome.

I believe you mean moodle/lib/moodlelib.php, rather than just moodle/moodlelib.php (doesn't exixt...).

Amir

In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

I did as you instructed, but I get the notification messages with no attachment at all...

Moodle is 1.9.5+ (about a month ago), latest facetoface. Linux redhat server.

In reply to Peter Carrero

iCal with Exchange - Worked for me!

by Dustin Elliott -
Peter,

Good news, I made the changes you suggested on my DEV server and the iCal emails work with Exchange 2003 and Outlook 2003/2007. (Moodle 1.9.5+)

As a note, after the email is sent I get these error messages (see screenshot):

iCal
In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

I tried again and now things worked (thanka!!!)- with limitations - see below.

As a note for an improvement of this in the future, or for integration with core code of facetoface module - when as a course manager I added a date to the session, or when i removed a date, the user registered to the session did not get a notification or an update for the ical meeting. Same was true when I change the date of the original meeting - no update is sent.
User does get an ical meeting cancelation if there is just one date and I canacel the entire session.

One more thing - when a face to face session hase more than one date, again you just get the empty email with no ical attachments.

Thanks again,

Amir

In reply to Amir Elion

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

There is a solution for this:

In Admin > Modules > Activities > Facetoface

Set One message per day as Yes (mark the checkbox).

This will send multiple confirmation emails for multi-day events.

In reply to Peter Carrero

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

Another problem with this:

Users get the emails and outlook notifications, but there is no response possibilities. E.g. they cannot accept the meeting invitation of save it to their calendars. This make the outlook attachment actually meaningless as it does not appear on their calendar.

Any Suggetsions?

In reply to Amir Elion

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Amir Elion -

Another piece of information. The outlook meeting says to users that as the meeting organizer you don't have to respond to this meeting.

Is there a way to change the code fix so that users are not considered meeting organizers by outlook but only to the meeting?

Also - where will the accept message will be sent to once assuming we do get this to work?

In reply to Amir Elion

Re: Is anyone using Moodle Face to Face with Microsoft Exchange as your Email Server?

by Kyla Lacey-Davidson -

Hi Amir 

I know that the last update to this post was in 2010 but I can't seem to find any updates posted more recently. We are using Moodle 2.5 with Echange 2003 and are experiencing these issues.

Happy to test the amendments suggested above, but wondered whether you found a solution/answers to the questions you post above regarding the details of the Outlook appointment?

Thanks Amir

Kyla