The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sending Attachments Through mailx vrk1219 HP-UX 7 01-21-2009 03:18 PM
sending mail using mailx command manas6 UNIX for Dummies Questions & Answers 5 12-08-2008 10:20 AM
sending mail through mailx pvamsikr Shell Programming and Scripting 3 07-13-2008 10:56 PM
sending mail using perl through windows victorvvk Shell Programming and Scripting 13 01-17-2006 05:11 AM
sending email from mailx legato UNIX for Dummies Questions & Answers 1 11-04-2004 10:31 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-24-2009
adityamahi adityamahi is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 16
sending mail from perl using mailx

hi All,

i am trying to send a mail from perl using mailx.
the script runs fine if i hard code the file path which is to be attached to the mail. but when i give a variable containing the path of the file , perl is not able to send the file.

ex:

system('uuencode /attach/test.txt test.txt | mailx -s "Control File" -r abc@mno.com xyz@mno.com');

in the above case the scripts works fine.

system('uuencode $file $file | mailx -s "Control File" -r abc@mno.com xyz@mno.com');

here $file contains the file path /attach/test.txt .
In this case the script sends a mail but then mail doesnt have the attachment.

Please advice.

Thanks,
Mahi
 

Bookmarks

Tags
mailx, perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0