Sponsored Content
Full Discussion: mail attachment
Top Forums UNIX for Dummies Questions & Answers mail attachment Post 5981 by mib on Tuesday 28th of August 2001 02:14:27 AM
Old 08-28-2001
uuencode is using to send encoded text within a message. AFAIK mailx can't sent a standard attachment. You'll have to try metamail (metasend), mpack or mutt .

An example with metasend:

metasend -b -t someone@somewhere.org -s "Subject Here" -m text/plain -f filename
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mail with attachment

Hi, I am facing an issue while sending a mail from unix with attachment.the issue is i am able to send a mail with attachment but...after receiving the mail if u see that the text is continous though it was line by line in original.. UUENCODE is the cmd i am using... plz help me in this... (1 Reply)
Discussion started by: param786
1 Replies

2. UNIX for Advanced & Expert Users

mailx commannd - Mail and Attachment in same mail

Hi , I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Discussion started by: sharif
6 Replies

3. Shell Programming and Scripting

Mail attachment with unix mail

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)
Discussion started by: ajaykumarboyana
2 Replies

4. Shell Programming and Scripting

How to send a mail with attachment?

Hi, I usually write a file TEST.MAIL like this to send mails: Importance: High Priority: Urgent X-Priority: 1 (Highest) From: user Subject: error ... text body .... and then I launch it (or writre a c-chell that launchs it) by writing: mail a@b.com < /users/.../TEST.MAIL How can... (4 Replies)
Discussion started by: albaalbetti
4 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. Shell Programming and Scripting

Send mail using attachment

Hi All, I need to send mail with attachment. I am using uuencode but it seems it is sending encoded file. I am getting the mail with attachment but there is no data even the file size is almost 90KB. Please help. Thanks. (3 Replies)
Discussion started by: unankix
3 Replies

7. Shell Programming and Scripting

Mail Attachment...

Hi All, I am new to unix. I have written the script to identify the delimiter count for my source file and the output I have to capture in another file and that file should sent to mail with attachment. I have tried to send the attachment with below script . But I am not able to do that. Any... (2 Replies)
Discussion started by: suresh_target
2 Replies

8. Shell Programming and Scripting

Getting mail with no Attachment

Hi All, my requirement send a mail with attachment a abc.txt file. below is the shell script. #!/usr/bin/ksh set -x #DIR=/appldata/download/mail MAILTO="krupa.behera@kk.com" SUBJECT="Report" BODY="Hi All," ATTACH=/projects/psoft/hrdw/pushreports/crons/temp_out... (5 Replies)
Discussion started by: krupasindhu18
5 Replies

9. Shell Programming and Scripting

Mail attachment

Hi, I want to send an attachment and content in a single mail using unix command can anyone pls help me? Thanks Naveen A (6 Replies)
Discussion started by: Pranaveen
6 Replies
mail(1) 						      General Commands Manual							   mail(1)

NAME
mail, binmail - Sends and displays messages SYNOPSIS
Reading Mail mail [-epq] [-bhr] [-f file] binmail [-epq] [-bhr] [-f file] Sending Mail mail [-d] [-r name] [-h N] user... [< file] binmail [-d] [-r name] [-h N] user... [< file] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: mail: XCU5.0 binmail: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Reading Mail You can use the following options when invoking the mail command to read mail: Does not display any messages. This option causes mail to return an exit value of 0 (zero) if the user has mail and an exit value of 1 if the user has no mail. Saves mail to and reads mail from file instead of the default mail file, /usr/spool/mail/user. Displays mail without prompting for a disposition code. This option does not delete, copy, or forward any messages. Causes mail to exit when you press the Interrupt key sequence. Normally, pressing the Interrupt key sequence stops only the message being displayed. (In this case, the next message sometimes does not display until you enter the p subcom- mand.) Displays mail in first-in, first-out order. The default is last-in, first-out. Alternate and obsolete form of the -b option. If -r is the first option specified and more arguments follow, send mail mode is assumed. Alternate and obsolete form of the -b option. If -h is the first option specified and more arguments follow, send mail mode is assumed. Sending Mail You can use the following options when invoking the mail command to send mail: Sets the hop count to N. The hop count is incremented every time the mail is processed. When it reaches a limit, the mail is returned with an error message, the victim of an aliasing loop. If you do not specify this option, received lines in the message are counted. Sets the name of the From: user field (that is, the sender of the mail). The -r option can only be used by trusted users (normally root, daemon, and network) or if the person you are trying to become is the same as the person you are. Informs binmail to actually deliver the mail instead of passing it off to the sendmail program for deliv- ery. DESCRIPTION
The mail command writes to standard output all stored mail addressed to your login name, one message at a time, or sends a mail message to another user or users. Another name for the mail command is binmail. Following each message, mail prompts you with a ? question mark. Press <Return> to display the current mail message, or enter one of the subcommands that control the disposition of the message. When sending mail, you specify users, and then mail reads a message from standard input until you press the End-of-File key sequence or enter a line containing only a . (dot). It prefixes this message with the sender's name and the date and time of the message (its postmark) and adds this message to the file /usr/spool/mail/user for each user specified on the command line. Usually, user is a name recognized by the login command. If the system does not recognize one or more of the specified users or if mail is interrupted during input, mail saves messages in the file $HOME/dead.letter to allow for editing and resending. The action of mail can be modified in two ways by manipulating /usr/spool/mail/user: The default permission assignment for other users is read-only. If you change this permission assignment to read/write or to All Permissions Denied, the system preserves the file, even when it is empty, in order to maintain the desired permissions; you will not be able to remove the file. You can edit the file to contain the following as its first line: Forward to person This causes all messages sent to user to be sent to person instead. The Forward to feature is especially useful for sending all of a person's mail to a particular machine in a network environment. To specify a recipient on a remote system, prefix the system name and an ! (exclamation mark) to user. See the uucp command for a detailed discussion of how to address remote systems. Also see mailx and sendmail for other network connections. Tru64 UNIX provides locking for the mailbox files. The style of locking used depends on how it is set in the rc.config.common file. For more information, see the Network Administration manual. Subcommands The following subcommands control message disposition. Displays the next mail message. Displays the previous message. Deletes the cur- rent message and displays the next message. Displays the current message again. Saves the message in file instead of in the default mail file $HOME/mbox. Saves the message, without its postmark, in file instead of in the default mail file, $HOME/mbox. Forwards the current message to users. If the forward was successful, deletes that message and then displays the next message. Writes any mail not yet deleted to /usr/spool/mail/user and exits. Pressing the End-of-File key sequence has the same effect. Exit, leaving the mail file unchanged. Runs the specified command. Displays a subcommand summary. Displays a subcommand summary. NOTES
The mail utility is marked LEGACY in XCU Issue 5. The binmail program is not RFC 822 compliant. This affects messages that begin withlines that look like header lines. Header lines begin with a string followed by a colon (:) (such as those found in the /etc/passwd file). Use mailx command to send such messages, or make sure the message is preceded by a blank line. EXIT STATUS
For information about exit values, see the OPTIONS section. EXAMPLES
To display your mail, enter: mail After the most recent message is displayed, a ? (question mark) indicates that mail is waiting for one of the subcommands explained previously (+, -, d, p, and so on). Enter help or an * (asterisk) to list the subcommands available. If the End-of-File key sequence is <Ctrl-d>, you send mail to other users by entering: mail tom rachel Do not forget the meeting tomorrow at 9:30. <Ctrl- d> In this example, the system mails the message Do not forget the meeting tomorrow at 9:30. to the users tom and rachel. The End-of- File key sequence (in this case, <Ctrl-d>) indicates the end of the message, but it is not sent with the text. To send a file to another user, enter: mail fran < proposal This command sends the contents of the file proposal to fran. To save a message to the default mail file, enter: mail This command displays each message mailed to you. Press <Return> after the ? prompt until the desired message is displayed. When the appropriate message is displayed, enter: s The message is saved in the default mail file, $HOME/mbox. To save a message to a specific file, enter: mail This command displays each message mailed to you. Press <Return> after the ? prompt until the desired message is displayed. When the appropriate message is displayed, enter: s mycopy This command saves the message in a file named mycopy in the current directory, rather than in the default mail file. FILES
Holds saved mail. Holds unmailable text. Contains user information. Holds incoming mail for user. Lock for mail directory. (Note: this file is not created if lockf is used for locking. SEE ALSO
Commands: login(1), mailx(1), sendmail(8), write(1), uucp(1) mail(1)
All times are GMT -4. The time now is 10:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy