Quantcast
Channel: Topic Tag: contact-form | WordPress.org
Viewing all articles
Browse latest Browse all 5995

Jeff Rose on "[Theme: EvoLve] Contact form always says "Sent" - even when not"

$
0
0

There's a bug in the contact form. When you send it always returns TRUE for the email send even when it's not sent.

$mail = wp_mail($emailTo, $subject, $body, $headers);
        $emailSent = true;
    }

    if ($emailSent == true) {

$mail is set to the result of wp_mail which may be false, but the internal variable $emailSent is always true. $emailSent should be set to the value of $mail, probably.

There is also no error handling in place for a failed send.


Viewing all articles
Browse latest Browse all 5995

Trending Articles