Dear Winbatch Tech team,
I have one small project in my process to send the emails to multiple team members and i implmaneted one code of the same by using winbatch database sample codes,but my request ,it is possible to send it by using any INI or CFG or TXT or CFG files.Please find the below my code.
Kindly help me on this request.
recip1="V.Bandi@Gmail.com"
recip2="Dhananjaya.Kasaragod@Gmail.com"
objOutlook = ObjectOpen("Outlook.Application")
; Create the message.
objOutlookMsg = objOutlook.CreateItem(0)
; Display to user (the following line can be removed if you do not want any interface)
objOutlookMsg.Display
; add Recipient
objOutlookRecip=objOutlookMsg.Recipients
objOutlookRecip.Add(Recip1) ;<<<<<<<
;objOutlookRecip.Add(Recip2) ;<<<<<<<
; Set the Subject, Body,
objOutlookMsg.Subject = "Server Space Report"
objOutlookMsg.Body = strcat("Hi All,Please find the attached Server Disk Space Utilization Report.",@CRLF)
; Add attachments to the message.
Attachmentpath='C:\LOGS\ServerSpace.xls'
objOutlookAttach = objOutlookMsg.Attachments
objOutlookAttach.Add(AttachmentPath)
objOutlookMsg.Send
ObjectClose(objOutlook)
exit
Check out the IniReadPvt and IniWritePvt functions in the Consolidated WIL Help file. The help file's IniReadPvt example:
;IMPORTANT Path information must be specified if the
;INI file is not in the Windows directory.
a=IniReadPvt("Main", "Lang", "English", "WB.INI")
Message("IniReadPvt",a)
Given the following segment from WB.INI:
[Main]
Lang=French
The statement above would Return:
French
Thanks Team for your Help,
Now am able to send multiple reciitents from private INI file
Cool.