Sponsored Content
Top Forums Shell Programming and Scripting Script to attach latest files of directories in a mail. Post 303011767 by sadique.manzar on Tuesday 23rd of January 2018 08:57:38 AM
Old 01-23-2018
Dear RudiC

i need files to be attached. like 5 files of the directory . thats need to be attached and send to user mail id.
 

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. 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

5. 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

6. Shell Programming and Scripting

Script to attach file to mail

Hello, I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line". Thanks (4 Replies)
Discussion started by: sfetea
4 Replies

7. Shell Programming and Scripting

How to attach two files in unix script

Hi, My script has to send 2 files as a separate attachment(Note : files to be sent without zipping) to the specified email id. Below code was used but it is not attaching the file as expected instead the file contents are displayed in the body of the email. Kindly,help with your... (22 Replies)
Discussion started by: meva
22 Replies

8. 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

9. 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

10. UNIX for Advanced & Expert Users

Attach a document in mail using sendmail command

Hi Guys, May i know how to attach a document using sendmail command in Linux platform.... :confused: (2 Replies)
Discussion started by: Santosh101
2 Replies
Mail::SendEasy(3pm)					User Contributed Perl Documentation				       Mail::SendEasy(3pm)

NAME
Mail::SendEasy - Send plain/html e-mails through SMTP servers (platform independent). Supports SMTP authentication and attachments. DESCRIPTION
This modules will send in a easy way e-mails, and doesn't have dependencies. Soo, you don't need to install libnet. It supports SMTP authentication and attachments. USAGE
OO use Mail::SendEasy ; my $mail = new Mail::SendEasy( smtp => 'localhost' , user => 'foo' , pass => 123 , ) ; my $status = $mail->send( from => 'sender@foo.com' , from_title => 'Foo Name' , reply => 're@foo.com' , error => 'error@foo.com' , to => 'recp@domain.foo' , cc => 'recpcopy@domain.foo' , subject => "MAIL Test" , msg => "The Plain Msg..." , html => "<b>The HTML Msg...</b>" , msgid => "0101" , ) ; if (!$status) { print $mail->error ;} STRUCTURED use Mail::SendEasy ; my $status = Mail::SendEasy::send( smtp => 'localhost' , user => 'foo' , pass => 123 , from => 'sender@foo.com' , from_title => 'Foo Name' , reply => 're@foo.com' , error => 'error@foo.com' , to => 'recp@domain.foo' , cc => 'recpcopy@domain.foo' , subject => "MAIL Test" , msg => "The Plain Msg..." , html => "<b>The HTML Msg...</b>" , msgid => "0101" , ) ; if (!$status) { Mail::SendEasy::error ;} METHODS
new (%OPTIONS) %OPTIONS: smtp The SMTP server. (Default: localhost) port The SMTP port. (Default: 25) timeout The time to wait for the connection and data. (Default: 120) user The username for authentication. pass The password for authentication. send (%OPTIONS) %OPTIONS: from The e-mail adress of the sender. (Only accept one adress). from_title The name or title of the sender. reply E-mail used to reply to your e-mail. error E-mail to send error messages. to Recipient e-mail adresses. cc Adresses to receive a copy. subject The subject of your e-mail. msg The plain message. html The HTML message. If used with MSG (plain), the format "multipart/alternative" will be used. Readers that can read HTML messages will use the HTML argument, and readers with only plain messages will use MSG. msgid An ID to insert in the e-mail Headers. The header will be: Msg-ID: xxxxx anex Send file(s) attached. Just put the right path in the machine for the file. For more than one file use ARRAY ref: ['file1','file2'] ** Will load all the files in the memory. zipanex Compress with zip the ANEX (attached) file(s). All the files will be inside the same zip file. If the argument has the extension .zip, will be used for the name of the zip file. If not, the file will be "anex.zip", and if exist only one ANEX, the name will be the same of the ANEX, but with the extension .zip. ** Need the module Archive::Zip installed or the argument will be skipped. ** This will generate the zip file in the memory. SEE ALSO
Mail::SendEasy::SMTP, Mail::SendEasy::AUTH, HPL. This module was created to handle the e-mail system of HPL. AUTHOR
Graciliano M. P. <gm@virtuasites.com.br> I will appreciate any type of feedback (include your opinions and/or suggestions). ;-P COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-09-18 Mail::SendEasy(3pm)
All times are GMT -4. The time now is 06:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy