My Code Snippet.
Code:
#!perl -w ############################################################################# # use SOAP::Lite; use POSIX qw( strftime ); use warnings; my $data_date = strftime("[%m/%d/%Y %H:%M:%S]", localtime); my %InputParms; my $temp_elements; my $response = 1; ############################################## # # Step 1 - Email the reminder # ############################################## my $soap1 = SOAP::Lite -> uri('urn:MsgDeliveryService') -> proxy("http://$ENV{MSGDEL_WS_HOST}/MsgDeliveryService/services/MsgDeliveryService"); my $subj = "Activity Sheet Daily Report Notice"; my $recp = "abc\@gmail.com"; if( $ENV{CTRM_ENV} ne "PRD" ) { $subj = "$ENV{CTRM_ENV}: TEST : $subj"; $recp = "abc\@gmail.com"; } %InputParms = ( FROM => "abc\@gmail.com", SUBJECT => "$subj", PAYLOAD => "The Activity Sheet Daily Report is available", DLVR_MTHD => "SMTP", RECIPIENT => "$recp" ); $temp_elements = SOAP::Data -> value( SOAP::Data -> type('map', \%InputParms) ); $response = $soap1->deliverMsg($temp_elements); exit ($response?0:1);