lcEmailRecipient = '' lcEmailRecipient = INPUTBOX("Email address","Email ",lcEmailRecipient) . . . laSendTo[1] = lcEmailRecipient loDoc.ReplaceItemValue("SendTo", @laSendTo)How would one 'Validate' the address type in the inputbox before issuing the send?
>> DIMENSION laSendTo[1] >> >>*** Get a hook on Lotus Notes >> oNotesSession = CREATEOBJECT("Lotus.NotesSession") >> oNotesSession.Initialize(ALLTRIM("")) >> >>*** ask the user for the recipient >> lcEmailRecipient = "recipient@isp.com" >> lcEmailRecipient = INPUTBOX("Email address","Email ",lcEmailRecipient) >> >> >> lsMailServer = oNotesSession.GetEnvironmentString("MailServer", .T.) >> lsMailDB = oNotesSession.GetEnvironmentString("MailFile", .T.) >> >> loDB = oNotesSession.GetDatabase(lsMailServer, lsMailDB) >> loDoc = loDB.CreateDocument() >> loDoc.ReplaceItemValue("Subject", "Here was the subject of the email") >> >> laSendTo[1] = lcEmailRecipient >> >> loDoc.ReplaceItemValue("SendTo", @laSendTo) >> loRTF = loDoc.CreateRichTextItem("Body") >> WITH loRTF >> >>*** Add the selected trades as the body of the email >> lcBody = '' >> SCAN FOR rv_blotter.lSelect >> lcAcct = rv_blotter.cAcctno >> lcBody = lcBody + lcAcct "|" + "123456iop"+ CHR(13) >> ENDSCAN >> .AppendText(lcBody) >> >> .AddNewLine(2, .T.) >> .AppendText("***THIS IS AN AUTOMATED E-MAIL***") >> .AddNewLine(1,.T.) >> .AppendText("You can reply to this message, if necessary.") >> >> ENDWITH &&loRTF >> >> SELECT rv_blotter >> REPLACE ALL lSelect WITH .F. >> =TABLEUPDATE(.T.) >> >> loDoc.SaveMessageOnSend = .T. && Saves a copy to sent folder >> loDoc.SEND(.F.) && Sends the message >> =MESSAGEBOX("Email Sent", 64+0, "Lotus Automation") >>>>