Jump to content

HELP! - Is it possible to clear the email queue?


Recommended Posts

Hi Guys - The Duplicates app we use is sending out thousands of emails per minute, causing Amazon SES to pause our account. Is it possible to clear the email queue of all the emails waiting to be sent?

I disabled the plugin, but the emails are still coming!

1382292065_ScreenShot2020-04-28at8_11_57PM.thumb.png.67ec5c67b6cb10dda56241dfe4cc3d80.png

Link to comment
Share on other sites

Ok thanks. This is really strange because massive amounts of emails are still arriving in my inbox from @CodingJungle's Duplicate application. I've uninstalled the app, rebooted the server, switched from Amazon SES (they shutdown my account because of this) and now have PHP (postfix) working. I assumed there was some backlog, but I guess not. Must be some type of delay. 

Link to comment
Share on other sites

duplicate member has never sent out emails, the options is disabled in the extension and in notifications:

1193212601_2020-04-2942.png.21a2b148a835016ff7634ea35216bea6.png

<?php
/**
 * @brief            Notification Options
 * @author           -storm_author-
 * @copyright        -storm_copyright-
 * @license          https://www.invisioncommunity.com/legal/standards/
 * @package          Invision Community
 * @subpackage       CJ Duplicate Member Logger
 * @since            08 Dec 2018
 */

namespace IPS\cjdml\extensions\core\Notifications;

use function defined;
use function header;

use IPS\Http\Url;
use IPS\Member;

if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) {
    header( ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' ) . ' 403 Forbidden' );
    exit;
}

/**
 * Notification Options
 */
class _cjdml
{

    /**
     * Get configuration
     *
     * @param Member $member The member
     *
     * @return    array
     */
    public function getConfiguration( $member )
    {

        // Basically just return a list of the keys for the types of notification your app will send
        // keys can be anything you want. You can specify what should be the default value and any disabled values (acceptable values are "email" and "inline")
        // For each key, create a language string "notifications__<key>" which is what will display in the user's Notification Options screen
        if ( Member::loggedIn()->isAdmin() ) {
            return [
                'cjdml_new_dupe' => [ 'default' => [ 'inline' ], 'disabled' => [ 'email' ] ],
            ];
        }

        return [];
    }

    // For each type of notification you need a method like this which controls what will be displayed when the user clicks on the notification icon in the header:
    // Note that for each type of notification you must *also* create email templates. See documentation for details: https://remoteservices.invisionpower.com/docs/devdocs-notifications

    /**
     * Parse notification: key
     *
     * @param \IPS\Notification\Inline $notification The notification
     *
     * @return    array
     * @code
     * return array(
     * 'title'        => "Mark has replied to A Topic",    // The notification title
     * 'url'            => \IPS\Http\Url::internal( ... ),    // The URL the notification should link to
     * 'content'        => "Lorem ipsum dolar sit",            // [Optional] Any appropriate content. Do not format
     * this like an email where the text
     * //     explains what the notification is about - just include any appropriate content.
     * //     For example, if the notification is about a post, set this as the body of the post.
     * 'author'        =>  \IPS\Member::load( 1 ),            // [Optional] The user whose photo should be displayed
     * for this notification
     * );
     * @endcode
     */
    public function parse_cjdml_new_dupe( \IPS\Notification\Inline $notification )
    {

        return [
            'title'   => Member::loggedIn()->language()->addToStack( 'cjdml_new_duplicate' ),
            // The notification title
            'url'     => Url::internal( 'app=core&module=modcp&controller=modcp&tab=cjdml', 'front', 'modcp_cjdml' ),
            // The URL the notification should link to
            'content' => '',
            // [Optional] Any appropriate content. Do not format this like an email where the text
            // 	 explains what the notification is about - just include any appropriate content.
            // 	 For example, if the notification is about a post, set this as the body of the post.
            'author'  => Member::load( 0 ),
            // [Optional] The user whose photo should be displayed for this notification
        ];
    }
}

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...