Hi
Email Messaging for events is working fine for me.
however i have done the following changes to email.inc.php to

1. avoid using sendmail just for this purpose.
2. properly formatting the subject sine the subject was not coming up properly.
3. Avoid sending mails for events like login etc.
4. i have used a standalone utility sendEmail available on the net to
send the mails through command line.


//          $result = mail($to,$subject,$body,$headers,"-f$from");


$findUNK  = 'UNK';
$posUNK = strpos($body, $findUNK);


if ($posUNK === false) {

        $findALARM = '<alarm';
        $posALARM = strpos($subject, $findALARM);
        $subject = substr($subject,0,$posALARM);

        $findPROTO = 'Protocol';
        $posPROTO = strpos($body, $findPROTO);
        $subject = $subject . " " . substr($body,$posPROTO,13);

        $result = exec("/usr/local/bin/sendEmail -f [EMAIL PROTECTED] -t
" . escapeshellarg($to) . " -s <smtpserverip> -u " .
escapeshellarg($subject) . escapeshellarg($body));
        }
        else
            $result = 0;

        return $result;

hope this helps someone without a mail server of their own.

regards
durga prasad

---------------------------------------------------------------------
Find more about us at: www.datasoftindia.net
Datasoft Computers
28-14-15, 1st floor,Beside Rajkamal, 
Suryabagh, Visakhapatnam, PIN:530020
Telefax: 0891-2525225, Dir: 2726942


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
jffnms-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to