Sponsored Content
Operating Systems Solaris Send file attachement in mail Post 302878257 by nes on Thursday 5th of December 2013 08:44:15 AM
Old 12-05-2013
Send file attachement in mail

Hello,

I am able to attache the file in UNIX/LINUX script using following code.

Code:
MAILFORMAT="Please do not replay this mail.This mail is auto generated."
 
echo -e $MAILFORMAT | mailx -r autoreplay@gmail.com -a filename -s "status" xyz@gmail.com

But same I am not able attache the file in Sunos system in script.

Please advise. Smilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Send a mail with a subject and an attachement

Dear All: I want to send a message to a list of people with a subject and an attachement, currently I am using the following command into a shell script: uuencode $FILENAME.gz $FILENAME.gz | mail john.kennedy@mycompany.com m.m@mycompany.com With this command I can send the message for a... (1 Reply)
Discussion started by: josecollantes
1 Replies

2. UNIX for Dummies Questions & Answers

Send a mail with an attachement of a file

I wanted to try sending a mail with an attachement at command prompt in unix. Some one please advise that how we can do it ? Thanks, :) (2 Replies)
Discussion started by: gaddeg
2 Replies

3. Shell Programming and Scripting

How to send Mail with Attachement

Hi Can somebody help me in wirting shell script in the following way.Desperately i have poseted this.. 1.How can I connect to Oracle(Sqlplus) from UNIX. 2.After connecting to it I have to execute an oracle proceudure.. 3.Execution of the procedure will give some set of rows.. 4.The set of... (6 Replies)
Discussion started by: chgopi
6 Replies

4. UNIX for Dummies Questions & Answers

Send email with attachement-Getting connection refused by domain

Hi all, I am a newbie to unix. I need to send an email with an attachment in unix to some id like abc@some_company.com Code i have used is ------------Code--------------------------- #!/bin/ksh set -x #set -n #cript: unix_mail_withattachments.ksh # Aurthor: Ravin Maharaj #... (1 Reply)
Discussion started by: samuelc
1 Replies

5. Shell Programming and Scripting

How to send a mail with attachement as well as message Body..?

Hi all, i am working with CSH, i want to know that how to send a mail in UNIX shell script (CSH) with attachment as well as message body. i know that how to send a mail with attachment and message body. but i want know both things in a single mail Suggession would be appreciate. ... (1 Reply)
Discussion started by: psiva_arul
1 Replies

6. Shell Programming and Scripting

query about Attachement in mail

Hi All, I have general query that ...in my script i used uuencode option like below. cd /location (cat test.txt uuencode test.csv test.csv ) | mail -s "test mail" "mail_id" but whenever i run the above command its giving error like below ./testscript.sh: uuencode not found: ... (1 Reply)
Discussion started by: Shahul
1 Replies

7. Shell Programming and Scripting

attachement through mail command

Can't attach text files to 'mail' command. I dont have mutt or mailx to use on my server. so i have to use mail command any help would be great. Regards, Kiran (1 Reply)
Discussion started by: dddkiran
1 Replies

8. Shell Programming and Scripting

sending attachement in mail

Hi , I am using the below code to send mail through a script which run as a cron job. msgdate=`date +"%a, %e %Y %T %z"` daemail=$(cat <<! From: $from To: $emailtarget Subject: $subject Mime-Version: 1.0 Content-Type: multipart/mixed; Content-Disposition: inline $priority $CONTENT !)... (2 Replies)
Discussion started by: ahamed
2 Replies

9. 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
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)
All times are GMT -4. The time now is 05:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy