Sponsored Content
Top Forums Shell Programming and Scripting Script to attach file to mail Post 302474602 by methyl on Wednesday 24th of November 2010 06:45:39 PM
Old 11-24-2010
Or alternatively:

Code:
echo "The last disposal feed is `cat "${file_containing_the_line.dat}`" | mailx -s "The subject of this email was not mentioned" the_email_address@domain.com

Ps. For futuire posts please mention your Operating System, your Email service and what Shell you are using.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to attach a file in mail?

Hi, I want to know how to send a mail in unix using mailx or mail or sendmail to send a mail with a file attached. I have read the answers from the other threads but I still don't understand. I want to do it in the command line as well as in script. Can anyone help? DO I need to use... (1 Reply)
Discussion started by: firebirdonfire
1 Replies

2. Shell Programming and Scripting

Need to attach a txt file while sending mail

Hi, I need to attach a txt file while sending mail thru Unix. Please help me out in this.. -Charan. (9 Replies)
Discussion started by: charan81
9 Replies

3. Shell Programming and Scripting

How to attach a file & send mail thru script

In shell script how can I attach a file and send a mail. suppose if I written like the following way usr/bin/mail 'subject" "mail_id" < file. a mail goes to the mail-id with the content of file.But I want the file to be atttached to the mail.How can I get it.is there any way for this. ... (9 Replies)
Discussion started by: Mar1006
9 Replies

4. UNIX for Dummies Questions & Answers

How to use "mail" to attach a file with an email?

echo "content" | mail email@address -s subject Where to attach a file with the email? (2 Replies)
Discussion started by: meili100
2 Replies

5. Shell Programming and Scripting

How to attach a file in Linux mail command

How to attach a file in Linux mail command Hi Guys, Is there any way to attach a file in Linux mail command without using "uuencode"? i.e. Code: file=/a/b/c/d/file.txtmail -s "Giga aks" abc@123.com <<HDoc`uuencode $file $file 2>/dev/null`HDoc Here, I don;t want to use 'uuencode'... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies

6. HP-UX

How to attach an excel file in a multipart (mime) mail

Hello. I need to send mails from hp-ux with 2 attachments: a text file and an excel file. So I'm composing a mime file which I will pipe to sendmail utility. This works fine if the only attachment is the text file (i use cat command to attach text content). But I have problems with the format... (3 Replies)
Discussion started by: elcampio
3 Replies

7. Shell Programming and Scripting

How to attach multiple file to send mail command

Hi, i want color effect on mail as well as multiple attachment.I have code but this code is used for single attachment. I am unable to attach more than one file.:wall: I want to send two attachments -ahmed.csv and ahmed1.csv . Sample content: <html> <body> <b> Hi...</b> </body> </html> ... (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

8. Shell Programming and Scripting

UNIX - how to send attach excel in mail

Hi Experts, i need your help here :confused: Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell. Thanks in... (9 Replies)
Discussion started by: newbieabc
9 Replies

9. Shell Programming and Scripting

Unable to attach a .txt file or .log file to mail and mailx command

Hi, I am trying to attach a .log file or .txt file to mail command to send an email once my ksh script executed. I am unable to use mutt command as it has been not installed and i am not supposed to install it. I have tried many ways by googling which has not helped me to succeed. Here is my... (5 Replies)
Discussion started by: Samah
5 Replies

10. Shell Programming and Scripting

Script to attach latest files of directories in a mail.

Hello Folks, I am looking for the script which will go to directory and check for the latest 5 files and send a mail to attaches these files to user. Kindly guide. Regards (7 Replies)
Discussion started by: sadique.manzar
7 Replies
Paranoid::Log::Email(3pm)				User Contributed Perl Documentation				 Paranoid::Log::Email(3pm)

NAME
Paranoid::Log::Email - Log Facility Email VERSION
$Id: Email.pm,v 0.82 2010/04/15 23:23:28 acorliss Exp $ SYNOPSIS
use Paranoid::Log; enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, $recipient); enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, [ @recipients ]); enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, $recipient, $sender, $subject); DESCRIPTION
This module implements an e-mail transport for messages sent to the logger. It supports one or more recipients as well as overriding the sender address and subject line. It also supports connecting to a remote mail server. DEPENDENCIES
o Net::SMTP o Net::Domain o Paranoid::Debug SUBROUTINES
/METHODS NOTE: Given that this module is not intended to be used directly nothing is exported. init log remove dump SEE ALSO
o Paranoid::Log BUGS AND LIMITATIONS
No validation of any information, be it the mail server, recipient, or anything else is done until a message actually needs to be sent. Because of this you may have no warning of any misconfigurations just by enabling the facility. AUTHOR
Arthur Corliss (corliss@digitalmages.com) LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information. (c) 2005, Arthur Corliss (corliss@digitalmages.com) perl v5.14.2 2010-04-15 Paranoid::Log::Email(3pm)
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy