Support » Plugin: Newsletter Subscription Form - User Subscriptions Form, Capture Email » Problem with the subscriver validation

  • Hi,
    after click on the link in the confirmation mail, subscriber has this error on the website :
    Warning: require_once(wnlsp-options/themes/form-include/confirmation-mail-from.php): failed to open stream: No such file or directory in /home/xxxxxxx/www/wp-content/plugins/newsletter-subscription-form/newsletter-subscription-form.php on line 95

    Fatal error: require_once(): Failed opening required ‘wnlsp-options/themes/form-include/confirmation-mail-from.php’ (include_path=’.:/usr/local/php5.6/lib/php’) in /home/xxxxxxx/www/wp-content/plugins/newsletter-subscription-form/newsletter-subscription-form.php on line 95

    I search the folder /wnlsp-options in the plugin’s folder, but it isn’t. So i don’t know why, and what i can do?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Weblizar

    (@weblizar_support)

    hiii clageyre,

    Please edit the file “newsletter-subscription-form.php” in the plugin folder.
    go to the line no 95 or search this line
    require_once('wnlsp-options/themes/form-include/confirmation-mail-from.php');

    in this line please remove the “wnlsp-“.

    Now create a file with name “confirmation-mail-from.php”. Now with the following code create a file with name “confirmation-mail-from.php” in this folder form-include(its path “options/themes/form-include”).

    <?php // add new user subscription via wp mail setting ON
    global $wpdb;
    	$table_name = $table_name = $wpdb->prefix . "nls_subscribers";	
    	$email_check =$wpdb->get_results( "SELECT * FROM $table_name WHERE id !=0" );	
    	if($email_check){		
    		foreach($email_check as $all_emails){
    			$all_email = $all_emails->email;
    			if($all_email == $email){
    				$subscriber_email = $email;
    				$deact_code = $all_emails->deact_code;	
    				$wl_wnlsp_options = get_option('weblizar_wnlsp_options');
    				$adminemail = $wl_wnlsp_options['wp_mail_email_id'];						 
    				$adminName = $wl_wnlsp_options['unsubscribe_from_text']; 								
    				$unsubscribe_link_text = $wl_wnlsp_options['unsubscribe_link_text'];				
    				$headers[] = 'Content-type: text/html'."\r\n".'X-Mailer: PHP/' . phpversion();		
    				$headers[] = "From:$adminName <$adminemail>";	
    				$headers[] = "'Reply-To: '.$adminemail";
    				if(!empty($wl_wnlsp_options['unsubscribe_mail_form_cc_emailid'])){
    					$cc_emailid =  $wl_wnlsp_options['unsubscribe_mail_form_cc_emailid'];
    					$headers[] = "Cc:$cc_emailid";		
    				}if(!empty($wl_wnlsp_options['unsubscribe_mail_form_bcc_emailid'])){
    					$bcc_emailid =  $wl_wnlsp_options['unsubscribe_mail_form_bcc_emailid'];
    					$headers[] = "Bcc:$bcc_emailid";
    				}			
    				$subject = $wl_wnlsp_options['unsubscribe_mail_subject'];
    				$plugin_url = get_permalink();
    				$unsubscribe_link = $plugin_url.'?deact_code='.$deact_code.'&'.'email='.$subscriber_email;
    				$custom_message = $wl_wnlsp_options['unsubscribe_mail_message'];
    				if($wl_wnlsp_options['subscriber_form']=='on') {
    					$f_name = $all_emails->f_name;
    					$l_name = $all_emails->l_name;
    					if ((strpos($custom_message, '{f_name}') !== false)||(strpos($custom_message, '{l_name}') !== false)){	
    							$messagebody_f = str_replace('{f_name}',$f_name,$custom_message);
    							$messagebody_l = str_replace('{l_name}',$l_name,$messagebody_f);					
    						}else{
    							$messagebody_l = 'Hello '.$f_name.' '.$l_name.'</br></br>'.$custom_message;
    						}
    				}else{
    						$messagebody_l = $custom_message;
    					}
    				if (strpos($messagebody_l, '{unsubscribe}') !== false)
    					{
    						$message = str_replace('{unsubscribe}',$unsubscribe_link,$messagebody_l);
    					}
    					else{				
    							$message = $messagebody_l.'<div style="text-align:center;margin-bottom:20px;"><a style="padding:10px 20px; background:#2bc8e2; color:#fff; text-decoration: none; width: 200px; font-size: 20px;" href="'.$plugin_url.'?deact_code='.$deact_code.'&'.'email='.$subscriber_email.'">'.$unsubscribe_link_text.'</a></div>';	
    					}				
    				$wp_mails= wp_mail( $subscriber_email, $subject, $message, $headers);
    				if($wp_mails){
    					
    				}
    			}
    		}							
    	}	
    ?>

    This will solve the problem.

    Thank you.

    Hi, thanks for the answer.

    I tried, it’s better, but i have an error :

    Fatal error: Uncaught exception ‘phpmailerException’ with message ‘Invalid address: (setFrom) ‘ in /home/qualixel/www/wp-includes/class-phpmailer.php:1023 Stack trace: #0 /home/qualixel/www/wp-includes/pluggable.php(352): PHPMailer->setFrom(”, ‘WordPress’, false) #1 /home/qualixel/www/wp-content/plugins/newsletter-subscription-form/options/themes/form-include/confirmation-mail-from.php(48): wp_mail(‘cedric@cl-multi…’, NULL, ‘<div style=”tex…’, Array) #2 /home/qualixel/www/wp-content/plugins/newsletter-subscription-form/newsletter-subscription-form.php(95): require_once(‘/home/qualixel/…’) #3 [internal function]: nls_maintenance_mode_template_redirect(”) #4 /home/qualixel/www/wp-includes/class-wp-hook.php(298): call_user_func_array(‘nls_maintenance…’, Array) #5 /home/qualixel/www/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array) #6 /home/qualixel/www/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 /home/qualixel/www/wp-includes/template-loader.php(12): do_action(‘template_redire…’ in /home/qualixel/www/wp-includes/class-phpmailer.php on line 1023

    I don’t know what is the problem. Have you any idea?

    Plugin Author weblizar

    (@weblizar)

    We released the new version with some bug fix. Is that working good?

    I upload the new version, but I have already the error :

    Fatal error: Uncaught exception ‘phpmailerException’ with message ‘Invalid address: (setFrom) ‘ in /home/qualixel/www/wp-includes/class-phpmailer.php:1023 Stack trace: #0 /home/qualixel/www/wp-includes/pluggable.php(352): PHPMailer->setFrom(”, ‘WordPress’, false) #1 /home/qualixel/www/wp-content/plugins/newsletter-subscription-form/options/themes/form-include/confirmation-mail-from.php(48): wp_mail(‘cedric@cl-multi…’, NULL, ‘<div style=”tex…’, Array) #2 /home/qualixel/www/wp-content/plugins/newsletter-subscription-form/newsletter-subscription-form.php(96): require_once(‘/home/qualixel/…’) #3 [internal function]: nls_maintenance_mode_template_redirect(”) #4 /home/qualixel/www/wp-includes/class-wp-hook.php(298): call_user_func_array(‘nls_maintenance…’, Array) #5 /home/qualixel/www/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array) #6 /home/qualixel/www/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 /home/qualixel/www/wp-includes/template-loader.php(12): do_action(‘template_redire…’ in /home/qualixel/www/wp-includes/class-phpmailer.php on line 1023

    I don’t understand the error

    Plugin Support Weblizar

    (@weblizar_support)

    hiii clageyre,

    sir please contact us at contact.

    Thank You.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with the subscriver validation’ is closed to new replies.