I just gave this a quick try and had some success.   After the email attachment is created, I can open it in Apple Mail with no issues, but when I open it in Outlook, the message body is missing.   Just wondering if you have the same experience.   Thanks!


Hi Shea,



I am facing the same issue, did you figure out to fix this?



Thanks,


Vignesh


Sadly, I didn't pursue it all the way through.   After getting to this point, I basically validated that it was possible to do this but didn't troubleshoot it all the way to the end.


vondes
Kilo Contributor

Can we use it together with mobile-phone-tracker.org mobile recorder on Android?


Gerry Crumbley
Giga Expert

I've tried this, but can't get it to work. I don't get any Email Body with it. This is the .eml attachment in the INC:

find_real_file.png

Here is the script:

// Note: current.opened_by is already set to the first UserID that matches the From: email address

(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
// Implement email action here
var strEmailContent = email.content_type +"\n"+ email.headers + "\n\n\n\n"+ email.body;
var sa = new GlideSysAttachment();

current.caller_id = gs.getUserID();
current.comments = "forwarded by: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;

current.category = "O365";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";

if (email.body.assign != undefined)
current.assigned_to = email.body.assign;

if (email.body.priority != undefined)
current.priority = email.body.priority;

// map fields that are mandatory or necessary'
sa.write(current, email.subject +".eml", " application/octet-stream ", strEmailContent);

current.insert();

})(current, event, email, logger, classifier);

 

Can someone tell me where the error is?