WordPress.org

Forums

wpMandrill
[resolved] Wpmandrill - subbacount (6 posts)

  1. franzbel
    Member
    Posted 1 year ago #

    Hello,

    I'd like to know how to use mandrill_payload filter to add a mandrill subaccount in the emails sent by wordpress through wpmandrill plugin.

    Thank your for your help !

    https://wordpress.org/plugins/wpmandrill/

  2. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Exactly the same way you modify any other parameter:

    public function addSubaccount($message) {
        $subaccount_id = getSubaccount();
        $message['subaccount'] = $subaccount_id;
        return $message;
    }
    add_filter('mandrill_payload', 'addSubaccount');
  3. alpha1beta
    Member
    Posted 1 year ago #

    Can this be done inside the settings in the general tags area?

  4. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    No, sorry. It can't be done through the settings yet.

  5. doverlord
    Member
    Posted 8 months ago #

    Where in that function do you place the sub account's ID?… let's say it's abc123

  6. alpha1beta
    Member
    Posted 8 months ago #

    @doverlord MC_Will's reply above has all the info you need.
    https://wordpress.org/support/topic/wpmandrill-subbacount?replies=5#post-5205788

    function addSubaccount($message) {
        $subaccount_id = getSubaccount();
        $message['subaccount'] = 'abc123';
        return $message;
    }
    add_filter('mandrill_payload', 'addSubaccount');

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • wpMandrill
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic