Mail not working
-
Problem
mail is not working
Cause
multiple, ‘From: ‘ header is incorrectly formatted and non-standard php environments have issues with the mail function. Mailing in these environments can often be solved by using a plugin like ‘WP Mail SMTP’ (https://ww.wp.xz.cn/plugins/wp-mail-smtp/) but this requires the use of the wordpress wp_mail function by the plugin.
Solution
Edit ‘ai-responsive-contact-form.php’.
-
lines 459, 461 and 464:
replace the ‘mail(….’ function calls with ‘wp_mail(…’ -
line 378, change
$ai_headers .= "From:".get_bloginfo('name')." ".$ai_emailadmin."\n";to
$ai_headers .= "From:".get_bloginfo('name')." <".$ai_emailadmin.">\n"; -
line 449, change
$ai_admin_headers .= "From: ".str_replace(' ', '-', $ai_name)." ".$ai_email."\n";to
$ai_admin_headers .= "From: ".$ai_name." <".$ai_email.">\n";
-
lines 459, 461 and 464:
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Mail not working’ is closed to new replies.