i wrote a simple Plugin for sending mails over the cronjob.
WP_CRON is disabled and outsourced to crontabs on the server, for example:
* * * * * /usr/bin/php5 -f /homepages/23/d471228603/htdocs/wp-cron.php >> /homepages/23/d471228603/htdocs/cron.log
Here is the source: http://pastebin.com/tA4JgEBC
For testing, i use the direct-link to wp-cron on my Browser (for example: http://domain.com/wp-cron.php)
When i use the wp_mail function first time, i become an PHP Error:
Fatal error: Cannot redeclare class phpmailerException in /homepages/23/d471228603/htdocs/wp-includes/class-phpmailer.php on line 2825
After reloading the page will be blank/white. The printing of display_name and email of the users will be not printed.
Can anyone tell me why this does not work?
I would like to use WordPress-own functions and needs wp_mail here.
- The topic ‘wp-cron.php – wp_mail not working’ is closed to new replies.