you should remove:
require('http://solutionsagencia.com.br/comparasaude/wp-load.php');
and use:
require(ABSPATH.'wp-includes/pluggable.php');
p.s. I advice you, these executions should be hooked in ‘init’, like:
add_action('init', function(){
$para = "[email protected]";
$assunto = "Assunto" . $nome;
$conteudo =
"<b>Nome:</b> {$nome}" .
"<b>Email:</b> {$email}" .
$headers = array(
'Reply-To' => $name . '<' . $email . '>',
);
$status = wp_mail( $para, $assunto, $conteudo );
remove_filter( 'wp_mail_content_type', 'set_html_content_type' );
if ( $status ){
echo "sucesso";
} else {
}
});
Related Posts:
- What is the advantage of using wp_mail?
- wp_mail is undefined
- Fatal error: Call to undefined function wp_mail()
- wp_mail not recognizing cc and bcc headers
- Problem with `wp_mail()`
- Do I have to override the wp_mail() pluggable function with writing a plugin?
- How to send email in wordpress with more than one attachments
- wp_mail() headers multipart/alternative
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- How to get post meta in functions?
- Using wp_mail to send email?
- Allow user to add the php code in wp_mail()
- wp_mail links are dead
- wp_mail_from not changing from address
- dbDelta not creating tables
- How to fork a plugin?
- Where to store PHP files created by plugin / themes
- How to implement color picker from wordpress in my plugin?
- Nonces can be reused multiple times? Bug / Security issue?
- WordPress 4.5 deprecated get_currentuserinfo()
- Single Responsibility Principle and WP Classes
- How to control output of custom post type without modifying theme?
- Admin config screen without menu
- How to auto-upgrade my plugin?
- How to Add a .js file Only in one specific Page Dynamically to Head
- What is the added “complexity” of custom tables?
- Displaying search results in the widget itself?
- Missing “category_children” option when dynamically creating categories via a plugin
- How to exclude content (and other returned values) from WP_query()?
- Looking for callback function after Gutenberg is rendered?
- WordPress select dropdown list in widget
- How to duplicate a curl XML request using HTTP API?
- Unable to get content from $post on first publish
- Broken markup when using the_excerpt() in a widget?
- Gutenberg Block add element in the Editor inside InnerBlocks after div – editor-block-list
- Widget Admin – Form Submit Event?
- How to add pages to custom menus on the fly [duplicate]
- How can I add a CSS rule to edit.php?
- How do you render_callback for register_block_type to a method in another class?
- Get the password key when using the wp_new_user_notification_email filter
- WordPress API have Plugin Anti-piracy feature?
- WordPress security issue to output data from user input from theme option form
- How to add settings subpage from a plugin to a settings page created in theme?
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- how query string in wordpress receive the value other than post and page [duplicate]
- Is there no admin ui guide for 4.x?
- Is there an event or an other method that tells me the preview is loaded?
- Admin Plugin POST to another file within the plugin
- Do I have to worry about useState causing a re-render?
- user_register not triggering with email verification
- Widget Dropdown doesn’t working
- Why is the WordPress taxonomy not registering?
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Display list of uploaded images, filtered by user under a specific user group
- Checking for existence of a page by title?
- wp_get_post_terms Order by not working
- Naming conventions when using (PHP5) namespaces?
- Readme.txt seems to be cached but not the version
- change add to cart button link [closed]
- How do I change the image from the default mysteryman in the WP Profile page
- Encoding Method for URLs?
- Store custom meta box data as serialized array
- Using Product variations as product addons
- Change author permalink to external URL
- AJAX request not routing through proxy
- Custom Settings Plugin Save foreach checkboxes
- Why won’t this submenu page show? – My First WordPress Plugin
- wordpress full site editing problem when extending core blocks
- How to check if `comment_meta` exists before inserting the comment?
- Showing results from json-string in WordPress search results page
- Multiple dynamic Tax Query – pass taxonomy argument from array
- Add default custom taxonomy to plugin activation
- ACF Field value in wordpress login message filter
- ajax stopped working when not logged in wordpress
- How to revive (or take over) a plugin?
- Make visible page only in the trash
- Overriding the template files using a plugin for all themes
- Woocommerce product not appearing in category list page when created programatically [closed]
- add_meta_box does not display meta box in Admin
- implementing socket.io with wordpress
- Determine if the current page, is being edited
- List Table action argument not cleared
- What is the “best” way to update a theme via a plugin?
- Fullwidth slider using background image Flexslider WordPress
- Return value of $wpdb->update() query in plugin is wrong
- Acessing WP functions in form submission handler
- Plugin files not updated (cache cleared)
- How to limit the number of posts a user can view based on status
- WordPress permalink setting
- Error when trying to save custom post type settings (ERROR: options page not found)
- Developing a plugin, ran it through P3 Profiler, shows up slow, but I don’t know why
- Dynamic banner for use on external sites
- WordPress plugin tables become corrupt
- How to call a new php page inside a plugin page?
- How can i call from custom fields to the category editor?
- Practical Solutions to HTML5 Video on WordPress
- An adiitional function fires on my AJAX submit
- If I want to create new taxonomies (e.g. Project / Documents / Etc…) is it better to create them in the theme’s functions.php or within a plugin? [duplicate]
- How to add something after a function
- Is the only way to add taxonomy terms via an admin panel?