Posts 1 - 10 of 17
First | Prev. | 1 2 | Next | Last
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
Hi all.
I have an aplication that automatically sends emails as it iterates through a loop so I installed the Outlook Security Manager. I had no problems installing it, I registered the "osmax.ocx" and "secman.dll" files and checked the box in Project-References for Outlook Security Manager.
However the warning message still appears when I send an email.
I have set the DisableOOMWarnings variable to false as you can see below.
Here is the code in it's entirety:
Public Function SendEmail(strTo As String, iImportance As Integer, strSubject As String, strBody As String, bHTML As Boolean)
Dim olSecMan As New OutlookSecurityManager
Dim olApp As New Outlook.Application
Dim eMail As MailItem
olSecMan.DisableOOMWarnings = True ' send mail olSecMan.DisableSMAPIWarnings = True
olSecMan.DisableCDOWarnings = True
Set eMail = olApp.CreateItem(olMailItem)
eMail.To = strTo
eMail.Subject = strSubject
Select Case iImportance
Case 0
eMail.Importance = olImportanceLow
Case 1
eMail.Importance = olImportanceNormal
Case 2
eMail.Importance = olImportanceHigh
End Select
If Not bHTML Then
eMail.Body = strBody
Else
eMail.HTMLBody = strBody
End If
eMail.Send
Set olApp = Nothing
Set eMail = Nothing
olSecMan.DisableOOMWarnings = False
olSecMan.DisableSMAPIWarnings = False
olSecMan.DisableCDOWarnings = False
Set olSecMan = Nothing
End Function
I would be grateful for any suggestions. Thank you. |
|
Posted 21 Mar, 2006 08:57:01
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi John,
You need to call the ConnectTo method. Please see page 34 of the Developer's Guide and a code sample in the QDemo\SendMail subfolder.
|
|
Posted 21 Mar, 2006 10:14:58
|
|
Top
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
Dmitry,
I already tried that, it didn't work. The code above works perfectly well on a co-workers computer so that is not the problem. I have tried uninstalling and reinstalling Outlook Security Manager but to no effect.
Thank you for your reply though. |
|
Posted 21 Mar, 2006 10:50:04
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi John,
A little strange. I have several questions:
1. What Outlook version do you have installed? The same as your co-workers have?
2. Have you tried to build and test our SendMail example? Does it work?
3. When the warning is fired, are you running your application in a normal way or from VB6 IDE (i.e. from VB6 debugger)?
|
|
Posted 21 Mar, 2006 11:03:11
|
|
Top
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
1. I have version 11.8002.6408 of Outlook
2. I tried the SendMail example, but the warning message also appears when I send an email with it.
3. I am running the application I am working on with the debugger on as I have to or else it will send a lot of emails which may crash the server.
I will try to change it so I can run it with debug off.
Thank you. |
|
Posted 21 Mar, 2006 11:11:29
|
|
Top
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
I just ran the application I am working on with the debugger off and the warning message still appears. |
|
Posted 21 Mar, 2006 11:16:59
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi John,
I just ran the application I am working on with the debugger off and the warning message still appears.
When you ran your application without the debugger, did your code contain calling the ConnectTo method?
|
|
Posted 21 Mar, 2006 11:24:04
|
|
Top
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
No, but the SendMail example contains the ConnectTo method and also generates the warning message.
|
|
Posted 21 Mar, 2006 11:27:17
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi John,
May be I am asking a dummy question but did you check the OFF option in the Security group box of SendMail main window?
And, does your co-worker have the same (11.8002.6408) Outlook version?
Also, please try to add the ConnectTo method in your code and test your application without using the VB6 debugger.
|
|
Posted 21 Mar, 2006 11:36:57
|
|
Top
|
|
John Locke
Posts: 10
Joined: 2006-03-21
|
Sorry Dmitry,it's not a dummy question, I am the dummy: I never even saw that option box! I switched it off and now it sends without the warning message. I put the ConnectTo method in my code but I don't get intellisense when I put in
Call OutlookSecurityManager1.ConnectTo(IOutlook)
The ConnectTo method doesn't come up when I hit the full stop even though I have the same references as SendMail checked under 'Project-References'.
I would say that my co-worker has the same Outlook version as me, all the workstations are networked.
|
|
Posted 21 Mar, 2006 11:43:35
|
|
Top
|
|
Posts 1 - 10 of 17
First | Prev. | 1 2 | Next | Last
|