02-08-2009
Problem using unix mail command
Hello,
When i am using mail command like this:
mail -r
prashant.aggarwal@xx.com -s "hiiii" p
rashant.aggarwal@xx.com < Content.txt i am abl eto dend a mail. Content.txt is a file from which contents are being reda
But when i am trying to execute it thru a shell scipt like this it's giving
The flags you gave make no sense since you're not sending mail. The strange part is still sending the mail to me as desired, why is this message coming?
The shell script is this:
while read line
do
mail -r
prashant.aggarwal@xx.com -s "The CBE Alert Processor is not working in Development" $line < Content.txt
done < MailTo.txt
MailTo.txt contains email id's to which i want to send mail. Each id starts from new line
Please guide me where is the problem
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
Im trying to send a e-mail to two people e.g X & Y . I run a shell script that uses the mail command to send an email to both these people . The email that i am sending contains two attatchments that i 'add' to a .mail file.
mail <recipients> < filename.mail
The problem that im... (1 Reply)
Discussion started by: nbvcxzdz
1 Replies
2. UNIX for Dummies Questions & Answers
I am trying to send email using the "mail" command. I keep getting an "exec failed. errno=2." message.
Here is one the commands I have tried:
mail test@mycompany.com < test1.out
Any ideas what may be causing this error msg? (1 Reply)
Discussion started by: hawkman2k
1 Replies
3. UNIX for Dummies Questions & Answers
1)My main script Calls a function IsDomain to check whether the domain is valid or not
PROD>/appl/retek/mpscripts/cat mg3TRn01
#!/bin/ksh
#
# Standard Header Files
#
#
. ${0%${0##*/}}UKMPFunctionLibrary.test
#
# START
#
ScriptStart
#
# Check that domain exists.Print &... (0 Replies)
Discussion started by: Shilpi
0 Replies
4. Shell Programming and Scripting
Hi,
I am using mailx command to send a mail with attachment. It's working fine, but with attachment I am getting one extra attachment like (ATT00131.txt). I have tried to use unix2dos command also. But still I am getting the extra attachment.
I am using the following code:
subject="temp... (5 Replies)
Discussion started by: viswanatharv
5 Replies
5. Ubuntu
Hi,
My question is that is there any substitute command for mail in ubuntu because I'm trying to run it and it is showing error: command not found!!
Will it need to download any specific package? If so please tell me how can I download that pkg.
Thanks in advance. (1 Reply)
Discussion started by: nageshgautam
1 Replies
6. UNIX for Dummies Questions & Answers
Hi all ,
I wanted to know how does a 'mail' command works in unix. Does it use an smtp server internally ?
How and where it is configured then ? I am trying to google out the same , but not getting much help.
Any suggestions with be of great help.
- Andy (5 Replies)
Discussion started by: anindyabecs
5 Replies
7. UNIX for Dummies Questions & Answers
I recently generated myself the following error when attempting to use the Unix mail command:
The flags you gave make no sense since you're not sending mail.
There is a recent thread about this issue here in unix.com (with a title very much like this thread's title), but it was closed... (2 Replies)
Discussion started by: Clovis_Sangrail
2 Replies
8. Shell Programming and Scripting
Hi All,
Is it possible to email a file from another directory in Unix shell prompt? In other words, do we have to be in the directory where the file is located to mail the file?
I was in the Mail directory and my file (filename) is in the Practice directory. I tried this and it didn't work:... (7 Replies)
Discussion started by: onlinelearner02
7 Replies
9. Shell Programming and Scripting
I am using HP-UX server. I tried to send the email with attachment, I used the below unix command to send with attachment but it doent work.
uuencode pepsitoday.csv | mailx -s "csv file" ramkumar15@pepsi.com
---------- Post updated at 02:10 AM ---------- Previous update was at... (2 Replies)
Discussion started by: ramkumar15
2 Replies
10. Shell Programming and Scripting
Hello,
I have compiled a perl script to extract email address from an email file and tried to send email as bash script but " signs are ommitted by the bash script. What am I doing wrong? I would appreciate if you could fix it.
#!/bin/bash
while read -r COL1
do
echo "mail -s "This is a... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT OPENSOLARIS
xdg-email
XDG-EMAIL(1) XDG-EMAIL(1)
NAME
xdg-email - command line tool for sending mail using the user's preferred e-mail composer
SYNOPSIS
xdg-email [--utf8] [--cc address] [--bcc address] [--subject text] [--body text] [--attach file] [mailto-uri address(es)]
xdg-email {--help --manual --version}
DESCRIPTION
xdg-email opens the user's preferred e-mail composer in order to send a mail to address(es) or mailto-uri. RFC2368 defines mailto: URIs.
xdg-email limits support to, cc, subject and body fields in mailto-uri, all other fields are silently ignored. address(es) must follow the
syntax of RFC822. Multiple addresses may be provided as separate arguments.
All information provided on the command line is used to prefill corresponding fields in the user's e-mail composer. The user will have the
opportunity to change any of this information before actually sending the e-mail.
xdg-email is for use inside a desktop session only. It is not recommended to use xdg-email as root.
See http://portland.freedesktop.org/EmailConfig for information on how the user can change the e-mail composer that is used.
OPTIONS
--utf8 Indicates that all command line options that follow are in utf8. Without this option, command line options are expected to be
encoded according to locale. If the locale already specifies utf8 this option has no effect. This option does not affect mailto URIs
that are passed on the command line.
--cc address
Specify a recipient to be copied on the e-mail.
--bcc address
Specify a recipient to be blindly copied on the e-mail.
--subject text
Specify a subject for the e-mail.
--body text
Specify a body for the e-mail. Since the user will be able to make changes before actually sending the e-mail, this can be used to
provide the user with a template for the e-mail. text may contain linebreaks.
--attach file
Specify an attachment for the e-mail. file must point to an existing file.
Some e-mail applications require the file to remain present after xdg-email returns.
--help Show command synopsis.
--manual
Show this manualpage.
--version
Show the xdg-utils version information.
ENVIRONMENT VARIABLES
xdg-email honours the following environment variables:
XDG_UTILS_DEBUG_LEVEL
Setting this environment variable to a non-zero numerical value makes xdg-email do more verbose reporting on stderr. Setting a
higher value increases the verbosity.
EXIT CODES
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
1 Error in command line syntax.
2 One of the files passed on the command line did not exist.
3 A required tool could not be found.
4 The action failed.
5 No permission to read one of the files passed on the command line.
CONFIGURATION
Visit http://portland.freedesktop.org/EmailConfig for information how to configure xdg-email to use the email client of your choice.
EXAMPLES
xdg-email 'Jeremy White <jwhite@example.com>'
xdg-email --attach /tmp/logo.png
--subject 'Logo contest'
--body 'Attached you find the logo for the contest.'
'jwhite@example.com'
xdg-email --subject 'Your password is about to expire'
'jwhite@example.com' 'bastian@example.com' 'whipple@example.com'
AUTHOR
Kevin Krammer, Jeremy White.
<kevin.krammer@gmx.at>
<jwhite@codeweavers.com>
xdg-utils 1.0 06/24/2007 XDG-EMAIL(1)