No names found to send mail? Why not?

I have the following code in a QuerySave event of a form which is giving me an error message stating:

Notes error: No names found to send mail

My document properties after saving the document show both the SendTo field and the SendTo_1 field are populated with my name. Any ideas why I’m getting this message and how to fix the problem?

Thanks,

Sub Querysave(Source As Notesuidocument, Continue As Variant)

Dim ws As New NotesUIWorkspace

Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.CurrentDatabase

Dim docCurrent As NotesDocument

Set docCurrent = source.document



docCurrent.SendTo = docCurrent.SendTo_1

docCurrent.Form = "dlgTest" 

Call ws.DialogBox( "dlgTest", True, True, False, False, False, False, "This is a test", docCurrent, True) 

Call docCurrent.save(False, True )

Call docCurrent.Send( True )

End Sub

Subject: No names found to send mail? Why not?

I’m confused, the debugger says there is no value in the SendTo field. How do I populate the SendTo field?

Thanks in advance for any help you can offer.

Subject: No names found to send mail? Why not?

Hi Angie - I’ve had this problem running test code which sends e-mail. Sometimes, Lotus doesn’t seem to like sending an e-mail to your own name. I seem to remember that even putting your name in a group and addressing to that group doesn’t work either. Have you got another e-mail address you can test with? Try using your internet address maybe, just for a test.

Hope this helps!

Emily.

Subject: RE: No names found to send mail? Why not?

Thanks, I just tried sending to another user but received the same message. Any other ideas?

Subject: RE: No names found to send mail? Why not?

Use the Debug Lotusscript option to see what the value of docCurrent.SendTo is right before the Send command is issued.