Automatic email with attachment?

H.S. hs.samix at gmail.com
Fri May 28 23:46:25 UTC 2010


Patton Echols wrote:
> I have a need to email files to various folks on a regular basis.  I 
> would like to automate the process.  My idea is that a file would get 
> dropped into a particular folder.  Normally the folder would be empty.  
> But when a file is dropped there, it is automatically attached to an 
> email and sent to an email address.
> 
> Does anyone know of a prebuilt utility that will do this?  If I need to 
> script it, does anyone have a script that they use for this purpose? 
> 
> I have a vague memory of something like this on the list, but I have 
> been unable to construct a search that gets me anything. 
> 
> (The worse bit is I think I participated in the thread, and I STILL 
> can't find it.  Obviously I'm an idiot!)
> 
> Thanks for aiding the hopeless
> 
> --PE
> 
> 
> 

Here is one option:
http://www.cyberciti.biz/tips/sending-mail-with-attachment.html

It should be easy to create a cron job that runs every periodically (few
minutes, half hour, whatever) to call a bash script that checks if a
particular directory has any file in it, if yes, then send that file as
an attachment and then to remove them.

Good luck.

-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.





More information about the ubuntu-users mailing list