i already added in helpers/user.php additional row for this:
change 1155
if ( (int) $user_data[‘details’][‘status’] <= 1) {
added from row 1167:
$config = WYSIJA::get(‘config’, ‘model’);
$mailer = WYSIJA::get(‘mailer’, ‘helper’);
// Load subscription notification mail, and if it doesn’t exists create a new one
$mEmail = WYSIJA::get(’email’, ‘model’);
$mEmail->getFormat = OBJECT;
$emailConfirmationData = $mEmail->getOne(false, array(’email_id’ => $config->getValue(‘subscribe_confirmed_email_id’)));
if (empty($emailConfirmationData)) {
$mbody = ‘…your mail text…’;
// somehow the notification email has been lost so we need to create a new one
$dataEmailCon = array(‘from_name’ => $config->getValue(‘from_name’), ‘from_email’ => $config->getValue(‘from_email’),
‘replyto_name’ => $config->getValue(‘replyto_name’), ‘replyto_email’ => $config->getValue(‘replyto_email’),
‘subject’ => ‘Your subscription was approved’, ‘body’ => $mbody /* $config->getValue(‘subscribe_confirmed_email_body’) */ , ‘type’ => ‘0’, ‘status’ => ’99’);
$confemailid = $mEmail->insert($dataEmailCon);
if ($confemailid)
$config->save(array(‘subscribe_confirmed_email_id’ => $confemailid));
$mEmail->reset();
}
// Send mail
$mEmail = WYSIJA::get(’email’, ‘model’);
$mEmail->getFormat = OBJECT;
$emailConfirmationData = $mEmail->getOne(false, array(’email_id’ => $config->getValue(‘subscribe_confirmed_email_id’)));
// Replace [blog_unsubscribe_link]
$blog_unsubscribe_link = “https://” . strtolower($_SERVER[‘SERVER_NAME’]) . ‘/unsubscribe/?wysija-page=1&controller=confirm&wysija-key=’ . $user_data[‘details’][‘keyuser’] . ‘&action=unsubscribe&page=unsubscribe’;
$emailConfirmationData->body = str_replace(“[blog_unsubscribe_link]”, $blog_unsubscribe_link, $emailConfirmationData->body);
$resultsend = $mailer->sendOne($emailConfirmationData, $user_data[‘details’][‘user_id’], true);