Sponsored Content
Operating Systems Linux Red Hat How to send mail with sender mail address and name? Post 302952329 by jaggy on Monday 17th of August 2015 03:22:53 PM
Old 08-17-2015
How to send mail with sender mail address and name?

Hi,
I am trying to send a mail using "mail" command in unix. I wanted to give sender name and sender address. I tried different options ,but still it shows only mail address(No name).
Code:
mail -s "Alert mail : Nothing running !!!"  $email -- -F"Mail Alert" -fno-reply@alert.com

But I am getting only "no-reply@alert.com" in sender address where as I want as "Mail Alert <no-reply@alert.com>"

Can some body let me know what I am doing wrong?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can not send mail from unix server to company/yahoo mail

hi, Gurus, I need some help with sending mail out from my UNIX server: It is running Solaris 2.6 and the sendmail version is 8.8. Output of :/usr/lib/sendmail -d0.1 -bt < /dev/null Version 8.8.8+Sun Compiled with: LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET ... (5 Replies)
Discussion started by: b5fnpct
5 Replies

2. AIX

Change sender e-mail address

When sending emails to the outside world, aix present itself as d_prod@production1.pdc.itercom.org. This is causing some issue with our e-mail server. So we need to change the name to d_prod@itercom.org... Does any one know how this can be accomplished? Thank you (3 Replies)
Discussion started by: cchiang12
3 Replies

3. Shell Programming and Scripting

Pull E-mail address from file, send e-mail

Hello, I am new to perl and need to create a script that will read a file and pull a name from the file and send e-mail. How can I use the following awk statement in a perl script? grep UNIXadmins /root/mail.conf | awk '{ print $2}' and use the output to send a e-mail. Any help would... (1 Reply)
Discussion started by: DC Heard
1 Replies

4. UNIX for Dummies Questions & Answers

send mail file from server to another address

HP-UX B11.23 ia64 I have a users mail inbox in /var/mail I want to send all the mail there to another address (an Exchange address). At the Exchange address, I want it to appear as the original separate emails, with attachments in their original form (e.g. still MIME encoded). Is that... (6 Replies)
Discussion started by: LisaS
6 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. Red Hat

How to change sender email address in mail -s command

Just having trouble trying to figure out what the option is. When I do mail -s "Subject" someuser@example.com I can't seem to specify "from" or "sender" option as I need it for my task. I tried using --f or -f though it didn't work. Can someone please tell me what other option... (0 Replies)
Discussion started by: rockf1bull
0 Replies

7. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

8. Shell Programming and Scripting

How to change the sender's name or E-mail address in mutt command

Can any one help me in this ??? How to change sender's name or email address in Mutt command??? (4 Replies)
Discussion started by: sarathi
4 Replies

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

10. 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
mail.local(1M)						  System Administration Commands					    mail.local(1M)

NAME
mail.local - store mail in a mailbox SYNOPSIS
/usr/lib/mail.local [-f sender] [-d] recipient DESCRIPTION
mail.local reads the standard input up to an end-of-file and appends it to each user's mail file (mailbox). This program is intended to be used by sendmail(1M) as a mail delivery agent for local mail. It is not a user interface agent. Messages are appended to the user's mail file in the /var/mail directory. The user must be a valid user name. Each delivered mail message in the mailbox is preceded by a "Unix From line" with the following format: From sender_address time_stamp The sender_address is extracted from the SMTP envelope address (the envelope address is specified with the -f option). A trailing blank line is also added to the end of each message. The mail files are locked with a .lock file while mail is appended. The mail files are created with mode 660, owner is set to recipient, and group is set to mail. If the ``biff'' service is returned by get- servbyname(3SOCKET), the biff server is notified of delivered mail. This program also computes the Content-Length: header which will be used by the mailbox reader to mark the message boundary. OPTIONS
The following options are supported: -f sender Specifies the "envelope from address" of the message. This flag is technically optional, but should be used. -d Specifies the recipient of the message. This flag is also optional and is supported here for backward compatibility. That is, mail.local recipient is the same as mail.local -d recipient. -l Turn on LMTP mode. -r from Specify the sender's name (for backward compatibility). -7 Do not advertise 8BITMIME support in LMTP mode. -b Return a permanent error instead of a temporary error if a mailbox exceeds quota. OPERANDS
The following operand is supported: recipient The recipient of the mail message. ENVIRONMENT VARIABLES
TZ Used to set the appropriate time zone on the timestamp. EXIT STATUS
The following exit values are returned: 0 Successful operation. >0 An error occurred. FILES
/tmp/local.XXXXXX temporary files /tmp/lochd.XXXXXX temporary files /var/mail/user_name user's mail file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsndmu | +-----------------------------+-----------------------------+ SEE ALSO
mail(1), comsat(1M), sendmail(1M), getservbyname(3SOCKET), attributes(5) SunOS 5.10 11 Apr 1997 mail.local(1M)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy