rejected email template not working
QuoteAug 21, 2009 05:210 likesLike
 

Hi,

For some reason, all my email notification work except the one for rejected profile. Would someone have an idea?

Thank

QuoteAug 23, 2009 05:290 likesLike
 

No one knows why the rejected validation status email isn't sent?

Thank

QuoteAug 23, 2009 16:290 likesLike
 

So far, here are my findings:

BxDolProfilesController.php doesn't have a function to send out email when profile status is changed to "Rejected".

I added it:

====

function sendRejectMail( $iMemID ) {
$iMemID = (int)$iMemID;
$aMember  = $this -> getProfileInfo( $iMemID );
if( !$aMember )
return false;

$sEmail   = $aMember['Email'];
$sSubject = getParam('t_Rejection_subject');
$sMessage = getParam('t_Rejection');

return sendMail( $sEmail, $sSubject, $sMessage, $iMemID );
}

====

and added the red text bellow:

====

//collect status text
if( $bSendMails and !$aMainMember ) { //send mail only to main member, not to couple
if( getParam('autoApproval_ifNoConfEmail') == 'on' ) {
if ( getParam('autoApproval_ifJoin') == 'on' ) {
$sStatusText = 'Active';
$this -> sendActivationMail( $iNewID );
} else {
$sStatusText = 'Approval';
$this -> sendApprovalMail( $iNewID );
}
} else {
if( $this -> sendConfMail( $iNewID ) )
$sStatusText = 'Unconfirmed';
else
$sStatusText = 'NotSent';
}
if( $sStatusText = 'Rejected' )  {
$this -> sendRejectMail( $iNewID );
}

} else
$sStatusText = 'OK';

====

But it still doesn't send out the email for rejected profiles.

I'm surprised nobody brought that problem before, as the function doesn't exist but the rejection email is present in the "Email Templates"... or it's calling another function sowhere else I ignore.

QuoteAug 24, 2009 07:130 likesLike
 

Ok... I realized "Rejected" and "active" status email aren't sent but "email address confirmation" is, as well as cupid emails.

Some help is welcome...

QuoteAug 24, 2009 14:020 likesLike
 

Resolved.

Activation email is sent ONLY if the account is activated from the Admin Panel (admin/profiles.php), not from the "Admin edit profile page" (pedit.php) even if you can change status there.

But regarding the Reject email, I had to add the function as described above and create a "Reject" button in the Admin Panel, next to the "Activate" one.

In admin/profiles.php:

Following this code:

====

case 'Activate':
$iProfileID = (int)$val;
if ($iProfileID) {
db_res( "UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = '{$iProfileID}'" );
createUserDataFile($iProfileID);
reparseObjTags( 'profile', $iProfileID );

$iPossibleCoupleID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `Couple` = '{$iProfileID}'" );
if ($iPossibleCoupleID) {
db_res( "UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = '{$iPossibleCoupleID}'" );
createUserDataFile($iPossibleCoupleID);
reparseObjTags( 'profile', $iPossibleCoupleID );
}
}
$oPC -> sendActivationMail( (int)$val );
break;

====

add:

====

case 'Rejected':
$iProfileID = (int)$val;
if ($iProfileID) {
db_res( "UPDATE `Profiles` SET `Status` = 'Rejected' WHERE `ID` = '{$iProfileID}'" );
createUserDataFile($iProfileID);
reparseObjTags( 'profile', $iProfileID );

$iPossibleCoupleID = (int)db_value( "SELECT `ID` FROM `Profiles` WHERE `Couple` = '{$iProfileID}'" );
if ($iPossibleCoupleID) {
db_res( "UPDATE `Profiles` SET `Status` = 'Rejected' WHERE `ID` = '{$iPossibleCoupleID}'" );
createUserDataFile($iPossibleCoupleID);
reparseObjTags( 'profile', $iPossibleCoupleID );
}
}
$oPC -> sendRejectMail( (int)$val );
break;

====

and add with the other buttons code ~line 550:

====

<td width="90" align="center"><input class=text type=submit name="prf_form_submit" value="Rejected" /></td>

====

Now profile rejected from the Admin Panel will receive the "Reject" email from the email templates.

QuoteJan 15, 2011 07:350 likesLike
 

Nadja!

I must admit that your determination to solve this problem is plausible!

The peculiar silence from the community is scary and shameful.

I am trying to deal with the very same problem in D7.0.4...

Hopefully will get there some day.

All the best!

Eugene

QuoteFeb 18, 2011 19:370 likesLike
 

... same prob, too. Can't believe there is a template but no function!?

QuoteFeb 21, 2011 20:250 likesLike
 

 

Nadja!

I must admit that your determination to solve this problem is plausible!

The peculiar silence from the community is scary and shameful.

I am trying to deal with the very same problem in D7.0.4...

Hopefully will get there some day.

All the best!

Eugene

 I love how you come in here, offer nothing contributory except to bust on the community for not having the answer for him and post that we all should of jumped up and down to fix this problem.  As far as a solution to the problem, he gave it to you right above, just take a moment to look.  The community is here to help with the things that we know the answer to and if we have a moment to develop something we don't know the answer to then we can.  In this case Nadja's dedication to resolving this issue is highly admirable, your dedication to ripping on the community while providing no solutions to problems is also highly commendable in it's own right.

QuoteJan 18, 2012 15:090 likesLike
 

hi,  

It might be better if it's a default 'no' option to send an email to a Rejected member.  Currently I'm using "Rejected" profiles for people who signed up but have no good reason to do so (e.g. they live half way around the world from my local community website).  In this case I prefer to not send them anything... just keep their email's associated signup as Rejected.  Of course I do other things to block such people but some find a way to my site despite such attempts.  

Thank you