#30 Add email function for verify email
This commit is contained in:
parent
418338c509
commit
81fb037335
@ -46,6 +46,25 @@ if ($hesk_settings['smtp'])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hesk_notifyCustomerForVerifyEmail($email_template = 'verify_email', $activationKey)
|
||||||
|
{
|
||||||
|
global $hesk_settings, $ticket;
|
||||||
|
|
||||||
|
if (defined('HESK_DEMO'))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Format email subject and message
|
||||||
|
$subject = hesk_getEmailSubject($email_template);
|
||||||
|
$message = hesk_getEmailMessage($email_template, null, 0, 0, 0);
|
||||||
|
$activationUrl = $hesk_settings['hesk_url'] . '/verifyemail.php?key=%%ACTIVATIONKEY%%';
|
||||||
|
$message = str_replace('%%VERIFYURL%%', $activationUrl, $message);
|
||||||
|
$message = str_replace('%%ACTIVATIONKEY%%', $activationKey, $message);
|
||||||
|
|
||||||
|
hesk_mail($ticket['email'], $subject, $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function hesk_notifyCustomer($email_template = 'new_ticket')
|
function hesk_notifyCustomer($email_template = 'new_ticket')
|
||||||
{
|
{
|
||||||
|
|||||||
10
language/en/emails/verify_email.txt
Normal file
10
language/en/emails/verify_email.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Dear %%NAME%%,
|
||||||
|
|
||||||
|
Your email needs to be verified before your ticket can be submitted. Please click the link below to verify your email.
|
||||||
|
|
||||||
|
%%VERIFYURL%%
|
||||||
|
|
||||||
|
Sincerely,
|
||||||
|
|
||||||
|
%%SITE_TITLE%%
|
||||||
|
%%SITE_URL%%
|
||||||
@ -377,8 +377,8 @@ if ($verifiedEmailRS->num_rows == 0)
|
|||||||
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email`, `ActivationKey`)
|
hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."pending_verification_emails` (`Email`, `ActivationKey`)
|
||||||
VALUES ('".$escapedEmail."', '".$escapedKey."')");
|
VALUES ('".$escapedEmail."', '".$escapedKey."')");
|
||||||
|
|
||||||
/* TODO Send email to customer asking to verify email address. A link with the activation key will be in the email
|
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||||
for them to visit to activate. */
|
hesk_notifyCustomer('verify_email');
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
//-- email has been verified, and a ticket can be created
|
//-- email has been verified, and a ticket can be created
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user