Client specifically wants Outlook to open

Jan 11, 2022

Morning everyone!

So here's the difficulty I'm facing. The project is an alcohol quiz (AUDIT) for students, where the higher they score the more resources are offered to them. If the student scores in the highest group, the client wants the student to contact the counsellor via email. However, to verify if they are a student, the email needs to be sent from the students educational Outlook account. 

I've already explained that an email trigger can be added but we cannot - or at least to my knowledge - specify which email client opens. Meaning, if the student has set their default email account to their personal address or Gmail for example, it would open that. Due to the sensitive nature the client needs to involve as few people as possible, and including a 3rd party to check whether those contacting the counsellor via personal emails are infact students is out of the question.

I've seen some older discussions where people have used JavaScript to compose emails. I'm wondering, is there a way using JavaScript to trigger specifically Outlook to open with the recipients email filled in? or am I just being a bit too ambitious here?

 

 **EDIT

I have found that by using javascript triggered to a button I can get Outlook in a browser to open using ``window.open("https://outlook.com/mail/0/")``. This does not open the compose email window or populate the recipient field. I see the ``mailto`` command can be used for that, but I've tried various combinations of what I have read and I cannot get this to work.

Is it even possible to specifically target Outlook on the desktop or browser using javascript and have the recipients email filled in automatically. I don't need the body or subject populated with any text. Just Outlooks compose email open with the recipient email entered.

 

Thanks for any help and advice you can give me here.

6 Replies
Joseph Francis

It sounds to me like maybe the client is specifying the wrong tool for the job. What it sounds like they want is a web application which the user completes an online form, and, based on the achieved score, that result is returned to a specific email address. There is a functional requirement to verify the sender (user of the web form) and a certain level of security.

Ideally, this sounds more like something which should be put together using ASP/VBScript, PHP, or .NET, running on a webserver which has the mailserver enabled. Since you mentioned students, the "gateway" into the web app could be another app (like an LMS or other people system) which passes (via POST) the user's credentials (email address for sure, name optional). When the form is completed, the results could be returned automatically to the recipient email.

Calum Gregory

Okay, so after asking on Stack Overflow (programming forum), it turns out that you cannot open a compose email window in the browser, you can only target a specific URL. To do what I need to do, I would have to target the desktop and that isn't possible with javascript alone.

I decided to go down the route of copying the email address to clipboard and then have the browser open to Outlook. After looking at many discussions on many different forums including here, I finally found one that worked: https://community.articulate.com/discussions/articulate-storyline/how-to-copy-text-to-the-clipboard Thought I'd share it in case anyone comes up with the same query.

Calum Gregory

Thanks for your help Joseph. All of my projects up until now have been published to our LMS, this is the first to be published to web, so I knew I would hit a few walls.

As the project is an alcohol questionnaire, only those who score within a certain margin would be directed to contact a counsellor/service. I have not yet passed information via the LMS in any of my projects, would it be possible to trigger that function in storyline if the student scores in that margin? or would that be down to the LMS?

Sorry for all the questions but your help has really cleared things up.

Thank you.

Joseph Francis

How robust is your LMS? Does it have webforms, a Likert scale-style quiz, or just simple quiz built-in? Maybe, since you already "know" who the student is (as soon as they logged in to the LMS), your form could be built using the tools integrated in to the LMS and have it fire an email at a specific address when certain criteria are met.

Calum Gregory

'Moodle' so pretty robust. That's what I thought, but they want it integrated within their health and wellbeing section on the website. They want something more engaging than (in their words) a drab LMS form or static web product. Because I've only been using SL360 for around 6 months, I was hoping that I may have missed a trick. Seems like it's Form vs Function on this one. I'll see if I can convince them to have this published as a SCORM and linked on the website, that way the information can be passed like you said.

Thanks Joseph for talking this one out with me, really helpful!