06-29-2007
Thanks for all the help. I still had trouble getting the message inside testfile.txt <<attachment file>> to keep the content inside the file and stay in the attachment format and at the same time put the msgfile inside the email body. So....I figured since I am dealing with MIME type text anyway I will simply cat the file contents directly into the email body like so:
print "we are sending the message...";
cat testfile.txt msgfile.txt >>combofile.txt
cat combofile.txt | mailx -s "Online Financial Reporting - New Users" -r "Tim Kline"
tim.kline@company.com
cat combofile.txt
rm combofile.txt
echo "email was sent!";
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi folks,
My input file's content:
You are line1
You are line2
You are line3
etc...
I need to write a script that for every line, it will send an e-mail and the body will hold the line:
Output(The e-mail that will be sent):
First e-mail: To: aaa Subject: bbb Body:You are line1... (4 Replies)
Discussion started by: hellsd
4 Replies
2. Solaris
I just installed solaris 9 on a sunblade 150(sparc), and have it partitioned. I've been using ufsrestore to restore bring the config from my old system, to the sunblade. I'm not having any luck. The root directory restore seems to work. When I try to restore /usr, I get an "/usr/sbin/fsck not... (4 Replies)
Discussion started by: ECBROWN
4 Replies
3. Solaris
in ufsrestore how do i know which volume my selected
folder or file exist?. (4 Replies)
Discussion started by: S26+
4 Replies
4. Shell Programming and Scripting
Hi
I want to use mailx command to send a message included more than one file.
I tried to use uuencode in pipe but it could only generate one file.
I would avoid using an archive file :p
Thanks to read you.
Mathieu (2 Replies)
Discussion started by: madmat
2 Replies
5. Shell Programming and Scripting
Greetings all,
I'm pretty new to the use of mailx, having been using mutt most of the time. I'm interested to know how I can use mailx within a shell script to send out a formatted email with the following criterion:
1. My recipient's address is abcdef1000@gmail.com
2. The message body is... (2 Replies)
Discussion started by: rockysfr
2 Replies
6. Virtualization and Cloud Computing
Many readers have read the hype, experienced the Orwellian marketspeak, watched the positioning debates, and seen poorly managed software companies play the game of analyst-chasing (similar to ambulance chasing when you think about it). Finally, the up-to-date definitions, and hopefully a bit of... (0 Replies)
Discussion started by: Linux Bot
0 Replies
7. Shell Programming and Scripting
Hi all,
Think this is a pretty simple problem, but I've been thinking about it for a few days. Let's say that I'm going to have to output the contents of a file as the body of a mailx message.
I'll probably do this: cat <filename> | mailx <extra commands>
However, how do I go about doing... (1 Reply)
Discussion started by: rockysfr
1 Replies
8. Solaris
hi all,
ive downloaded ,built and installed coreutils from sunfreeware.com,in my quest to get the color display when ls is used(linux style)...
After the pkg is installed,how do i use ls to get the color?
I know its installed because i get a host of cmds that have been updated,l
like this,
... (1 Reply)
Discussion started by: wrapster
1 Replies
9. Shell Programming and Scripting
Hi,
I need to create one KSH which will send mail to set of recipients using "mailx" command like below.
mailx -s "Test mail" "test@yahoo.com, test@gmail.com" <$output.txt
The recipients are in different domains (like yahoo, gmail, etc.).
My requirement is, if any mail is undelivered,... (1 Reply)
Discussion started by: Matrix2682
1 Replies
comsat(8) System Manager's Manual comsat(8)
NAME
comsat - The biff server
SYNOPSIS
comsat
DESCRIPTION
The comsat server receives reports of incoming mail and notifies users who request this service. comsat is invoked by the inetd(8) daemon
when it receives messages on a datagram port associated with the biff(1) service specification in /etc/services(4). The datagram contains
a 1-line message of the form: user@mailbox-offset If the user specified is logged in and the associated terminal has the owner execute bit
turned on (with biff y), offset is used as a seek offset into the file named in mailbox. The first 7 lines or 560 characters of the mes-
sage are printed on the user's system. The message excludes mail header lines other than the From or Subject lines.
The comsat command always tries to convert incoming mail messages from the mail interchange codeset to the user's application codeset. It
determines the mail interchange code first by checking the mail message itself to see if it contains the required information. Otherwise,
the system-wide default mail interchange code in the file /usr/lib/mail-codesets will be used. If no such system file exists, no codeset
conversion will be performed.
The determination of the user's application code in each terminal session is by one of the following methods. The application codeset
defined in the user's Asian tty driver. The codeset name stored in the ~/.codesetdevname file, where devname is the name of the terminal
device for the current terminal session. You can obtain the value of devname by issuing the tty command. For example, if the tty command
returns /dev/ttys8, use ttys8 as the value for devname. The lang valued option defined in $HOME/.mailrc or /usr/share/lib/Mail.rc.
FILES
Specifies the command path. Includes information about logged-in users and their associated ttys. File containing mailx subcommands to
customize mailx for a specific user. File containing mailx subcommands to change mailx for all users on the system.
RELATED INFORMATION
Commands: biff(1), inetd(8), mailx(1), mh(1)
Files: services(4), inetd.conf(4), tty(7) delim off
comsat(8)