Computer Guy
asked on
Sending an email with attachemtn via cron
Hi,
I want to send a txt file as an attachment via a cron command.
/usr/lib/sendmail email@domain.com < /path/to/file.txt
When I use the following command, the contents of the file are in the body and it is not an attachment.
How can I have the text file be an attachment?
Thanks!
I want to send a txt file as an attachment via a cron command.
/usr/lib/sendmail email@domain.com < /path/to/file.txt
When I use the following command, the contents of the file are in the body and it is not an attachment.
How can I have the text file be an attachment?
Thanks!
try this
/usr/bin/uuencode /path/to/file.txt file.txt | /usr/lib/sendmail email@domain.com
This will send /path/to/file.txt as attachment "file.txt"
/usr/bin/uuencode /path/to/file.txt file.txt | /usr/lib/sendmail email@domain.com
This will send /path/to/file.txt as attachment "file.txt"
Please add above as crontab job. Do you need help in that?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER