From 1833d073970861437206cd6660ce877e7e905bd9 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 23 Aug 2021 11:10:42 +0200 Subject: [PATCH] Messaging/Email: Add Convert_ToEml --- Modules.Messaging/Email2.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules.Messaging/Email2.vb b/Modules.Messaging/Email2.vb index e32c413b..f1151ab3 100644 --- a/Modules.Messaging/Email2.vb +++ b/Modules.Messaging/Email2.vb @@ -391,14 +391,18 @@ Public Class Email2 End Try End Function - Private Function MaybeConvert_MsgToEml(pEmailFileName As String) As String - Dim oInfo As New FileInfo(pEmailFileName) + Public Function Convert_ToEml(pFilePath As String) As String + Return MaybeConvert_MsgToEml(pFilePath) + End Function + + Private Function MaybeConvert_MsgToEml(pEmailFilePath As String) As String + Dim oInfo As New FileInfo(pEmailFilePath) If oInfo.Extension.ToUpper = ".EML" Then - Return pEmailFileName + Return pEmailFilePath ElseIf oInfo.Extension.ToUpper = ".MSG" Then - Return DoConvertMsgToEmlFile(pEmailFileName) + Return DoConvertMsgToEmlFile(pEmailFilePath) Else Return Nothing