Changing the mail Header using Perl Email Script
Hi All,
I am a newbie to Perl Programming. I want to send an email using perl Script. I am able to do that. Perl Script is running on a Solaris machine But the From ID conatins the system name in the ID. storage_admin.alt.ka@sm-ccstorage-1.alt.na.ka Please see the Script below, open (INFO, "/athreya/Qtrees"); @result=<INFO>; close(INFO); print @result; $mailprog = '/usr/lib/sendmail'; open(MAIL,"|$mailprog -t"); print MAIL "To: athreya\@alt.ka\n"; print MAIL "From: storage@alt.ka\n"; print MAIL "Subject: $subject\n\n"; ## Mail Body print MAIL "Below Qtrees are nearing Full. Please do the Needful\n"; print MAIL @result; print MAIL "\n"; print MAIL "Best Regards\n"; print MAIL "IT Admin"; close(MAIL); Can in any way we change the From header? Thanks and Regards, Athreya VC |
perldoc perle
. And _always_ use 'use strict;', 'use warnings;'. |
All times are GMT -5. The time now is 04:38 PM. |