Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter sergeyrus72

    (@sergeyrus72)

    Thanks! The issue is resolved by disabling the “Protect internal forms” option.

    Thread Starter sergeyrus72

    (@sergeyrus72)

    Thanks for the answer! Yes, spam is received periodically. In this niche of services, it is not profitable to ask for mail, the main source of data is phone numbers! As you said, we are watching the work..

    The plugin is not used, at least there are no reverse form plugins installed in the admin panel. The form is homemade in PHP above is the code of the file where this form is configured

    Thread Starter sergeyrus72

    (@sergeyrus72)

    <?php
    require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
    
    $method = $_SERVER['REQUEST_METHOD'];
    
    //Script Foreach
    $c = true;
    if ( $method === 'POST' ) {
    
    	$project_name = "eurodesign72.ru";
    	$admin_email  = "*****@eurodesign72.ru";
    	$form_subject = "Заказ с сайта";
    
    	foreach ( $_POST as $key => $value ) {
    		if ( $value != "" && $key != "form_subject" ) {
    			if($key == 'auto_app_agree') continue;
    			switch($key){
    				case 'name':
    					$n = 'Имя';
    					break;
    				case 'tel':
    					$n = 'Телефон';
    					break;
    				case 'email':
    					$n = 'E-mail';
    					break;
    				case 'town':
    					$n = 'Город';
    					break;
    				case 'address':
    					$n = 'Адрес';
    					break;
    				case 'room':
    					$n = 'Кол-во комнат';
    					break;
    				case 'window':
    					$n = 'Кол-во окон';
    					break;
    				default :
    					$n = 'Поле';
    					break;
    				}
    			$message .= "
    			" . ( ($c = !$c) ? '<tr>':'<tr style="background-color: #f8f8f8;">' ) . "
    				<td style='padding: 10px; border: #e9e9e9 1px solid;'><b>$n</b></td>
    				<td style='padding: 10px; border: #e9e9e9 1px solid;'>$value</td>
    			</tr>
    			";
    		}
    	}
    }
    
    $message = "<table style='width: 100%;'>$message</table>";
    $last = 'yoursite';
    $tema = '=?utf-8?B?'.base64_encode($last).'?=';
    
    mail($admin_email, $form_subject, $message, "From: $tema" . "\r\n" . "Reply-To: $admin_email" . "\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\n" . "Content-type: text/html; charset=\"utf-8\"");
Viewing 3 replies - 1 through 3 (of 3 total)