dissable confirmation message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kowndinya
    New Member
    • Sep 2006
    • 26

    dissable confirmation message

    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.

    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
    Thank you.
    Raj
    Last edited by willakawill; Feb 26 '07, 07:03 AM. Reason: please use code tags when posting code
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Hi. This sounds like your virus protection software interrupting your email. You can't change that in your code but you can disable this feature of your virus software.

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      I could be the designed behavior of the MAPI libraries.
      I had the same problem with VB6 + Outlook Express.

      But using .Net MailMessage class, I have no more that prompt.

      Comment

      Working...