How to create a contact form that works

Hello friends.

I am in need of help, to set up the contact form. Could someone help me or show me the way, everything is ready but I am not sending messages, I use version 5.92 - WordPress Personal, I couldn’t understand how to make the connection.

Thanks to anyone who can help.

Html

 Envie sua mensagem

Nome
E-mail
Assunto
Menssagem

Enviar

...................................................................................................................................

PHP

 Envie sua mensagem

Nome
E-mail
Assunto
Menssagem

Enviar

..................................................................................... Other PHP <?php /** * Requires the PHP Mail Form library * The PHP Mail Form library is available only in the pro version of the template * The library should be uploaded to: lib/php-mail-form/php-mail-form.php * For more info and help: https://templatemag.com/php-mail-form/ */ if( file_exists($php_mail_form_library = '../lib/php-mail-form/php-mail-form.php' )) { include( $php_mail_form_library ); } else { die( 'Unable to load the PHP Mail Form Library!'); } $contactform = new PHP_Mail_Form; $contactform->ajax = true; // Replace with your real receiving email address $contactform->to = 'contato@nevadaecopecas.com.br'; $contactform->from_name = $_POST['name']; $contactform->from_email = $_POST['email']; $contactform->subject = $_POST['subject']; $contactform->add_message( $_POST['name'], 'From'); $contactform->add_message( $_POST['email'], 'Email'); $contactform->add_message( $_POST['message'], 'Message', 10); echo $contactform->send(); ?>

Thank you.

Not what your asking for but it’s been a month i am using this script module and i find it very stable and very very Customizable and flexible.
They also have a plugin for wp.

1 Like

Are you still looking for guidance on this? The only library that’s widely used by other peers my professional circle is PHPMailer, you can view that here:

Considering that you’re using what looks like a different library, I assume that you’re wanting to code this out? If so, once you have the form configured and running, you should highly consider form validation, also.

Additionally, I would not recommend anything from CodeCanyon unless you can help it, as not only are they a pain to deal with, but the development standards have slipped over the years. Another two options before I would even think of going down that road are: Contact Form 7 and Gravity Forms.

1 Like