Hi All,
I wrote an application that I want to run on as a scheduled task on another computer in the office. It creates an HTML body Email and sends it via Outlook 2002. It runs fine on my machine but when I run it from the other MicroSoft Publisher keeps popping up like I'm trying to send a picture. I still get the Emails being sent to me from it. It sends around 100 Emails a run and I end up having to stop it and close all the publishing windows. I compared my Outlook settings to the other computer and I don't see any differences. Any suggestions?
This is NOT some spam mechinism I'm playing with here. We are a third party Doctor scheduling firm and these Emails are going to our Doctors with appointment notifications.
Here is the code that sends the Email:
VB Code:
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
Dim olNS As Outlook.NameSpace
Set olNS = olApp.GetNamespace("MAPI")
olNS.Logon
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
If iFollowUpMethod = 1 Then
sTo = sEmail
Else
sTo = sFax
End If
olMail.To = sTo
olMail.Subject = "XXXXXX - Patient Follow-ups for: " & Format(dCurrentDate, "MM/DD/YYYY")
olMail.HTMLBody = sBody
olMail.Send
olNS.Logoff
Set olNS = Nothing
Set olMail = Nothing
Set olApp = Nothing