The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

monitor e-mails sent and recipients (3 posts)

  1. tamburodilatta
    Posted 3 years ago #

    I wanted to ask if I can track the e-card, who sent and recipients list. thank you


  2. NoProbRob911
    Posted 3 years ago #

    I am not the program author, but I'll throw in my 2 cents ...

    If you are at all comfortable with PHP, it would not be too difficult to log senders, recipients, date and time sent, originating IP address, etc., by adding a few lines of code to the plugin.php file. Just look for the wp_mail function call and add some logging immediately after that. Here is some very simple code that would create a text file:

    $f = @fopen(LOG_FILE, 'a+');
    if ( $f ) {
      @fputs($f, date("Y-m-d h:i") . " - IP: " . $_SERVER['REMOTE_ADDR'] .
        " - SENDER: $sender RECIPIENT: $to ($name) IMAGE: $img");
      @fclose( $f );

    Note: Replace LOG_FILE with the full path (path and file name) to a writeable location on your server. You can -- and probably should -- use WP's internal directory constants here.

    This would create a flat text file with a line for each ecard sent that would look something like this:

    2013-01-20 02:12 - IP: - SENDER: John Doe RECIPIENT: jane@example.com (Jane Doe) IMAGE: /gallery/IMG_3410.JPG

    If you wanted, you could even add $msg at the end ( ...IMAGE: $img $msg"); ) to include the text of the message the sender included.

    WARNING: My simple code above comes with some caveats:

    1. It is not designed to be highly secure. It creates a plain-text file in a publicly-accessible location.
    2. It does not scale well. Whenever someone sends an ecard, this flat text file has to be appended to. Probably not a problem on a small site, but could be an issue on busier sites.
    3. The log file will continue to grow with each new entry, eventually leading to slower response time.
    4. There is no (good) way to sort, index or even view the log file from within WP.
    5. Probably some other things I'm not even thinking of at 2:15 am ...

    Use this at your own risk! But it's a quick-and-easy / fast-and-dirty way to provide some basic logging functionality to this plugin...

    Good luck!

  3. NoProbRob911
    Posted 3 years ago #

    Also, please note my security concerns expressed in my review and in a different support forum posting (http://wordpress.org/support/topic/spam-prevention-needed) regarding this plugin. This plugin could be accessed remotely to send spam without any anti-spam checks! At the very least, a referrer check and CAPTCHA should be added.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Postcards
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic