Need help on sending emails to Lotus Notes from Unix

Hi,

I am new to UNIX and any help is greatly appreciated.

Requirement:

Need to check the directory and if the directory has some files then an email needs to be sent to the email ID on Lotus Notes.

I need help on sending an email to email ID on Lotus Notes notifying that the files are present under a particular directory.

Thanks,
Neetu

Probably a little simple but in a shell script put;

#!/bin/ksh

find /dir -type f > /tmp/filelist.out

if [ -s /tmp/filelist.out ]
  then
    echo "There are files in the /dir directory" | mailx -s subject email_address
fi

Not real familar with Lotus Notes but I am guessing it just another email system such as Outlook.

---------- Post updated at 08:13 PM ---------- Previous update was at 07:26 PM ----------

Also it sounded like you wanted to run this script automatically, so you would want this running in cron.

man crontab

will get the info you need to configure this step.

Not to mention you need to know if their is an SMTP mail gateway between the server and Lotus Notes as that may also need to be configured in the sendmail.cf file and perhaps even in the Mail relay itself.

When going to Outlook (use to use Notes and this worked then�) on a PC I like to use uuencode to convert the file to a rtf allowing for founts to be used by email client:

cat <file> |uuencode <file>.rtf |mails �s �This is an attached text doc� me@mailhouse.com

To be safe on the continent use strings to omit an extended characters:
strings <file> |uuencode <file>.rtf |mails �s �This is an attached text doc� me@mailhouse.com

If you have data that�s �,� separated and want it to be opened by a spreadsheet label the file as CSV:
cat <file> |uuencode <file>.csv |mails �s �This is an attached CSV� me@mailhouse.com

ALSO: mailx -v will show the connection flow... Helps if you don't know if the SMTP has been configured. AND, mailq will show any outgoing e-mails that are still sitting around on the local server.

Hope this helps,

mb