I'm an experienced VBA developer with little knowledge of GW. I'm having partial success with the following code, which I found on GW's website. The email address resolves, a valid message ID is issued, the email shows up in the sent box, but the recipient never receives the message.
You can see that I tried 3 variations on the recipient's name. They all resolve, but are not delivered. What am I doing wrong?
Thanks!
Dim objApp As Application2
Dim objAccount As Account
Dim objDraftMsg As Message
Dim objSentMsg As Message
Dim objRecip As Recipient
Set objApp = CreateObject("NovellGroupWareSession"
' Tried both ways
'Set objAccount = objApp.Login("", ""
Set objAccount = objApp.Login("username", "password"
CommandSendMail.Enabled = True
Set objDraftMsg = objAccount.WorkFolder.Messages.Add ' create draft in work folder
objDraftMsg.Subject = "test at " & Now
objDraftMsg.BodyText = "this is a test"
' Tried all 3
Set objRecip = objDraftMsg.Recipients.Add("firstname.lastname@companyname.com", egwTo) ' to self
'Set objRecip = objDraftMsg.Recipients.Add("Lastname, Firstname", egwTo) ' to self
'Set objRecip = objDraftMsg.Recipients.Add("Firstname Lastname", egwTo) ' to self
Call objRecip.Resolve
If objRecip.Resolved <> egwResolved Then
MsgBox "Did not resolve"
Else
MsgBox "Resolved ok"
End If
Set objSentMsg = objDraftMsg.Send
MsgBox objSentMsg.MessageID
' Thought these might help, but they didn't
'objSentMsg.Refresh
'objAccount.Refresh
Set objDraftMsg = Nothing
Set objAccount = Nothing
Set objApp = Nothing
You can see that I tried 3 variations on the recipient's name. They all resolve, but are not delivered. What am I doing wrong?
Thanks!
Dim objApp As Application2
Dim objAccount As Account
Dim objDraftMsg As Message
Dim objSentMsg As Message
Dim objRecip As Recipient
Set objApp = CreateObject("NovellGroupWareSession"
' Tried both ways
'Set objAccount = objApp.Login("", ""
Set objAccount = objApp.Login("username", "password"
CommandSendMail.Enabled = True
Set objDraftMsg = objAccount.WorkFolder.Messages.Add ' create draft in work folder
objDraftMsg.Subject = "test at " & Now
objDraftMsg.BodyText = "this is a test"
' Tried all 3
Set objRecip = objDraftMsg.Recipients.Add("firstname.lastname@companyname.com", egwTo) ' to self
'Set objRecip = objDraftMsg.Recipients.Add("Lastname, Firstname", egwTo) ' to self
'Set objRecip = objDraftMsg.Recipients.Add("Firstname Lastname", egwTo) ' to self
Call objRecip.Resolve
If objRecip.Resolved <> egwResolved Then
MsgBox "Did not resolve"
Else
MsgBox "Resolved ok"
End If
Set objSentMsg = objDraftMsg.Send
MsgBox objSentMsg.MessageID
' Thought these might help, but they didn't
'objSentMsg.Refresh
'objAccount.Refresh
Set objDraftMsg = Nothing
Set objAccount = Nothing
Set objApp = Nothing