I have a job, and it checks if a file has something in it...
When the file is not empty, I use DSSendMail to (duh!) send an e-mail to someone....
But I like to know how I attach the file in the mail......
I have read a lot about it, and have read about the dssendmail_template.txt (I know where is it, etc etc)
I use the following command:
DSSendMail("From:DS@abc.com\nTo:abc1@abc.com,abc2@abc.com\nSubject:Test\nAttach:/dir/dir/file.txt\nBody:This is a test")
my job reports me the message "The following parameters in the call to DSSendMail were not mentioned in the file 'dssendmail_template.txt': attach"; but it sends the mail (without the attachment)
I know that I have to encode the file to use the sendmail (something like uuencode filename | /usr/sbin/sendmail -t.......) so I changed the template as follows:
Code: Select all
uuencode %attach% | /usr/sbin/sendmail -t <<////
From: %from%
To: %to%
Subject: %subject%
%body%
////
Thx,
Code: Select all