Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Just done a bit of research for a system I am building into extracting the text from .eml files. so here a first version. Requires apache Commons-mail

<code>

// EMLextract ( fm_fileIn )

// 15_09_03 JRenfrew

// v1.0

// requires commons-mail

// from http://www.cnblogs.com/jiaoyiping/p/3761560.html

 

import org.apache.commons.mail.util.MimeMessageParser

import org.apache.commons.mail.util.MimeMessageUtils

 

removeCarr = { it ->

    return it.replace('\r\n' , '\n').replace('\n\n', '\n')

} //end removeCarr

 

file = new File (fm_fileIn)

mimeMessage = MimeMessageUtils.createMimeMessage(null, file)

parser = new MimeMessageParser(mimeMessage)

parsed = parser.parse()

 

if (parsed.hasPlainContent()){

    //smgetvariable to extract these - also getCc(), getBcc(), getReplyTo(), getTo()

    fm_from = parser.getFrom()

    fm_subj = parser.getSubject()

    return 'FROM: ' + fm_from + '\n' + 'SUBJECT: ' + fm_subj + '\n' + removeCarr(parsed.getPlainContent())

} else if (parser.parse().hasHtmlContent()){

    return removeCarr(parsed.getHtmlContent())

} else {

    return 'no text or html parts found'

} //end if

 

</code>

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.