The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Protecting against evil code fragments with HTML Purifier iBot UNIX and Linux RSS News 0 07-08-2008 01:30 AM
fetch substring from html code scarfake Shell Programming and Scripting 2 05-29-2008 06:55 PM
html problem: get file name dialog exists? f33ldead Shell Programming and Scripting 0 02-25-2008 05:48 PM
How do I extract text only from html file without HTML tag los111 UNIX for Dummies Questions & Answers 4 11-28-2007 01:40 AM
Mailing Problem nimish Shell Programming and Scripting 2 12-02-2005 08:38 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-25-2008
Registered User
 

Join Date: Sep 2008
Posts: 1
problem mailing HTML code in cron file.

Hi All,
I have written a script which sends mail using “sendmail” command and mail contains HTML code.

When I run scripts on terminal it is working properly, but when I try to run this script through a crontab file it sends blank mail with proper subject.

crontab file detail :
00 05 * * * su - inputdec -c /idhome/abhishek/bin/cr_trigger.sh

Sample code :

echo "To: abhishek.abc@gmail.com"
echo "X-Mailer: htmlmail" $VERSION
echo "Mime-Version: 1.0"
echo "Content-Type: text/html; charset=iso-8859-1"
echo $SUBJECT
#mail content
cat abhihek/temp3.html
} | /usr/lib/sendmail abhishek.abc@gmail.com
Can anybody help me??


Last edited by abhishek.mind; 09-25-2008 at 01:41 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 09-25-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Use an explicit absolute path for the file.

You seem to be missing the Content-Transfer-Encoding header.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 03:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0