Send document from Lectora to email
October 15, 2020 12:00 AM
Hello,
our course has multiple entry fields throughout where the user can type in their answers, which we later display on a printable page at the end course. The page is set up so user can click Print and the document will print as a takeaway. On the Print Dialogue box, the user could also select "save as a PDF" if they have that ability on their own computer. (I assume we cannot create save as a PDF option within Lectora.) So, the Client would like the option to email this document to the user, or perhaps to a manager. Does anyone know if this is possible? Thanks, Heidi
Discussion (6)
It looks as if you can send email if you are using xAPI: https://knowledgebase.elearningbrothers.com/xapi-email-lectora
I haven't tried this, and can't. We don't use xAPI at my company.
Are you trying to print a certificate?
Otherwise, IF they print to PDF, the actual PDF creation is handled outside of Lectora. It will ask them to save the PDF file, which they could then locate and email, or save to a shared file location. I don't think you can email it from there. Or you can create a certificate using KnowledgeLink (our LMS) - not sure if you use that but it's a great product.
Thanks for the offers to help, I appreciate the code also Math!
BTW, this does not have anything to do with a Certificate and the client does not have an LRS and we cannot use a google doc, so the xAPI will not help.
I convinced the client to accept the option Print to PDF (which most users have nowadays), but I wish there was an easy want to send info from Lectora via email.
Math, doesn't that require you to put a valid SMTP password in the JavaScript in cleartext? So anyone looking at the page's code could use your SMTP credentials to spam in your name?
As i have a pure Javascript solution for sending email it is possible to add files to it.
Let me check my code...
Using SMTPJS script to mail directly without a users email-client..
var studentNaam = VarstudentNaam.getValue();
var mailAdress = VarmailAdress2.getValue()
sendEmail(mailAdress,studentNaam,"my subject","my email text");
undefined
TweenMax.to($(".response", getDisplayDocument()), 0.5, {autoAlpha:1})
}
);
}
undefined
So basically you can add any file here...
Regards,
Math
Discussions have been disabled for this post