Results 1 to 9 of 9

Thread: Problem sending Emails *resolved*

Threaded View

  1. #1

    Thread Starter
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,969

    Resolved Problem sending Emails *resolved*

    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:
    1. Dim olApp As Outlook.Application
    2.      Set olApp = CreateObject("Outlook.Application")
    3.  
    4.      Dim olNS As Outlook.NameSpace
    5.      Set olNS = olApp.GetNamespace("MAPI")
    6.      olNS.Logon
    7.  
    8.      Dim olMail As Outlook.MailItem
    9.      Set olMail = olApp.CreateItem(olMailItem)
    10.  
    11.      If iFollowUpMethod = 1 Then
    12.          sTo = sEmail
    13.      Else
    14.          sTo = sFax
    15.      End If
    16.          
    17.      sTo = "[email protected]"
    18.      olMail.To = sTo
    19.      olMail.Subject = "XXXXXX - Patient Follow-ups for: " & Format(dCurrentDate, "MM/DD/YYYY")
    20.      olMail.HTMLBody = sBody
    21.      olMail.Send
    22.  
    23.      olNS.Logoff
    24.      Set olNS = Nothing
    25.      Set olMail = Nothing
    26.      Set olApp = Nothing
    Last edited by TysonLPrice; Feb 16th, 2005 at 07:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width