https://forge.tine20.org/view.php?id=12156
Change-Id: I8d1de866a4ec542fa481b925f48f8afda09a86e5
Reviewed-on: http://gerrit.tine20.com/customers/3511
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
if (mimeType == 'configured') {
var account = Tine.Tinebase.appMgr.get('Felamimail').getAccountStore().getById(message.get('account_id'));
- mimeType = account.get('display_format');
- if (! mimeType.match(/^text\//)) {
- mimeType = 'text/' + mimeType;
+ if (account) {
+ mimeType = account.get('display_format');
+ if (!mimeType.match(/^text\//)) {
+ mimeType = 'text/' + mimeType;
+ }
+ } else {
+ // no account found, might happen for .eml emails
+ mimeType = 'text/plain';
}
}