Sending email with multiple attachments

Started by mpiaser, August 04, 2013, 11:45:14 AM

Previous topic - Next topic

mpiaser

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

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