Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
wiassaibling Absent Member.
Absent Member.
2677 views

Problem with Dot(.) in email Address

Hi,

I wrote the topic already in DEV: GroupWise Tokens. But I received no reply.
Maybe someone can help me here.

I send with a VB Code (Word VBA 2007) an GW 7.0.3 Build 1294 a Mail to a Mail Address eg abc.defg@abc.de

The Postmaster of abc.de recives abc@abc.de


someone knows what is wrong here?
tnx for help

Here is the complete code

'/// Send mail with GW //
Sub Send_GW_Mail(ByVal SinSendOpt As Single, _
ByVal StrMail_To As String, _
ByVal StrMail_Cc As String, _
ByVal StrMail_Bcc As String, _
ByVal StrMail_Betreff As String, _
ByVal SinAZ As Single, _
ByVal StrAnlagen As String, _
ByVal StrMail_Text As String, _
ByVal StrFuss_text As String)



Dim GW As Variant
Dim Acc As Variant
Dim GWMailFolder As Variant
Dim GWMessages As Variant
Dim GWMessage As Variant
Dim GWDraftMsg As Variant
Dim GWRecips As Variant
Dim GWRecip As Variant
Dim sRecieverTo, sRecieverCC, sRecieverBcc As String
Dim SenderDisplayName As String
Dim SenderEmailAddress As String
Dim CreationDate As Date
Dim iCount As Integer
Dim vCommander As Variant
Dim ParamStr As String
Dim MyMsgID As String
Dim sResult As String
Dim iRet As Integer
Dim sDOT, RecDot
Dim iPos, RecPos
Dim SenderEmailAddressType
Dim sAttachment
Dim egwIncoming, egwMessagePrivate, egwNormal, egwDefaultSecurity
Dim ToDot, CcDot, BcDot
Dim iElement As Long
Dim GWAddrBook As Object
Dim GWAccount As Object
Dim GWEntry As Object
Dim GWEntries As Object




Set GW = CreateObject("NovellGroupWareSession")
Set GWAccount = GW.Login()
Set GWAddrBook = GWAccount.AddressBooks("Primärbuch")


Set Acc = GW.Login
Set GWMailFolder = Acc.Mailbox
Set GWMessages = GWMailFolder.Messages
Set GWDraftMsg = GWMessages.Add("GW.MESSAGE.MAIL", "Draft")


sRecieverTo = StrMail_To
sRecieverCC = StrMail_Cc
sRecieverBcc = StrMail_Bcc


' Mail Betreff definieren
If StrMail_Betreff > "" Then GWDraftMsg.Subject = StrMail_Betreff

' Mail text (Body) definieren
GWDraftMsg.BodyText = StrMail_Text & Chr$(13) & vbCrLf & Chr$(13) & vbCrLf & Chr$(13) & vbCrLf & StrFuss_text

' Sender Name
GWDraftMsg.FromText = Acc.RootFolder.Name




' Anlagen Anfügen ################################################## ###

For II = 1 To SinAZ

If StrAnlagen(II) = "" Then
'nix
Else
GWDraftMsg.Attachments.Add StrAnlagen(II)
End If


Next II

' E-Mail Adresse zuweisen ################################################## ######
Set GWRecips = GWDraftMsg.Recipients

'Wenn ein Komma kommt
sRecieverTo = Replace(sRecieverTo, ",", ";", 1)
sRecieverCC = Replace(sRecieverCC, ",", ";", 1)
sRecieverBcc = Replace(sRecieverBcc, ",", ";", 1)

'Email Empfänger Aufsplitten
ToDot = Split(sRecieverTo, ";")
CcDot = Split(sRecieverCC, ";")
BcDot = Split(sRecieverBcc, ";")

' MailTo Zuweisen
Dim StrDisplayName, StrMailAdress

For iElement = 0 To UBound(ToDot)

If ToDot(iElement) = "" Then
Exit For
Else
StrMailAdress = CStr(Trim((ToDot(iElement))))
StrDisplayName = Split(CStr(Trim((ToDot(iElement)))), "@", , vbTextCompare)
StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, , vbTextCompare)

Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse> Matches " & """" & StrMailAdress & """" & ")")

If GWEntries.Count > 0 Then
Set GWEntry = GWEntries.Item(1)
Else
Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ), StrMailAdress, "NGW", "")

End If



Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 0) '1 = CC and 2 = BC
GWRecip.DisplayName = GWEntry.DisplayName
GWDraftMsg.Recipients.Resolve
'GWRecip.EmailType = "NGW"

End If
Next iElement

Erase StrDisplayName
StrMailAdress = ""

For iElement = 0 To UBound(CcDot)
If CcDot(iElement) = "" Then
Exit For
Else

StrMailAdress = CStr(Trim((CcDot(iElement))))
StrDisplayName = Split(CStr(Trim((CcDot(iElement)))), "@", , vbTextCompare)
StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, , vbTextCompare)

Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse> Matches " & """" & StrMailAdress & """" & ")")

If GWEntries.Count > 0 Then
Set GWEntry = GWEntries.Item(1)
Else
Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ), StrMailAdress, "NGW", "")

End If



Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 1) '1 = CC and 2 = BC
GWRecip.DisplayName = GWEntry.DisplayName
GWDraftMsg.Recipients.Resolve

End If
Next iElement

Erase StrDisplayName
StrMailAdress = ""

For iElement = 0 To UBound(BcDot)
If BcDot(iElement) = "" Then
Exit For
Else

StrMailAdress = CStr(Trim((BcDot(iElement))))
StrDisplayName = Split(CStr(Trim((BcDot(iElement)))), "@", , vbTextCompare)
StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, , vbTextCompare)

Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse> Matches " & """" & StrMailAdress & """" & ")")

If GWEntries.Count > 0 Then
Set GWEntry = GWEntries.Item(1)
Else
Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ), StrMailAdress, "NGW", "")

End If



Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 2) '1 = CC and 2 = BC
GWRecip.DisplayName = GWEntry.DisplayName
GWDraftMsg.Recipients.Resolve


End If
Next iElement

Erase StrDisplayName
StrMailAdress = ""



SenderDisplayName = ""
SenderEmailAddress = ""
SenderEmailAddressType = "NGW"
CreationDate = Now


Set GWMessage = GWMessages.AddExistingMessage(SenderDisplayName, SenderEmailAddress, SenderEmailAddressType, _
CreationDate, egwIncoming, egwMessagePrivate, egwNormal, egwDefaultSecurity, GWDraftMsg)

GWMailFolder.Refresh

Set GWMessages = Nothing
Set GWMessages = GWMailFolder.Messages

' Send or Show - 1 = sho Msg / 2 = send direct
'///////////////////////////////////////////////////////

If SinSendOpt = 1 Then
' Open the new message to view it and add recipient(s) manually
MyMsgID = GWMessage.MessageID
Set vCommander = CreateObject("GroupWiseCommander")
ParamStr = "ItemOpen(""" + MyMsgID + """)"
iRet = vCommander.Execute(ParamStr, sResult)
GWMessage.Delete
Exit Sub

ElseIf SinSendOpt = 2 Then
' Direkt senden
GWMessage.Send
GWMessage.Delete
MsgBox "Ihre Mail wurde gesendet!", vbInformation, "Mail sent"

Else
' Open the new message to view it and add recipient(s) manually
MyMsgID = GWMessage.MessageID
Set vCommander = CreateObject("GroupWiseCommander")
ParamStr = "ItemOpen(""" + MyMsgID + """)"
iRet = vCommander.Execute(ParamStr, sResult)
GWMessage.Delete
Exit Sub

End If

'resetVariables
call ResetVariables
'VariablenZurücksetzten

Helmut Frank Germany
Labels (1)
0 Likes
6 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Problem with Dot (.) in email Address

I've seen the problem before, I just don't
remember the details. It will be awhile
before I can look at the issue. One thing
you could do is try the same problem on
8.0. If it works on 8.0 that is where the
fix would go anyway. The fix would not go
into 7.0.x.

Preston

>>> On Tuesday, April 28, 2009 at 9:46 AM,

wiassaibling<wiassaibling@no-mx.forums.novell.com> wrote:

> Hi,
>
> I wrote the topic already in DEV: GroupWise Tokens. But I received no
> reply.
> Maybe someone can help me here.
>
> I send with a VB Code (Word VBA 2007) an GW 7.0.3 Build 1294 a Mail to
> a Mail Address eg _abc.defg@abc.de_
>
> The Postmaster of abc.de recives _abc@abc.de_
>
>
> someone knows what is wrong here?
> tnx for help
>
> Here is the complete code
>
> '/// Send mail with GW //
> Sub Send_GW_Mail(ByVal SinSendOpt As Single, _
> ByVal StrMail_To As String, _
> ByVal StrMail_Cc As String, _
> ByVal StrMail_Bcc As String, _
> ByVal StrMail_Betreff As String, _
> ByVal SinAZ As Single, _
> ByVal StrAnlagen As String, _
> ByVal StrMail_Text As String, _
> ByVal StrFuss_text As String)
>
>
>
> Dim GW As Variant
> Dim Acc As Variant
> Dim GWMailFolder As Variant
> Dim GWMessages As Variant
> Dim GWMessage As Variant
> Dim GWDraftMsg As Variant
> Dim GWRecips As Variant
> Dim GWRecip As Variant
> Dim sRecieverTo, sRecieverCC, sRecieverBcc As String
> Dim SenderDisplayName As String
> Dim SenderEmailAddress As String
> Dim CreationDate As Date
> Dim iCount As Integer
> Dim vCommander As Variant
> Dim ParamStr As String
> Dim MyMsgID As String
> Dim sResult As String
> Dim iRet As Integer
> Dim sDOT, RecDot
> Dim iPos, RecPos
> Dim SenderEmailAddressType
> Dim sAttachment
> Dim egwIncoming, egwMessagePrivate, egwNormal, egwDefaultSecurity
> Dim ToDot, CcDot, BcDot
> Dim iElement As Long
> Dim GWAddrBook As Object
> Dim GWAccount As Object
> Dim GWEntry As Object
> Dim GWEntries As Object
>
>
>
>
> Set GW = CreateObject("NovellGroupWareSession")
> Set GWAccount = GW.Login()
> Set GWAddrBook = GWAccount.AddressBooks("Primärbuch")
>
>
> Set Acc = GW.Login
> Set GWMailFolder = Acc.Mailbox
> Set GWMessages = GWMailFolder.Messages
> Set GWDraftMsg = GWMessages.Add("GW.MESSAGE.MAIL", "Draft")
>
>
> sRecieverTo = StrMail_To
> sRecieverCC = StrMail_Cc
> sRecieverBcc = StrMail_Bcc
>
>
> ' Mail Betreff definieren
> If StrMail_Betreff > "" Then GWDraftMsg.Subject = StrMail_Betreff
>
> ' Mail text (Body) definieren
> GWDraftMsg.BodyText = StrMail_Text & Chr$(13) & vbCrLf & Chr$(13) &
> vbCrLf & Chr$(13) & vbCrLf & StrFuss_text
>
> ' Sender Name
> GWDraftMsg.FromText = Acc.RootFolder.Name
>
>
>
>
> ' Anlagen Anfügen ##################################################
> ###
>
> For II = 1 To SinAZ
>
> If StrAnlagen(II) = "" Then
> 'nix
> Else
> GWDraftMsg.Attachments.Add StrAnlagen(II)
> End If
>
>
> Next II
>
> ' E-Mail Adresse zuweisen
> ################################################## ######
> Set GWRecips = GWDraftMsg.Recipients
>
> 'Wenn ein Komma kommt
> sRecieverTo = Replace(sRecieverTo, ",", ";", 1)
> sRecieverCC = Replace(sRecieverCC, ",", ";", 1)
> sRecieverBcc = Replace(sRecieverBcc, ",", ";", 1)
>
> 'Email Empfänger Aufsplitten
> ToDot = Split(sRecieverTo, ";")
> CcDot = Split(sRecieverCC, ";")
> BcDot = Split(sRecieverBcc, ";")
>
> ' MailTo Zuweisen
> Dim StrDisplayName, StrMailAdress
>
> For iElement = 0 To UBound(ToDot)
>
> If ToDot(iElement) = "" Then
> Exit For
> Else
> StrMailAdress = CStr(Trim((ToDot(iElement))))
> StrDisplayName = Split(CStr(Trim((ToDot(iElement)))), "@", ,
> vbTextCompare)
> StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, ,
> vbTextCompare)
>
> Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse>
> Matches " & """" & StrMailAdress & """" & ")")
>
> If GWEntries.Count > 0 Then
> Set GWEntry = GWEntries.Item(1)
> Else
> Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ),
> StrMailAdress, "NGW", "")
>
> End If
>
>
>
> Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 0) '1 = CC and
> 2 = BC
> GWRecip.DisplayName = GWEntry.DisplayName
> GWDraftMsg.Recipients.Resolve
> 'GWRecip.EmailType = "NGW"
>
> End If
> Next iElement
>
> Erase StrDisplayName
> StrMailAdress = ""
>
> For iElement = 0 To UBound(CcDot)
> If CcDot(iElement) = "" Then
> Exit For
> Else
>
> StrMailAdress = CStr(Trim((CcDot(iElement))))
> StrDisplayName = Split(CStr(Trim((CcDot(iElement)))), "@", ,
> vbTextCompare)
> StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, ,
> vbTextCompare)
>
> Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse>
> Matches " & """" & StrMailAdress & """" & ")")
>
> If GWEntries.Count > 0 Then
> Set GWEntry = GWEntries.Item(1)
> Else
> Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ),
> StrMailAdress, "NGW", "")
>
> End If
>
>
>
> Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 1) '1 = CC and
> 2 = BC
> GWRecip.DisplayName = GWEntry.DisplayName
> GWDraftMsg.Recipients.Resolve
>
> End If
> Next iElement
>
> Erase StrDisplayName
> StrMailAdress = ""
>
> For iElement = 0 To UBound(BcDot)
> If BcDot(iElement) = "" Then
> Exit For
> Else
>
> StrMailAdress = CStr(Trim((BcDot(iElement))))
> StrDisplayName = Split(CStr(Trim((BcDot(iElement)))), "@", ,
> vbTextCompare)
> StrDisplayName(0) = Replace(StrDisplayName(0), ".", " ", 1, ,
> vbTextCompare)
>
> Set GWEntries = GWAddrBook.AddressBookEntries.Find("(<Email-Adresse>
> Matches " & """" & StrMailAdress & """" & ")")
>
> If GWEntries.Count > 0 Then
> Set GWEntry = GWEntries.Item(1)
> Else
> Set GWEntry = GWAddrBook.AddressBookEntries.Add(StrDisplayName(0 ),
> StrMailAdress, "NGW", "")
>
> End If
>
>
>
> Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "NGW", 2) '1 = CC and
> 2 = BC
> GWRecip.DisplayName = GWEntry.DisplayName
> GWDraftMsg.Recipients.Resolve
>
>
> End If
> Next iElement
>
> Erase StrDisplayName
> StrMailAdress = ""
>
>
>
> SenderDisplayName = ""
> SenderEmailAddress = ""
> SenderEmailAddressType = "NGW"
> CreationDate = Now
>
>
> Set GWMessage = GWMessages.AddExistingMessage(SenderDisplayName,
> SenderEmailAddress, SenderEmailAddressType, _
> CreationDate, egwIncoming, egwMessagePrivate, egwNormal,
> egwDefaultSecurity, GWDraftMsg)
>
> GWMailFolder.Refresh
>
> Set GWMessages = Nothing
> Set GWMessages = GWMailFolder.Messages
>
> ' Send or Show - 1 = sho Msg / 2 = send direct
> '///////////////////////////////////////////////////////
>
> If SinSendOpt = 1 Then
> ' Open the new message to view it and add recipient(s) manually
> MyMsgID = GWMessage.MessageID
> Set vCommander = CreateObject("GroupWiseCommander")
> ParamStr = "ItemOpen(""" + MyMsgID + """)"
> iRet = vCommander.Execute(ParamStr, sResult)
> GWMessage.Delete
> Exit Sub
>
> ElseIf SinSendOpt = 2 Then
> ' Direkt senden
> GWMessage.Send
> GWMessage.Delete
> MsgBox "Ihre Mail wurde gesendet!", vbInformation, "Mail sent"
>
> Else
> ' Open the new message to view it and add recipient(s) manually
> MyMsgID = GWMessage.MessageID
> Set vCommander = CreateObject("GroupWiseCommander")
> ParamStr = "ItemOpen(""" + MyMsgID + """)"
> iRet = vCommander.Execute(ParamStr, sResult)
> GWMessage.Delete
> Exit Sub
>
> End If
>
> 'resetVariables
> call ResetVariables
> 'VariablenZurücksetzten

0 Likes
wiassaibling Absent Member.
Absent Member.

Re: Problem with Dot(.) in email Address

Hallo Preston,

tnx for quick answer.

I was able to encircle the problem.

If I use the Option "Direct Send"

***
ElseIf SinSendOpt = 2 Then
' Direkt senden
GWMessage.Send
GWMessage.Delete
MsgBox "Ihre Mail wurde gesendet!", vbInformation, "Mail sent"
***


the mail will be correctly sendt

If I use the Option "Show before send"

***
' Open the new message to view it and add recipient(s) manually
MyMsgID = GWMessage.MessageID
Set vCommander = CreateObject("GroupWiseCommander")
ParamStr = "ItemOpen(""" + MyMsgID + """)"
iRet = vCommander.Execute(ParamStr, sResult)
GWMessage.Delete
***


the error occurs.

I tried the problem with the send option to bypass
I use instead of "NGW" now "internet"

eg
Set GWRecip = GWRecips.Add(GWEntry.EMailAddress, "Internet", 0)

But, the option will create a false entry in Address Book.

"abc.def@abc.internet.MAPI"

Thanks a lot!
Helmut

Helmut Frank Germany
0 Likes
wiassaibling Absent Member.
Absent Member.

Re: Problem with Dot(.) in email Address

Hi Preston,

have you found the problem?

many thanks
Franky

Helmut Frank Germany
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Problem with Dot (.) in email Address

Sorry, It is down quite a ways on my
prioritized list of things to look at.
Have you tried 8.0 yet?

Preston

>>> On Friday, May 08, 2009 at 11:06 AM,

wiassaibling<wiassaibling@no-mx.forums.novell.com> wrote:

> Hi Preston,
>
> have you found the problem?
>
> many thanks
> Franky

0 Likes
wiassaibling Absent Member.
Absent Member.

Re: Problem with Dot(.) in email Address

hi Preston

Thanks for the reply.

I must first install the test server with GW8.
This will take a few days

Or can I connect a Test-Postoffice on the Novell Server?

Tnx
Franky

Helmut Frank Germany
0 Likes
wiassaibling Absent Member.
Absent Member.

Re: Problem with Dot(.) in email Address

hi Preston,

I could connect the Novell.Testserver with a GW 8 Client.

The email address xxxx.yyyyyy@abc.com is properly sent and received


So I know my job.. Install the Gw8 on my servers ! :-))

tnx

Helmut Frank Germany
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.