[email protected]
[Top] [All Lists]

Re: dynamically config the appender mail

Subject: Re: dynamically config the appender mail
From: Miquel Canes
Date: Tue, 18 May 2010 17:01:21 +0200
This code is working well for me:

$logger = Logger::getRootLogger();
$layout = new LoggerLayoutPattern("");
$layout->setConversionPattern("[%p] %t %c - %m%n");
$appender = new LoggerAppenderMail();
$appender->setFrom("[email protected]");
$appender->setTo("[email protected]");
$appender->setSubject("testing mail appender");
$logger->fatal("This is sample test");

Check your mail logs, maybe it helps.
Are you using a local mail server? Check it too.
Use another from email, maybe gmail check it and mark it as spam.


On Tue, May 18, 2010 at 3:23 PM, PriyaPrakash <[email protected]> wrote:
> Hi,
>   Now i am trying to append the LoggerAppenderMail(),when i execute the
> code it process successfully without any error but the mail is not received
> by the receiver,the code is,
>                        $this->appenderMail = new LoggerAppenderMail();
>                        $this->layourMail = new LoggerLayoutTTCC();
>                        $this->appenderMail->activateOptions();
>                        $this->appenderMail->setFrom("[email protected]");
>                        $this->appenderMail->setTo("[email protected]");
>                        $this->appenderMail->setSubject("TEST");
>                        this->logger->addAppender($this->appenderMail);
>                        $this->allappendersMail =
> $this->logger->getAllAppenders();
>                        $this->logger->fatal("This is sample testing");
> pls reply  me , Thanks in Advance
> --
> View this message in context: 
> http://old.nabble.com/dynamically-config-the-appender-mail-tp28595845p28595845.html
> Sent from the Log4php - Users mailing list archive at Nabble.com.

<Prev in Thread] Current Thread [Next in Thread>