From a0fe5fdc211655de7d7cc7084dfc3e69f41376cf Mon Sep 17 00:00:00 2001 From: JoeDavis Date: Fri, 30 Jan 2015 13:37:22 -0600 Subject: [PATCH] Fix LastName mapping and bug where forwarding was enabled without forwarding address in hMailServer5 --- .../hMailServer5.vb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb index f4a71cae..4f013d34 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb @@ -377,7 +377,7 @@ Public Class hMailServer5 objAccount.Password = mailbox.Password objAccount.MaxSize = mailbox.MaxMailboxSize objAccount.PersonFirstName = mailbox.FirstName - objAccount.PersonLastName = mailbox.FirstName + objAccount.PersonLastName = mailbox.LastName objAccount.SignatureEnabled = mailbox.SignatureEnabled objAccount.SignaturePlainText = mailbox.Signature objAccount.SignatureHTML = mailbox.SignatureHTML @@ -397,9 +397,12 @@ Public Class hMailServer5 'set forwarding address If mailbox.ForwardingEnabled Then - objAccount.ForwardAddress = mailbox.ForwardingAddresses(0) - objAccount.ForwardEnabled = True - objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy + If Not String.IsNullOrEmpty(mailbox.ForwardingAddresses(0)) Then + 'Log.WriteInfo("forwarding enabled on creation of email account") + objAccount.ForwardAddress = mailbox.ForwardingAddresses(0) + objAccount.ForwardEnabled = True + objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy + End If End If objAccount.Save()