Sponsored Content
Top Forums Shell Programming and Scripting Changing Dispatcher's name in Mail-function Post 302346169 by ABE2202 on Friday 21st of August 2009 10:01:39 AM
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?
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
Mail::Filter(3) 					User Contributed Perl Documentation					   Mail::Filter(3)

NAME
Mail::Filter - Filter mail through multiple subroutines SYNOPSIS
use Mail::Filter; my $filter = Mail::Filter->new( &filter1, &filter2 ); my $mail = Mail::Internet->new( [<>] ); my $mail = $filter->filter($mail); my $folder = Mail::Folder->new( .... ); my $filter->filter($folder); DESCRIPTION
"Mail::Filter" provides an interface to filtering Email through multiple subroutines. "Mail::Filter" filters mail by calling each filter subroutine in turn. Each filter subroutine is called with two arguments, the first is the filter object and the second is the mail or folder object being filtered. The result from each filter sub is passed to the next filter as the mail object. If a filter subroutine returns undef, then "Mail::Filter" will abort and return immediately. The function returns the result from the last subroutine to operate on the mail object. METHODS
Constructors Mail::Filter->new([FILTER [, ... ]]) Create a new "Mail::Filter" object with the given filter subroutines. Each filter may be either a code reference or the name of a method to call on the <Mail::Filter> object. Accessors $obj->add(FILTER [, FILTER ...]) Add the given filters to the end of the fliter list. Processing $obj->filter(MAIL-OBJECT | MAIL-FOLDER) If the first argument is a "Mail::Internet" object, then this object will be passed through the filter list. If the first argument is a "Mail::Folder" object, then each message in turn will be passed through the filter list. $obj->folder While the "filter" method is called with a "Mail::Folder" object, these filter subroutines can call this method to obtain the folder object that is being processed. $obj->msgnum If the "filter" method is called with a "Mail::Folder" object, then the filter subroutines may call this method to obtain the message number of the message that is being processed. SEE ALSO
This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/. AUTHORS
The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development. Mail::Cap by Gisle Aas <aas@oslonett.no>. Mail::Field::AddrList by Peter Orbaek <poe@cit.dk>. Mail::Mailer and Mail::Send by Tim Bunce <Tim.Bunce@ig.co.uk>. For other contributors see ChangeLog. LICENSE
Copyrights 1995-2000 Graham Barr <gbarr@pobox.com> and 2001-2007 Mark Overmeer <perl@overmeer.net>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.12.1 2010-01-26 Mail::Filter(3)
All times are GMT -4. The time now is 01:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy