Mail function


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mail function
# 1  
Old 11-17-2011
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 hence the mail is send by the unix server rather than the sender which I want to include in the FROM part.

Hence please suggest me something where I can also decide on the sender's address from which the mail should be sent. And also it should send mails to person specified in TO part and BCC part.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Shell Programming and Scripting

<Mail> attachment param is not working under system function

Hi Guys, I have executed the mail command that has attachment with filename as current date enclosed in system function that is added under awk command. I have used awk command to check if the error code is present in the file then email command sends an email with subject Error Code ,body... (2 Replies)
Discussion started by: reminisce
2 Replies

3. Shell Programming and Scripting

Sending an email with mail function shows up as an attachment 'noname'

I have a file named email.html with this as the contents: Content-type: text/html ACHI,ACCRETIVE HEALTH ,7.15,<br>CPRT,Copart Inc.,36.14,<br>GEOB.MX,GEO-B,1.660,<br>GCO,Genesco Inc. Comm,73.58,<br>GMAN,Gordmans Stores, ,<br>GES,Guess? Inc. Comm,26.45,<br>KBR,KBR Inc. Common... (1 Reply)
Discussion started by: phpchick
1 Replies

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

5. Shell Programming and Scripting

Mail function in shell scripting

Hi Guys, i'm new to scripting, please help me to write the script. Purpose: To write a simple addition program and to mail the output result. Script: #!/bin/bash echo "entr numbers"; read n1; read n2; answer=$(($n1+$n2)); echo $answer > mail -s "output" karthic324n@gmail.com; ... (4 Replies)
Discussion started by: Karthick N
4 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. 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

8. Shell Programming and Scripting

Changing Dispatcher's name in Mail-function

Hi, currently I am using following command to send a mail: 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 ... (2 Replies)
Discussion started by: ABE2202
2 Replies

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

10. Solaris

How to configure mail function on Solaris

Can some one please help to configure mails on Solaris. mail -s or mailx function don't work on the system. Commands do nothing. (2 Replies)
Discussion started by: raman1605
2 Replies
Login or Register to Ask a Question
mlmmj-send(1)						      General Commands Manual						     mlmmj-send(1)

NAME
mlmmj-send - send mail to a mailinglist or similar SYNOPSIS
mlmmj-send [-L /path/to/list | -l listctrl] -m /path/to/mail [-a] [-D] [-F] [-h] [-r] [-R] [-s] [-T] [-V] -a: Don't archive the mail -D: Don't delete the mail after it's sent -F: What to use as MAIL FROM: -h: This help -l: List control variable. -L: Full path to list directory -m: Full path to mail file -r: Relayhost IP address (defaults to 127.0.0.1) -R: What to use as Reply-To: header -s: Subscribers file name -T: What to use as RCPT TO: -V: Print version DESCRIPTION
This binary is used to send all kinds of mail to mlmmj managed mailinglists, but can potentially be used standalone for sending mails. The only option that is not self explanatory is the -l list control option: '1' means 'send a single mail' This is used together with -F and -T to send one mail to one recipient. '2' means 'mail to moderators' Used for sending mails to the moderators of a list. '3' means 'resend failed list mail' '4' means 'send to file with recipients' '5' means 'bounceprobe' '6' means 'single listmail to single recipient' BUGS
This manual page is very scarce documentation of the mlmmj-send binary. The reason for this is that it's really not supposed to be used by any human, but only supposed to be invoked from other mlmmj binaries. So in case more documentation is needed, please read the source. AUTHORS
This manual page was written by the following persons: Soren Boll Overgaard <boll@debian.org> (based on html2man output) Mads Martin Jorgensen <mmj@mmj.dk> mlmmj-send September 2004 mlmmj-send(1)