Changing Dispatcher's name in Mail-function


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Changing Dispatcher's name in Mail-function
# 1  
Old 08-21-2009
Changing Dispatcher's name in Mail-function

Hi,

currently I am using following command to send a mail:

Code:
 
mail -s"Query result" $TO $CC < input_file

It works, but I want to change the dispatcher's name / sender's name.
I tried to find something in "man mail", but I didn't find anything.

can someone help me?

THX

---------- Post updated at 09:01 AM ---------- Previous update was at 06:36 AM ----------

I tried the option -r and by this it send the mail with new mail address:
Code:
mail -r 'NewDispatcher' -s"Overview result" $TO $CC < mail_tmp.$$

sends a mail with
But how can I show an alias for that new dispatcher? Do I need to change a file containing the aliases?
# 2  
Old 08-22-2009
Alias? Do you mean the comment portion of the email address?

Maybe this is what you want. I just tried it and it worked.
Code:
echo Test | mail -r "Ken Jackson <ken@host1.com>" -s Test ken@host2.com

# 3  
Old 08-24-2009
yes thats exact what I meant, but unfortunately it does not work
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing IFS in bash function

I have a function in bash that takes arguments. does IFS work in a function or does it apply only to the main script? (1 Reply)
Discussion started by: kristinu
1 Replies

2. Homework & Coursework Questions

Creating a function that sends a mail using mail command

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: The function will be called m and it will allow you to send an email to someone using the mail command. The... (1 Reply)
Discussion started by: Drucian
1 Replies

3. Shell Programming and Scripting

How to send mail using PHP mail function On apache server.?

Hello, I am using centos-6.2 I have apache server,php5 on my system and I want to send mail using sendmail on my system. when I try to send mail from shell that time mail is succesfully sent to respective address() but when I try to send it through webbrowser I am not able to send it.... (1 Reply)
Discussion started by: Kiran ursal
1 Replies

4. Programming

Changing value inside function

I have the following code and want to update shiftDesc inside the function. Is it correct to declare the argument as: int shiftDesc void prValue_vd( FILE* stream, // name of output stream int shift, // amount of shift to the right const char* value,... (1 Reply)
Discussion started by: kristinu
1 Replies

5. Shell Programming and Scripting

Mail function

Hi All I have a business requirement where I have to send mails to multiple persons in TO as well as BCC I tried the below mail command to meet the requirement mailx -s "Sub" -c $mail_id_cc $mail_id_to But I have a problem here because I can include the FROM part in this mail function... (0 Replies)
Discussion started by: ami_smart
0 Replies

6. Shell Programming and Scripting

mail function - script not working

#!/bin/bash { m() $mail='("$someemail@gmail.com ", Cc:"$me" -t, Subject:"$emailmyself" -s, $someinputfile")' } what I am trying to do is create a function have it load when type the letter "m" so all have to do type an address after it send email. it tell me syntax on line 4 but which... (2 Replies)
Discussion started by: ericde
2 Replies

7. UNIX for Dummies Questions & Answers

fetchmail: forward mail changing subject

Hi there, I receive job applications sent by a website daemon. The email subject contains the job offer description. The problem is that gmail tends to concatenate emails with the same subject and I don't really want all applications in the same email. Thus the from field contains the candidate... (0 Replies)
Discussion started by: chebarbudo
0 Replies

8. Shell Programming and Scripting

mail function problem

Hello all, I'm attempting to sent an e-mail with the following funtion in my script. The tested that the logic is correct with another native os command, but I can't seem to get mail to work. I played with the "", just can't seem to get it right. Any ideas? Thanks. $my_mail = `mail... (4 Replies)
Discussion started by: jwholey
4 Replies
Login or Register to Ask a Question