Download Gmail Messages as EML Files in Google Drive


This Google Script will help you download your email messages from Gmail to your Google Drive in the EML format.

What is the EML Format

The .eml file format is popular for transferring emails from one email program to another since it complies with the RFC 822 standard and thus can be natively opened inside Apple Mail and Microsoft Outlook. You can even open EML files inside Google Chrome by dragging the file from your desktop onto a new browser table.

EML files contains the email content (email body, header and encoded images and attachments) as plain text in MIME format.

Download Gmail message as EML Files

Inside Gmail, open any email thread, go to the 3-dot menu and choose “Download Message” from the menu. It will turn your current email message into an eml file and save it your desktop.

However, if you wish to automate the process and download multiple emails as eml files in your Google Drive, Apps Script can help.

const downloadEmails = () => {
  const sender = 'sender@domain.com';
  const threads = GmailApp.search(`from:${sender}`).slice(0, 10);
  threads.forEach((thread) => {
    const subject = thread.getFirstMessageSubject();
    const [message] = thread.getMessages();
    const rawContent = message.getRawContent();
    const blob = Utilities.newBlob(rawContent, null, `${subject}.eml`);
    const file = DriveApp.createFile(blob);
    Logger.log(subject, file.getUrl());
  });
};

The script searches for emails from the specified sender, gets the first email message and downloads it your Google Drive.

Forward Gmail as EML Attachment

If you are to forward an email message as an attachment, the .eml format may be recommended since it preserves all the formatting and attachments of the original email thread in a single file that can be attached to the email.

const forwardEmail = () => {
  const messageId = '123';
  const message = GmailApp.getMessageById(messageId);
  const rawContent = message.getRawContent();
  const blob = Utilities.newBlob(rawContent, null, `email.eml`);
  GmailApp.sendEmail('to@gmail.com', 'This email contains an eml file', '', {
    attachments: [blob],
  });
};

Also see: Download Gmail as PDF Files



Source link

Focus shifts to EML as icare critics smell blood


In a submission, grocery wholesaler Metcash which pays premiums to icare, wrote: “Return to Work Rate outcomes are primarily driven by the employer, there is limited support from EML… Delays in treatment from EML unless the employer or rehab provider continuously follows up.”

EY wrote, “EML case managers have a lack of personal injury case management experience and this is leading to a lack of proactive decision-making and a passive approach to managing claims.”

Icare blindsided the industry when it decided to move from multiple insurance agents to a single agent EML to manage all new workers compensation claims from January 2018.

Besides not being told the tender was for a single agent, industry insiders recalled South Australia’s experience when it appointed EML as a single agent for handling workers compensation claims more than a decade earlier.

The SA scheme suffered deteriorating finances and a blowout in costs. Indeed, a parliamentary report in 2010 noted that EML’s fees jumped from $25 million in 2006 to almost $50 million two years later.

The parliamentary report quoted the then chairman of the workers compensation scheme saying there were issues including staff turnover and the “impact on case management outcomes, customer service standards, ongoing training and support to case managers following induction; and ensuring return to work was the priority focus across the scheme.”

This was reiterated by an independent report by PWC in 2011 which described the claims management as weak “with limited upfront and strategic case management practice” and a “reported lack of experience among agent case managers to make fast and informed decisions.”

SA decided to open up the system to competition.

Fast forward to 2018 and the NSW workers compensation regulator, the State Insurance Regulation Authority (SIRA), was concerned about icare and the decision to move to a new claims management system and a single agent. It commissioned EY to a health check on the workers compensation scheme.

The report, obtained by The Sydney Morning Herald and The Age, gave icare a red rating for operational risk. Released to SIRA in April 2018, it noted that 10,000 workers compensation claims were unable to be matched to an underlying policy file. It said EML was using a “laborious” manual procedure to do the matching which was resulting in backlogs and delays in managing claims. It said caseloads for claims managers within EML were up to 100 per cent greater than accepted industry norms, which could have an adverse impact on claims management.

Even more damning, the EY report said a “lack of workers compensation experience” among claims team leaders at EML “can result in claims officers not getting the support they need in regard to difficult decisions with complex claims.”

David Bruce, a 27-year-old who had a back injury at work in September 2018, is one of a number of injured workers who suffered as a consequence of icare and EML.

Injured worker David BruceCredit:Kate Geraghty

“The case managers never returned a phone call once in a period of six months,” he said.

Since September 2018, Bruce has churned through more than 15 EML case managers – equivalent to almost one a month – which he says resulted in delays and denials of treatment and culminated in a secondary injury requiring a second surgery.

“I think I’d be back at work now. I think I’d be back to pre-injury if I had been treated early enough,” he said.

But EML doesn’t just operate in NSW and SA.

A report released in December 2019 by the Victorian Ombudsman discussed EML as part of an investigation into workers compensation and the management of complex claims.

The report lays bare how insurance agents are rewarded if they meet set targets to kick people off the workers compensation system. It includes a series of internal emails from insurance agents including EML.

In one email the insurance agent had its eye on a hefty bonus. “…we cannot take our foot off the accelerator as Maximum Reward for this measure is currently worth $687,000! … we can do this!!”

Mark Coyne resigned from the ARLC after news broke of his arrest in Singapore.

Mark Coyne resigned from the ARLC after news broke of his arrest in Singapore.Credit:Edwina Pickles

EML, which didn’t respond to questions for this column, calls itself a mutual. Its public face is former Queensland rugby league star Mark Coyne, who fronted parliament on Monday.

But behind the mutual is a nest of companies owned by partners including former Macquarie banker Cameron McCullagh, and former fund managers Angus Gluskie and Andrew Fleetwood.

Interestingly lobbying firm PremierState, which is run by Liberal powerbroker Michael Photios, includes EML as one of its clients.

Indeed, EML confirmed on Monday that it had employed David Begg, a former business partner of Photios and is who is married to NSW upper house MP Natalie Ward.

Since the workers compensation scandal broke in a joint investigation with The Sydney Morning Herald, The Age and Four Corners, hundreds of injured workers, insiders from Treasury, politics, the insurance industry and icare have come forward, with new evidence about a system that is failing injured workers and the employers who bankroll the system.

The scandal has forced resignations including icare’s chief executive John Nagle, an icare director and the chief of staff to the NSW Treasurer Dominic Perrottet.

But besides a few heads rolling, little has changed to improve the lot of injured workers or employers who spend a fortune each year in premiums.

This is why NSW Labor finance spokesman Daniel Mookhey led a confidence motion in the board and Treasurer in the state’s upper house. “Nothing will change unless the people in charge of this scheme change. The Treasurer has to go. The board has to go,” he said in parliament this week.

The NSW Legislative Council rejected the motion 21 to 20 votes, allowing the board and Treasurer to hang on by the skin of their teeth thanks to a casting vote by the chamber’s president Liberal MP John Ajaka. But the clock is ticking for change.

Most Viewed in Business

Loading



Source link