fix notification in case of error sending email.
);
logger("header " . 'To: ' . $params['toEmail'] . "\n" . $messageHeader, LOGGER_DEBUG);
logger("return value " . (($res)?"true":"false"), LOGGER_DEBUG);
+ return $res;
}
}
?>
// use the Emailer class to send the message
- Emailer::send(array(
+ return Emailer::send(array(
'fromName' => $sender_name,
'fromEmail' => $sender_email,
'replyTo' => $sender_email,
'textVersion' => $email_text_body,
'additionalMailHeader' => $datarray['headers'],
));
- return True;
}
return False;
The login details are as follows:
Site Location: %3$s
Login Name: %1$s
- Password: %5$
+ Password: %5$s
You may change your password from your account "Settings" page after logging
in.
$preamble = sprintf($preamble, $username, $sitename);
$body = sprintf($body, $email, $sitename, $siteurl, $username, $password);
- notification(array(
+ return notification(array(
'type' => "SYSTEM_EMAIL",
'to_email' => $email,
'subject'=> sprintf( t('Registration details for %s'), $sitename),
set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
}
- send_register_open_eml(
+ $res = send_register_open_eml(
$user['email'],
$a->config['sitename'],
$a->get_baseurl(),
$user['username'],
$result['password']);
-
if($res) {
info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
goaway(z_root());
}
else {
- notice( t('Failed to send email message. Here is the message that failed.') . $email_tpl . EOL );
+ notice(
+ sprintf(
+ t('Failed to send email message. Here your accout details:<br> login: %s<br> password: %s<br><br>You can change your password after login.'),
+ $user['email'],
+ $result['password']
+ ). EOL
+ );
}
}
elseif($a->config['register_policy'] == REGISTER_APPROVE) {