You have to include the following lines in the header of the email to have the file go as an attachment:
And you will probably have to not use mailx and use sendmail with a command like:
But, for that to work, the file, emailfilename has to have a From: line, a Date: line and a Subject: line. There has to be a blank line after these header lines, the ones above, and the start of the data.
Here's a commandline script I wrote for AIX, but which should work just about anywhere you have access to sh (bash, ksh, sh):
HTH
Last edited by kpearson; 02-23-2008 at 03:37 AM..
Reason: addition of a script to call . . .
I have used the forum to determine the format required to send attachments from hp-ux 11. the problem I have is that using mailx does not attach the file, but subsititing mailx for mail on the command line attaches the file but i'm not able to specify a subject?
The attachment has been convert... (3 Replies)
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)
Hi
Could someone help me with the details on how to send an attachment through mail in unix.
I have an html file in my unix machine and I want this to be send to some mail id, plese help with the steps.
Regards
Ajay (2 Replies)
I have a need to send a file from the unix command line to be sent as an attachment. Is this possible? That is when I open my outlook email I need to file to appear as an attachment.
Also, is there a way to use the mail binary (not mailx) to modify the "reply address". mailx -r works but I need... (1 Reply)
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)
Hi,
Our requirement is to send an attachment and content in a single mail. I am using the below command to send attachement.
---------------------
(uuencode $exp_file $exp_file) |mailx -s "$email_subject" $EmailRecipients
--------------------
I m not able to send any message in the... (4 Replies)
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)
Hi All,
I am trying to send a mail from linux server but could'nt able to send the mail.
I tried the below syntax's so far but no luck.
mail -s “Hello world” abc@xyz.com < /usr/g/txt.log
cat "txt.log" | mailx -s "Hello world" abc@xyz.com
mailx -s “Hello world” abc@xyz.com <... (2 Replies)
Whats the difference between mail and mailx?
I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL)
... (1 Reply)
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
LEARN ABOUT LINUX
nmudiff
NMUDIFF(1) General Commands Manual NMUDIFF(1)NAME
nmudiff - email an NMU diff to the Debian BTS
SYNOPSIS
nmudiff [options]
DESCRIPTION
nmudiff should be run in the source tree of the package being NMUed, after the NMU is built. It assumes that the source packages (specifi-
cally, the .dsc and any corresponding tar and diff files) for both the previous version of the package and the newly built NMU version are
in the parent directory. It then uses debdiff to generate a diff between the previous version and the current NMU, and either runs mutt or
an editor (using sensible-editor) so that the mail message (including the diff) can be examined and modified; once you exit the editor the
diff will be mailed to the Debian BTS.
The default behaviour is that if exactly one bug is closed by this NMU, then that bug will be mailed, otherwise a new bug will be submit-
ted. This behaviour may be changed by command line options and configuration file options.
OPTIONS --new Instead of mailing the bug reports which are to be closed by this NMU, a new bug report is submitted directly to the BTS.
--old Send the bug report to all of the bugs which are being closed by this NMU, rather than opening a new bug report. This option has no
effect if no bugs are being closed by this NMU.
--mutt Use mutt(1) for editing and sending the message to the BTS (default behaviour). This can be controlled using a configuration file
option (see below).
--no-mutt
Use sensible-editor(1) to edit the message and then mail it directly using /usr/bin/sendmail. This can be controlled using a con-
figuration file option (see below).
--sendmail SENDMAILCMD
Specify the sendmail command. The command will be split on white space and will be interpreted by the shell. Default is
/usr/sbin/sendmail. The -t option will be automatically added if the command is /usr/sbin/sendmail or /usr/sbin/exim*. For other
mailers, if they require a -t option, this must be included in the SENDMAILCMD, for example: --sendmail="/usr/sbin/mymailer -t".
This can also be set using the devscripts configuration files; see below.
--from EMAIL
If using the sendmail (--no-mutt) option, then the email to the BTS will be sent using the name and address in the environment vari-
ables DEBEMAIL and DEBFULLNAME. If these are not set, then the variables EMAIL and NAME will be used instead. These can be over-
ridden using the --from option. The program will not work in this case if an email address cannot be determined.
--delay DELAY
Indicate in the generated mail that the NMU has been uploaded to the DELAYED queue, with a delay of DELAY days. The default value
is XX which adds a placeholder to the e-mail. A value of 0 indicates that the upload has not been delayed. This can also be set
using the devscripts configuration files; see below.
--no-delay, --nodelay
Equivalent to --delay 0.
--no-conf, --noconf
Do not read any configuration files. This can only be used as the first option given on the command-line.
--help Display a help message and exit successfully.
--version
Display version and copyright information and exit successfully.
CONFIGURATION VARIABLES
The two configuration files /etc/devscripts.conf and ~/.devscripts are sourced in that order to set configuration variables. Command line
options can be used to override configuration file settings. Environment variable settings are ignored for this purpose. The currently
recognised variables are:
NMUDIFF_DELAY
If this is set to a number, e-mails generated by nmudiff will by default mention an upload to the DELAYED queue, delayed for the
specified number of days. The value 0 indicates that the DELAYED queue has not been used.
NMUDIFF_MUTT
Can be yes (default) or no, and specifies whether to use mutt to compose and send the message or not, as described above.
NMUDIFF_NEWREPORT
This option controls whether a new bug report is made, or whether the diff is sent to the bugs closed by this NMU. Can be maybe
(default), which sends to the existing bug reports if exactly one bug is being closed; yes, which always creates a new report, or
no, which always sends to the reports of the bugs being closed (unless no bugs are being closed, in which case a new report is
always made).
BTS_SENDMAIL_COMMAND
If this is set, specifies a sendmail command to use instead of /usr/sbin/sendmail. Same as the --sendmail command line option.
SEE ALSO debdiff(1), sensible-editor(1) and devscripts.conf(5).
AUTHOR
nmudiff was written and is copyright 2006 by Steinar H. Gunderson and modified by Julian Gilbey <jdg@debian.org>. The software may be
freely redistributed under the terms and conditions of the GNU General Public License, version 2.
DEBIAN Debian Utilities NMUDIFF(1)