September 1, 2005 at 7:12 am
Hi,
I've an (vb6) .exe which sends a mail using MAPI.
When I double click on it, it displays Microsoft security warnings about a program trying to send e-mail on your behalf, and if I confirm, it sends the mail.
If, however, I run the exe from a SQL job, I don't get the security warnings and the message gets sent.
(When I try the double click I'm logged on as the same user as SQL Agent is running under.)
Does anyone know why this could be? (My goal is to not have the security warnings - without using SMTP. Unfortunately my program will be a service and so I can not launch it using SQL Agent.)
Thanks v much,
dmckinney.
September 1, 2005 at 10:45 pm
Look in the Office Resource Kit for the Outlook Security template if you are using Exchange email, this allows for customizing the Security settings for MAPI (Outlook and external programs). SQL Server's SQL Mail uses Extended MAPI to get around the security "feature".
You should look into using the CDO API instead of MAPI for your VB6 app, as I suspect that you are using the "simple MAPI" which is no longer fully supported on Server's CDO object library.
Also since VB6 is Apartment Threaded only, using these functions on your SQL Server can cause it to seem to hang. VB6 is not a good environment for server service programs. See Microsoft MSDN articles about the threading models, CDO vs MAPI, etc.
Andy
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply