how to avoid cron job output to send to the junk email folder?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to avoid cron job output to send to the junk email folder?
# 1  
Old 05-31-2011
how to avoid cron job output to send to the junk email folder?

Hi i created a cron job which invoke a shell script and output some content via email.

Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do?
# 2  
Old 05-31-2011
what command are you using to send email ?
you sending html or plain text file ?
# 3  
Old 05-31-2011
mail -s "email id" - This is the command i used to send email from crontab.

output is a plain text...

example:

03-28 23:56:01,ERROR,.. some long text............
03-28 23:59:01,ERROR,.. some long text............
# 4  
Old 05-31-2011
ideally, the command should be

mail -s "Subject" email-address < file_name

did u try using mailx or sendmail ?
# 5  
Old 05-31-2011
If you are looking for a mail with font and other style, you will have to send in html format with the proper style tags. By default mail -s will send the content as normal text.

Mails reaching junk email folder is your e-mail client configuration. You will have to check the client which is recieving the mails instead the script
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script that will send an email if the cron job did not run.

Team, Would like to know what is the best script that will send you an email if cronjob did not run. Thanks (4 Replies)
Discussion started by: kenshinhimura
4 Replies

2. Shell Programming and Scripting

I want to send an email after cron job

I am using centos 6.4. I have a few cron jobs setup and they all work fine. However, I would like to enhance one of the crons. This is what I have at the moment: nice rsync -au /home/samba/wsaler/* /home/samba/wsaler.backup/wsaler.backup18pm date | /bin/mail -s "wsaler 3:00pm backup... (8 Replies)
Discussion started by: countrydj
8 Replies

3. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

4. UNIX for Advanced & Expert Users

send an email to my Drafts folder

Is there a way I can send a text file directly to my Drafts folder? (1 Reply)
Discussion started by: idontknow
1 Replies

5. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

6. Shell Programming and Scripting

Send an email once a job is completed

Hi, The HPCs I used earlier used PBS (Portable Batch System) to schedule when I was running various jobs and it had an option to send me an email once a job is completed. I'm wondering whether this is possible for any other process (without the use of PBS). For example, I'm running some codes... (2 Replies)
Discussion started by: lost.identity
2 Replies

7. Shell Programming and Scripting

Cron Job Automated Email Alternatives?

Hi guys, not sure if this would be the right place for this but I dont where else it would go... I'm new to Unix too, so please bare with me :) I guess first up some background on the situation. We have some scripts that run as cron jobs which monitor and check the health, etc of our servers.... (2 Replies)
Discussion started by: BrianD
2 Replies

8. AIX

Cron Job notification email

Hi, I'm fairly new to Aix and am looking for some help on the following. I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies

9. UNIX for Dummies Questions & Answers

cron job from specific folder

i'd like to be able to run a cron job from a specific folder /var/www/html a php script which imports rss feeds i created a simple shell script cd /var/www/html php -q import.php webmin says it executed correctly, but when i check the site, nothing has happened what am i doing... (1 Reply)
Discussion started by: sanchoquixote
1 Replies

10. Solaris

Sun Solaris version 10: cron job does not send the default message.

Hi all, Our servers were on Sun Solaris 8.1, anytime a cron job executed the user ran that job received a email of job's output. I think that the default and Administrator did not setup anything. However, when we upgraded the OS to Sun Solaris ver.10, the cron job is no longer send a email... (2 Replies)
Discussion started by: cmnguyen
2 Replies
Login or Register to Ask a Question