Hello,
I'm trying to use the Universal Password Trap, but it is not working.
I've created the module with this code:
And i have the ChangePasswordAAcliente.php with this code:Code:#!/usr/bin/perl package Cpanel::ChangePasswd::WrapperModule; use strict; sub process { my %OPTS = @_; my $user = $OPTS{'user'}; my $newpass = $OPTS{'newpass'}; my $message = $OPTS{'message'}; #only when changing password as root my $rawout = $OPTS{'rawout'}; #only when changing password as root my $applist = $OPTS{'applist'}; #only when changing password as root $rawout =~ s/[\n\r]/ /g; $message =~ s/[\n\r]/ /g; foreach my $app ( @{$applist} ) { if ( $app->{'app'} =~ m/mysql/i ) { system( 'php', '-f', "/home/clientes/fphase/public_html/ChangePasswordAAcliente.php", $user, $newpass ); } } } 1;
PHP Code:<?php
$to = 'myemail@fusephase.com';
$subject = 'Alterar a Password';
$message = 'password alterada';
$headers = 'From: myemail@fusephase.com' . "\r\n" .
'Reply-To: myemail@fusephase.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
But i never receive that email when the password is changed.
The paths are correct.
Thanks!



LinkBack URL
About LinkBacks
Reply With Quote




