Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to receive mails in unix ..... Post 302690501 by pamu on Thursday 23rd of August 2012 05:36:15 AM
Old 08-23-2012
Quote:
Originally Posted by ankitknit
Hi,

I didn't get it clearly. Can u plz provide the example.. Thanx
Try this... check if that can do your task..?

Code:
DIR_FILES=/temp/#give some path 
EMAIL_TO=abc@abc.com
EMAIL_FROM=xyzl@xyz.com
ATTACHED_FILE="file_name"#give file name present at the given path
EMAIL_SUBJECT="Your subject"
EMAIL_TEXT="Email text...."
E_MESS=mail.tmp


echo "To:      $EMAIL_TO" > $DIR_FILES/$E_MESS
echo "From:    $EMAIL_FROM" >> $DIR_FILES/$E_MESS
echo "Subject: $EMAIL_SUBJECT" >> $DIR_FILES/$E_MESS
echo "" >> $DIR_FILES/$E_MESS
echo $EMAIL_TEXT >> $DIR_FILES/$E_MESS

uuencode $DIR_FILES/$ATTACHED_FILE $ATTACHED_FILE >> $DIR_FILES/$E_MESS
cat $DIR_FILES/$E_MESS | /usr/sbin/sendmail -t

 

10 More Discussions You Might Find Interesting

1. Linux

Permissions to receive ftp push from Unix box

Hi all, I am new to this forum, hoping to find the solution to a problem I've been having for days. I have a VPS on Linux box. I have setup an ftp account with the Plesk control panel. I am trying to receive an ftp data push from a Unix box but they tell me they keep getting permission... (2 Replies)
Discussion started by: carriehoff
2 Replies

2. UNIX for Dummies Questions & Answers

Steps to configure sendmail to receive e-mails

Hi Unix Gurus, Please help me out here. Please tell me the steps to conigure sendmail to receive emails (same way we configure outlook client in windows)? Thanks in advance. -Dejavu (1 Reply)
Discussion started by: DejaVu
1 Replies

3. UNIX for Dummies Questions & Answers

Receive e-mail on unix box

Hi, I am not sure if it is a good question or not. Is there a unix utility which can be configured with exchange server and then receive e-mails? Thanks! (4 Replies)
Discussion started by: DejaVu
4 Replies

4. UNIX for Advanced & Expert Users

aliasing the TO name in Unix mails

HI All, I have a small question/clarification/doubt . Does anyone know how to provide alias in the mails that come from Unix servers. Like i have a Unix server that generates status mails every hour for a scheduled job , it sends me mails with status with the ID in from field as... (3 Replies)
Discussion started by: bsandeep_80
3 Replies

5. UNIX for Dummies Questions & Answers

I can send but cannot receive mail with unix?

Hi all, First post! I have just discovered that I can use unix to send mail to a mail address. I normally use entourage for my mail. This unix mail is very intriguing to me, but something is not working... I tried the search, but could not find the answer... This works: (in terminal)... (1 Reply)
Discussion started by: bjorn
1 Replies

6. Shell Programming and Scripting

I could not receive the mail sent from the unix server using 'mailx'

Hi All, I have sent a mail to my gmail id using the below command. echo " " | mailx -s "sub" myid@gmail.com I didn't get any error notification. But still I didn't receive that mail still.. please help me to learn how to send mail to other provider (Yahoo/gmail) from unix server.... (1 Reply)
Discussion started by: little_wonder
1 Replies

7. AIX

Unable to receive mails

Hi, can any one help as i am unable to receive mail to outlook mail box from aix box. Kindly help. (2 Replies)
Discussion started by: richajoy
2 Replies

8. UNIX for Advanced & Expert Users

Checking Mails Using Unix

Hi..Is it possible for unix to monitor outlook for a particualr period of time and trigger oracle upon receiving a mail with particular content... Thanks in advance (1 Reply)
Discussion started by: varadharajan87
1 Replies

9. Shell Programming and Scripting

Send Receive Mails

Hi All, I am writing one script to automate one long process. In this process we need to upload some input files and download some output files. So , I want to automate this upload and download by using mail functionality. I want to trigger this script when I am sending mail to server. I know... (0 Replies)
Discussion started by: NirajThakar
0 Replies

10. HP-UX

Unable to receive mails from email relay server

Hi, I have reports that are generated in one server (10.61.1.108), hostname l28bi01. These reports are supposedly sent to a group of email addresses hourly via an email relay server. However, this is not happening. In sendmail.cf in bi01, the DS Smart Relay Host ip address is: ... (3 Replies)
Discussion started by: anaigini45
3 Replies
pycmail(1)						      General Commands Manual							pycmail(1)

NAME
pycmail - mail sorter SYNOPSIS
pycmail [-d debuglevel] [-t] [-c conffile] [file1 file2 file3 ...] DESCRIPTION
pycmail is a mail sorter similar to procmail, written in python, using python syntax for mail delivery. OPTIONS
file1 file2 ... read mails from file1 file2 ... instead of from stdin (useful for mail postprocessing) -d level, --debuglevel level set debuglevel to level. -t testing mode. No mail delivery will be done. Use in conjuction with -d -c conffile, --config=conffile use file conffile as a user configuration file (instead of ~/.pycmailrc ) -D define add define to the DEFINES list (this can be tested later in the .pycmailrc to modify the behaviour). Can be repeated several times to add more strings. USAGE
pycmail should be invoked automatically from the .forward file when mail arrives. Default debuglevel is 0, which means pycmail tries to deliver mail in almost foolproof way: if there is any error in ~/.pycmailrc file, mail will be delivered to the default mailbox (such as /var/spool/mail/USERNAME ). If the debuglevel is 1, any error in ~/.pycmailrc file will be printed, resulting in bounced mail (but pycmail will still try to deliver the mail to default mailbox). Higher debuglevels will print more information about the actual mail processing. The bigger the debuglevel, the more detailed information is printed. To test your configuration, do something like this: formail -s pycmail -d 2 -t < your_test_mailbox_file SEE ALSO
procmail(1), lockfile(1), formail(1) AUTHOR
Radovan Garabik <garabik @ kassiopeia.juls.savba.sk> 2006-10-17 pycmail(1)
All times are GMT -4. The time now is 01:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy