Function Code: sub sendmailto { $mailing_list = $_[0]; $subject = $_[1]; $message = $_[2]; $from = "naga.rajan@gmail.com" open (MAIL, "|uuencode /home/naga/testing-scripts/Package_Specification_Document.doc Package_Specification_Document.doc |mailx -s \"$subject\" -r $from $mailing_list"); print MAIL "Hi, \n"; print MAIL "\n"; print MAIL "This email was sent using an automated email system. Please do not reply, or forward to this email otherwise your message will not reach your intended recipients. \n"; print MAIL "If you like to contact us pleas write to *UNIX Team. \n"; print MAIL "\n"; print MAIL "Regards, \n"; print MAIL "UNIX Team \n"; print MAIL "\n"; print MAIL "\n"; print MAIL "$message"; close MAIL; } #### My OS details: uname -a SunOS testingserver 5.10 Generic_147440-19 sun4v sparc SUNW,T5440 perl --version This is perl, v5.8.4 built for sun4-solaris-64int (with 35 registered patches, see perl -V for more detail)