~katiekitty/+junk/wordpress-byet

« back to all changes in this revision

Viewing changes to wp-mail.php

  • Committer: kserver
  • Date: 2010-05-15 01:16:36 UTC
  • Revision ID: kserver@kserver-desktop-20100515011636-mnr1j7t637suptdq
Wordpress 2.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
/** Make sure that the WordPress bootstrap has run before continuing. */
11
11
require(dirname(__FILE__) . '/wp-load.php');
12
12
 
 
13
/** Allow a plugin to do a complete takeover of Post by Email **/
 
14
do_action('wp-mail.php');
 
15
 
13
16
/** Get the POP3 class with which to access the mailbox. */
14
17
require_once( ABSPATH . WPINC . '/class-pop3.php' );
15
18
 
 
19
/** Only check at this interval for new messages. */
 
20
if ( !defined('WP_MAIL_INTERVAL') )
 
21
        define('WP_MAIL_INTERVAL', 300); // 5 minutes
 
22
 
 
23
$last_checked = get_transient('mailserver_last_checked');
 
24
 
 
25
if ( $last_checked )
 
26
        wp_die(__('Slow down cowboy, no need to check for new mails so often!'));
 
27
 
 
28
set_transient('mailserver_last_checked', true, WP_MAIL_INTERVAL);
 
29
 
16
30
$time_difference = get_option('gmt_offset') * 3600;
17
31
 
18
32
$phone_delim = '::';
19
33
 
20
34
$pop3 = new POP3();
 
35
$count = 0;
21
36
 
22
37
if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) ||
23
38
        ! $pop3->user(get_option('mailserver_login')) ||