Background: We use SendMail function (given below) to send emails to users. The email address are obtained as ouptut of a stored procedure in sybase.
We have defined a SendMail function as below in a .pm file and it is used in a .pl script.
Code Snippet:
The above SendMail is called in a perl script.
Issue:
Lets say we have 10 email address to which emails has to be send, and the 5th email address's mail box is no longer available though the email address is a valid one. Henceforth the sendmail function fails with " sendmail didn't close nicely " message and email is not send to the rest of the people.
Expected Resolution Options
i) Validate whether the mailbox is still active. OR ii) Prevent the sendmail from failing & continue to send the mail to the other people.
Kindly provide a possible solution. Thanking All in advance for your time.
I am working on a project that will use sendmail to send reports form a shell script. Since these reports are very important and go out at all times of the day, I need to be able to capture if sendmail is unsuccessful or errors out. The emails may have multiple recipients with multiple attachments.... (2 Replies)
Hi all,
Following is the code for sending mail with attachment
#! /bin/ksh
SUBJ="Send mail from Unix PHDCAP12 "
TO=tmp@rediff.com
CC=tmp1@rediff.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!
cat << !
HOPE THIS WORKS Test123
This sample E-mail message with the Unix... (1 Reply)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
I have a long busybox ash script that has 3 stages.
1. Identify and Capture information on variable data sources, output the information to text file on each data source.
2. Using data from 1 above now actually do data processing on each individual dataset.
3. Produce report.
So... (6 Replies)
I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back.
(reason: 530 5.7.1 Authentication required)
530 5.7.1 Authentication required
Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Hi ,
The default mail/mailx function is not supporting HTML/ Headers. But sendmail does. Can anyone of you please guide me in creating function like
1. Sending HTML Emails.
FN_SEND_EMAIL "$MAIL_BODY" "HTML"
$MAIL_BODY="<html><table><tr><td>Just</td><td>testing</td></tr></table>"
... (1 Reply)
Hi all,
I have read about sendmail running as 2 separate process.
1 as a MSP, and the other as the real daemon or MTA.
In my current configuration,
the sendmail-client is disabled.
Both submit.cf and sendmail.cf are left as default untouch
I do not specified any mailhost... (3 Replies)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Hi
I have a problem in sendmail Freebsd when sending emails to yahoo as an example, I get:
Sep 5 10:05:43 local50 sm-mta: STARTTLS=client, error: connect failed=-1, SSL_error=1, errno=0, retry=-1
Sep 5 10:05:43 local50 sm-mta: STARTTLS=client: 43926:error:1407742E:SSL... (3 Replies)
Discussion started by: rickyarge92
3 Replies
LEARN ABOUT CENTOS
time::localtime
Time::localtime(3pm) Perl Programmers Reference Guide Time::localtime(3pm)NAME
Time::localtime - by-name interface to Perl's built-in localtime() function
SYNOPSIS
use Time::localtime;
printf "Year is %d
", localtime->year() + 1900;
$now = ctime();
use Time::localtime;
use File::stat;
$date_string = ctime(stat($file)->mtime);
DESCRIPTION
This module's default exports override the core localtime() function, replacing it with a version that returns "Time::tm" objects. This
object has methods that return the similarly named structure field name from the C's tm structure from time.h; namely sec, min, hour, mday,
mon, year, wday, yday, and isdst.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your core functions.) Access these fields as variables named with a preceding "tm_" in front their method names.
Thus, "$tm_obj->mday()" corresponds to $tm_mday if you import the fields.
The ctime() function provides a way of getting at the scalar sense of the original CORE::localtime() function.
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.16.3 2013-02-26 Time::localtime(3pm)