ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Auto Add New Member to Mailing List

June 21, 2011 4:33pm

Subscribe [2]
  • #1 / Jun 21, 2011 4:33pm

    BPeddle

    31 posts

    I have surfed around for a while and may have over looked it, however is there a way when a new member signs up to automatically add them to a mailing list?

    Thanks!

  • #2 / Jun 21, 2011 7:46pm

    Matt:P

    277 posts

    Hi

    Check out: http://devot-ee.com/add-ons/campaigner/ and http://devot-ee.com/add-ons/subscriber/

    Letting my mind drift… you could also build the values of the new members Name and Email address into the ‘thanks for signing up’ page and have that page submit them as hidden values to something like Campaign Monitor or MailChimp list. Doing so wouldn’t give you any sort of EE-based report or status of their subscription preference though.

    Just thinking out aloud. Does that help?

  • #3 / Jun 21, 2011 8:09pm

    BPeddle

    31 posts

    Thank you—we won’t be using Campaign Monitor or MailChimp to do emails, right now just want to stay native in EE and looking at http://devot-ee.com/add-ons/firemail/ to do the mailings.

    I may just need to create a trigger in mySql on new memeber record insert into the mailing list table.

  • #4 / Jun 22, 2011 12:43pm

    BPeddle

    31 posts

    I ended up doing the trigger and it seems to work.  I posted http://brianpeddle.com/2011/06/22/automatically-adding-a-new-member-to-a-mailing-list-in-expression-engine/ in case other run into same issue.

    CREATE TRIGGER after_insert_new_member
        AFTER INSERT ON exp_members FOR EACH ROW
        BEGIN    
            INSERT INTO exp_mailing_list (list_id, authcode, email, ip_address) 
    VALUES (2, (SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 10)), NEW.email, '127.0.0.1');
        END
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases