Hello,
Please help me.
I have seen similar problem in this forum but the answer is related to something else.
I have created a small program to send e-mail (MS Outlook) automatically when certain conditions are met. But when i want to send message program is prompting for confirmation with the following message. I want to dismiss this message with default option Yes and program should send automatically the mail with out user response.
Message:
" A program is trying to automatically send e-mail on your behalf. Do you want to allow this? ............... ....... choose "No".
How to solve this problem? Please find my code below.
Thank you.
Raj
Please help me.
I have seen similar problem in this forum but the answer is related to something else.
I have created a small program to send e-mail (MS Outlook) automatically when certain conditions are met. But when i want to send message program is prompting for confirmation with the following message. I want to dismiss this message with default option Yes and program should send automatically the mail with out user response.
Message:
" A program is trying to automatically send e-mail on your behalf. Do you want to allow this? ............... ....... choose "No".
How to solve this problem? Please find my code below.
Code:
Private Sub cmdsend_Click()
Dim sendto As String
Dim subject As String
Dim Text As String
sendto = txtTo.Text
subject = txtSubject.Text
Text = txtMessage.Text
On Error GoTo ErrHandler
With MAPISession1
.DownLoadMail = False
.LogonUI = True
.SignOn
.NewSession = True
MAPIMessages1.SessionID = .SessionID
End With
With MAPIMessages1
.Compose
.RecipAddress = sendto
.AddressResolveUI = True
.ResolveName
.MsgSubject = subject
.MsgNoteText = Text
.Send False
End With
ErrHandler:
End Sub
Raj
Comment