Author Topic: Sending email with multiple attachments  (Read 3065 times)

mpiaser

  • Newbie
  • *
  • Posts: 26
Sending email with multiple attachments
« on: August 04, 2013, 11:45:14 am »
I need to be able to attach two files to an email from Winbatch.  I can't find any documentation on the correct syntax.  Here is what I'm using but it doesn't work:

#DefineSubroutine MichaelEmail(Line)
 AddExtender('wwpst44i.dll')
 kinit("localhost","xxx@xxxx.com","xxxx","xxxxxx","")
 if DebugMode=="Y"
     UseEmailAddress="mpiaser@novexsystems.com"
 else
     UseEmailAddress="mpiaser@novexsystems.com|xxx@xxxx.com|xxx@redirectinc.com"
     endif
 kdest(UseEmailAddress,"","")
 kSendText("H Processor (VM) ",Line,"C:\temp\Winbatch.log|C:\temp\snapshot.bmp","")
 
 e=kstatusinfo()
 MichaelLog(strcat("Email results=",e," Line=",Line))

#EndFunction

td

  • Tech Support
  • *****
  • Posts: 3210
    • WinBatch
Re: Sending email with multiple attachments
« Reply #1 on: August 05, 2013, 07:04:31 am »
Review the kSendFile documentation in the Consolidated WIL Help file.  The example at the bottom of the topic illustrates sending multiple file attachments.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade