WordPress wp_mail function crashing website
WordPress wp_mail function crashing website
WordPress wp_mail function crashing website
WordPress doesn’t work properly with non standard domain names – PHPMailer fails when initialising
phpmailer reply to message id using AddCustomHeader
wp_mail from Codex Use this example: add_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); wp_mail( $mails_to, ‘The subject’, ‘<p>The <em>HTML</em> message</p>’ ); // Reset content-type to avoid conflicts — http://core.trac.wordpress.org/ticket/23578 remove_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); function set_html_content_type() { return ‘text/html’; }
I suggest you first of all to separate code from markup, especially dividing your executing file like the function support_form(). Next, please try to send email without form with hard coded message. It is possible you have mis-configuration on your server if you developing on local machine. And finally, you should fill action attribute for … Read more
The way you’re applying the headers is incorrect. You set a “from” address in the headers as a string, and then you immediately overwrite that with an array (so the “from” address is lost). (You’re also setting the $from address twice) Try it this way: function send_email(){ $to = $email; $subject = “Lamza Activation”; $activationEmail=””; … Read more
Here’s an (untested) PHPMailer example to check for e.g. the subject and the content type: function mailer_config( PHPMailer $mailer ) { if( ‘Subject #1’ === $mailer->Subject && ‘text/html’ !== $mailer->ContentType ) { $mailer->IsHTML( true ); } } other options would be to e.g. check the $mailer->From or $mailer->FromName, or some other conditions, depending on your … Read more
I just checked your site. There is a javascript error when you submit the form. It looks like the issue is caused by the plugin wp-super-heatmap. Disable that and try it again! If that is not it, start disabling one plugin at a time. I am certain that another plugin causes this issue, and I … Read more
After fiddling around for hours, I found the problem. It was the form not the PHP. <div class=”col-sm-6″> <input class=”form-control” type=”text” placeholder=”ENTER DOG’S NAME” id=”dname” /></div> <div class=”col-sm-6″> <input class=”form-control” type=”text” placeholder=”ENTER OWNER’S NAME” id=”name” /></div> id attribute needs to be name. Corrected <div class=”col-sm-6″> <input class=”form-control” type=”text” placeholder=”ENTER DOG’S NAME” name=”dname” /></div> <div class=”col-sm-6″> … Read more
This question is quite outdated, so I’m pretty sure no one is looking at it. However, should anyone end up here, this question isn’t really a WordPress question. Your problem is that on a locally hosted system, you actually have to configure your stack to be able to send email. And if you look in … Read more