Not able to send links in email after setting header

Nothing is wrong with the code. I just added message body in stripslashes() add_action(‘wp_ajax_mail_link_popup’,’mail_link_popup’); function mail_link_popup() { $headers=”Content-type: text/html;charset=utf-8″; wp_mail($_REQUEST[‘to_email’],$_REQUEST[‘subject’],stripslashes($_REQUEST[‘message_test’]),$headers); } And it’s working now

How to make a stand-alone button to the post edit view

First of all you need prevent whole post form sending. Try: function rt_custom_button(){ $html=”<div id=”major-publishing-actions” style=”overflow:hidden”>”; $html .= ‘<div id=”publishing-action”>’; $html .= ‘<button onclick=”send_note(event);” accesskey=”p” tabindex=”5″ class=”button-primary” id=”custom” name=””>send media note</button>’; $html .= ‘</div>’; $html .= ‘</div>’; echo $html; } add_action( ‘post_submitbox_misc_actions’, ‘rt_custom_button’ ); Then you need to add JS function somewhere: function send_note(event){ event.preventDefault(); … Read more

How to retrieve the sender email with wp_mail()?

I’ve learned an expensive (time) lesson. The next time I’ll want to set a contact form, I’ll first check the host servers specific configuration regarding Email settings ! Thanks to Steve North, I understood that my host doesn’t allow direct custom $headers for security reason… But, I think that, every decent host has solutions for … Read more

contact form ajax empty response error message

jQuery AJAX will trigger an error event not only when it receives an HTTP status code indicating a problem with the request, but also if jQuery fails to parse the response body. Since you’re using die() without sending any response body, it’s likely that jQuery is choking on the “empty” response. Using wp_send_json_success() instead of … Read more

WordPress unable to send mail

I never did get this to work, as a work around I had to configure the WP-SMTPMail to send directly to our Office365 instance, which required an additional user to be configured.

Email Attachment from Form Submit

Alright so I feel rather stupid now, especially because I have found the solution to my own problem right after posting my question here, but also because I would have found it much earlier had I properly debugged my page (implemented a way to look at return error codes). Anyways… As stated in my EDIT … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)