Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help: Need email (no outlook) 'via SMTP'
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Help: Need email (no outlook) 'via SMTP'
Miscellaneous
Thread ID:
00673833
Message ID:
00673833
Views:
63
I recently asked that Outlook be loaded on our server...

Subject: Help, Need Windows messaging and Outlook Loaded on LRD1EMC2
The Windows NT Server 'servername2' requires software to be added.
Microservices,
A new program called 'progname' will daily run and requires email capability from Outlook...

This is the responce that I got from network administrator -

They shouldn't need Outlook. They can send mail via SMTP. MAPI, the subsystem necessary for this, is installed by default as part of the operating system.

My code "needing to be changed to not reference Outlook"
        oApp=CreateObject("Outlook.Application")
        NameSpace= oApp.GetNameSpace("MAPI")
        MailItem = oApp.CreateItem(0)
        With MailItem
            .Subject =  "Path not found Notification!"
            .body= CHR(10)+" Today "+TTOC(DATETIME( ))+ CHR(10)+CHR(13);
               +cemailline1+ CHR(13);
               +"Error Count "+AllTrim(Str(nERRCNT))+ CHR(13);
               +"ISub Value "+AllTrim(Str(iSub))+ CHR(13);
               +"File Handle #"+AllTrim(Str(gnFile))+ CHR(13);
               +"Program ID "+ cSys16+ CHR(13);
               +"Origin (Path)"+cWhereAt+ CHR(13);
               +"Origin Dir "+cMedSearch+ CHR(13);
               +"Destination "+cDestFolder+ CHR(13);
               +"Destination Dir "+cDestDirect+ CHR(13);
               +"File Extension "+cFileExt+ CHR(13);
               +"Error Message "+gERRMESS+ CHR(13);
               +"Procedure Location "+SYS(5)+SYS(2003)+ CHR(13)
            .Recipients.Add ("me@abc.com")
            .Send
        EndWith
        NameSpace.Logoff
Edgar L. Bolton, B.S. B.B.A.
Next
Reply
Map
View

Click here to load this message in the networking platform