Solved

WordPress crontrol plugin

Posted on 2016-08-06
1
43 Views
Last Modified: 2016-08-09
I'm trying to use this plugin to test an email process I want to run every week.

See attached. I created this, I clicked "Add php Cron Event". It showed in the list.

I did not get an email. I clicked "edit" in the Cron Events list, the code is gone.

I have two other php cron events that run as scheduled.

I'm guessing it can't find php mailer because that class is at the site root. But why does it just disappear?

What am I doing wrong?
crontrol2.jpg
0
Comment
Question by:Richard Korts
1 Comment
 
LVL 12

Accepted Solution

by:
William Nettmann earned 500 total points
ID: 41745960
I assume you know it isn't finding the PHPMailer class because you have perused your PHP error log file.

That is probably because you haven't included the phpmailer.php or whatever file contains the PHPMailer class.

WordPress uses PHPMailer in it's "wp_mail()" class, so there is no good reason normally to  use PHPMailer directly, anyway.

To send HTML mail with wp_mail(), add a filter before using it like so:
add_filter('wp_mail_content_type', function( $content_type ) {
                return 'text/html';
    });
wp_mail('whoever@whatever.com', 'Subject', 'Message');

Open in new window

You are also using an SMTP server instead of the default localhost sendmail, which is seldom required but may be necesary in your case. If so, there is a WordPress plugin that will redirect wp_mail() to use SMTP as well.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WordPress has made it easy to create scalable sites based on their powerful CMS, but as great as WordPress is, there are some SEO issues that haven’t been addressed out of the box.  Fortunately these problems can be solved with a few plugins.  The f…
WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question