Sendmail questions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sendmail questions
# 1  
Old 08-01-2006
Sendmail questions

Ok I have a txt file being mailed out from a script using mail function. However I need to add from field to it. So I thought of sendmail.

Can anyone, tell me the correct way to format sendmail for a

to field
from field
subject
text attachment for the body?

Chris
# 2  
Old 08-01-2006
just answered a question which will work for your requirements.Check the below link and replace sendmail -v ${TO} ${CC} by
sendmail -f "Dhruva or ur name" ${TO} ${CC}

http://unix.com/showthread.php?t=29717
# 3  
Old 08-01-2006
This is what I tried and it worked but it did not solve my issue with the from field. Is there a way to make the from email address from any email address not a username?


Code:
SUBJ="Send mail from Unix with file attachments"
TO=chris.collins@fuse.net
CC=chris@domain.net
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!

cat << !
HOPE THIS WORKS
you got the mail from sendmail utility
!

uuencode watch_script1.txt watch_script1.txt


) | sendmail -f chris.collins@fuse.net ${TO} ${CC}


Chris
# 4  
Old 08-01-2006
Hi Chris,

i have checked with the same script and got the "from" as some email id.
can you try again with chris.collins@fuse.net in double quotes.

SUBJ="Send mail from Unix with file attachments"
TO=chris.collins@fuse.net
CC=chris@domain.net
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!

cat << !
HOPE THIS WORKS
you got the mail from sendmail utility
!

uuencode watch_script1.txt watch_script1.txt
) | sendmail -f "chris.collins@fuse.net" ${TO} ${CC}
# 5  
Old 08-02-2006
I know this should work and it does not error out, however is not working, any ideas?

Chris
# 6  
Old 08-02-2006
What is happening is its sending out the mail still as root!

Chris
# 7  
Old 08-02-2006
NVM I solved it the F has to be a capital f
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

3. UNIX for Dummies Questions & Answers

Vi questions

Hello, I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies

4. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

5. UNIX for Dummies Questions & Answers

get some help with some questions

How would you change the IP address using the command line? How would you make the new IP address persistent after a reboot? How do you find the default route of your host? Your /var file system is full. How do you find the files and directories that consume most of the... (1 Reply)
Discussion started by: d3coy
1 Replies

6. Shell Programming and Scripting

SENDMAIL questions...

How can I know the version of the SENDMAIL currently being used by our system? The particular point of interest is the &REPLYTO parameter. Any information or knowledge on use of the REPLYTO parameter would be appreciated. (1 Reply)
Discussion started by: tads98
1 Replies

7. UNIX for Dummies Questions & Answers

few questions

hi , i have got few questions 1) i created a file "-myfile" .how can i remove this?what command shud i issue 2) i used echo "TODAYS DATE" ; DATE..........but date is comoing in second line..how can i make it come in single line? 3) how can i list all files in a directory using for... (5 Replies)
Discussion started by: vivekshankar
5 Replies

8. Solaris

2 Questions

Hello Everbody I hope you can give me a hand, I have some questions The first one itīs about some message that I donīt know what means, I was looking about it. but nothing. This is the message rsh: connection from bad port bsd-gw: Error reading from connection: Bad file number And my... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

9. Programming

Three Questions

I just want to know Three questions: 1.what is the name of c++ compiler used in Linux/Unix (like gcc compiler used for c ).And please tell me how can i compile the program of c++. 2. I have Devloped a program of Database in C Under Linux/Unix Enviornment and now i want to add some graphics... (4 Replies)
Discussion started by: at_renai2001
4 Replies
Login or Register to Ask a Question