How can I disable the e-mail verification before subscribing?
I have set $config to false but it still requires verification:
plugins/mld-newsletter.php
-- Edit --
Since that function to disable the verification wasn't working I've adapted the script to work without it, here's what you need to do, in case someone looks for it in the future:
plugins/mld-newsletter.php
Line 944, replace this
With this:
I have set $config to false but it still requires verification:
plugins/mld-newsletter.php
PHP Code:
/**
* Subscribe email addresses
*
* @param string $name
* @param string $email
* @param boolean $confirm whether the subscribtion needs confirmation or not.
* @return array with message
*/
function subscribe($name, $email, $confirm = false) {
-- Edit --
Since that function to disable the verification wasn't working I've adapted the script to work without it, here's what you need to do, in case someone looks for it in the future:
plugins/mld-newsletter.php
Line 944, replace this
PHP Code:
$newentry = $xml->addChild('entry');
$temp = $newentry->addChild('name');
$temp->addCData($name);
$temp = $newentry->addChild('email');
$temp->addCData($email);
$temp = $newentry->addChild('status', $confirmcode);
XMLsave($xml, $mld->files['subscribers']);
if ($confirm == true) {
//send confirm email again
$msg = sendConfirmEmail($newentry->name, $newentry->email, $newentry->status, false);
} else {
$msg = array('updated', i18n_r('mld-newsletter/SUBSCRIBESUCCES'));
}
PHP Code:
$newentry = $xml->addChild('entry');
$temp = $newentry->addChild('name', $_POST['subscriber']['name']);
$temp = $newentry->addChild('email', $_POST['subscriber']['email']);
$temp = $newentry->addChild('status', 'true');
XMLsave($xml, $mld->files['subscribers']);
if ($confirm == true) {
//send confirm email again
$msg = array('updated', i18n_r('mld-newsletter/SUBSCRIBESUCCES'));
//$msg = sendConfirmEmail($newentry->name, $newentry->email, $newentry->status, false);
} else {
$msg = array('updated', i18n_r('mld-newsletter/SUBSCRIBESUCCES'));
}