Send email recipient based on filename

Hi All

can someone help please create a bash script.

Here's a scenario:

  1. I have a directory where it's a destination for scanned documents. e.g. /dest/scan

  2. The filename is in the form IDNumber_Category. e.g. 123456_notes.pdf

  3. The first part of the script is to rename the filename so that it will add the date and time (up to the minute and seconds) . e.g. 123456_notes_0824201012301503.pdf

  4. it will then move this new filename to /dest/scan/out/123456_notes_0824201012301503.pdf

  5. the last part of the script is then to email to the recipient in the form:

to:123456@domain.com and
subject line: /dest/scan/out/123456_notes_0824201012301503.pdf
Body:/dest/scan/out/123456_notes_0824201012301503.pdf

  1. it will then continue to the next file until the directory is empty.

note: I don't really need to attache the file.

Thanks!

Anything you tried yourself so far? Anything particular point where you got stuck?