diff --git a/server/ui-src/App.vue b/server/ui-src/App.vue index b231ce4..c2361f2 100644 --- a/server/ui-src/App.vue +++ b/server/ui-src/App.vue @@ -173,6 +173,12 @@ export default { new RegExp('cid:'+a.ContentID, 'g'), window.location.origin+'/api/'+d.ID+'/part/'+a.PartID ); + } else if (a.FileName.match(/^[a-zA-Z\_\-\.]+$/)) { + // some old email clients use the filename + d.HTML = d.HTML.replace( + new RegExp('src=(\'|")'+a.FileName+'(\'|")', 'g'), + 'src="'+window.location.origin+'/api/'+d.ID+'/part/'+a.PartID+'"' + ); } } } @@ -185,6 +191,12 @@ export default { new RegExp('cid:'+a.ContentID, 'g'), window.location.origin+'/api/'+d.ID+'/part/'+a.PartID ); + } else if (a.FileName.match(/^[a-zA-Z\_\-\.]+$/)) { + // some old email clients use the filename + d.HTML = d.HTML.replace( + new RegExp('src=(\'|")'+a.FileName+'(\'|")', 'g'), + 'src="'+window.location.origin+'/api/'+d.ID+'/part/'+a.PartID+'"' + ); } } }