Coglearner
MIS
I have tried the following code to send email using lotus notes application.Its working fine, but it is asking to enter the email pwd before sending the mail.Is it possible to avoid asking for the pwd.
Thanks
Coglearner
'--------------The Code Starts here------------------
Declare Sub LotusNotes(strSubject$, strTo$, strBody$)
Sub Main ()
Dim strToday As String
Dim strTo1 As String
Dim strAttachment As String
Dim strBody As String
Dim strSubject As String
Dim strRecipients AS String
'*** RECIPIENTS IS USED TO ADDRESS THE EMAIL TO ONE OR MORE INDIVIDUALS - BE SURE TO USE A SEMI-COLON ( ; ) BETWEEN NAMES
'*** THIS SECTION ASSIGNS THE CATALOG AND REPORT PATH NAMES.
strTo = "someone@somewhere.com"
strSubject = "Cube Generation Failed"
strBody = "Cube Generation Failed"
call LotusNotes(strSubject, strTo, strBody)
End Sub
Sub LotusNotes(strSubject$, strTo$, strBody$)
dim IndSession As Object
dim IngDirectory As Object
Dim IndDatabase As Object
Dim IndDocument As Object
Dim IndRTItem As Object
set IndSession = CreateObject("Lotus.NotesSession"
IndSession.Initialize
Set IngDirectory = IndSession.GetDbDirectory(""
Set IndDatabase = IngDirectory.OpenMailDatabase
Set IndDocument = IndDatabase.CreateDocument
'--Set Message Headers
Call IndDocument.AppendItemValue("Subject", strSubject$)
Call IndDocument.ReplaceItemValue("SendTo", strTo$)
'---Set Delivery Options
IndDocument.EncryptOnSend = True
IndDocument.SaveMessageOnSend = True
Call IndDocument.ReplaceItemValue("ReturnReceipt",True)
'---Add Content
Set IndRTItem = IndDocument.CreateRichTextItem("Body"
IndRTItem.AppendText(strBody$)
Set IndRTItem = Nothing
'---Send Message
call IndDocument.Send( FALSE )
End Sub
Thanks
Coglearner
'--------------The Code Starts here------------------
Declare Sub LotusNotes(strSubject$, strTo$, strBody$)
Sub Main ()
Dim strToday As String
Dim strTo1 As String
Dim strAttachment As String
Dim strBody As String
Dim strSubject As String
Dim strRecipients AS String
'*** RECIPIENTS IS USED TO ADDRESS THE EMAIL TO ONE OR MORE INDIVIDUALS - BE SURE TO USE A SEMI-COLON ( ; ) BETWEEN NAMES
'*** THIS SECTION ASSIGNS THE CATALOG AND REPORT PATH NAMES.
strTo = "someone@somewhere.com"
strSubject = "Cube Generation Failed"
strBody = "Cube Generation Failed"
call LotusNotes(strSubject, strTo, strBody)
End Sub
Sub LotusNotes(strSubject$, strTo$, strBody$)
dim IndSession As Object
dim IngDirectory As Object
Dim IndDatabase As Object
Dim IndDocument As Object
Dim IndRTItem As Object
set IndSession = CreateObject("Lotus.NotesSession"
IndSession.Initialize
Set IngDirectory = IndSession.GetDbDirectory(""
Set IndDatabase = IngDirectory.OpenMailDatabase
Set IndDocument = IndDatabase.CreateDocument
'--Set Message Headers
Call IndDocument.AppendItemValue("Subject", strSubject$)
Call IndDocument.ReplaceItemValue("SendTo", strTo$)
'---Set Delivery Options
IndDocument.EncryptOnSend = True
IndDocument.SaveMessageOnSend = True
Call IndDocument.ReplaceItemValue("ReturnReceipt",True)
'---Add Content
Set IndRTItem = IndDocument.CreateRichTextItem("Body"
IndRTItem.AppendText(strBody$)
Set IndRTItem = Nothing
'---Send Message
call IndDocument.Send( FALSE )
End Sub