• Resolved ryvix

    (@rrhode)


    Hi there,

    Is there a way to make MailPoet 3 send emails to a specified address when a new subscriber is successfully subscribed?

    Is there some way to hook into MailPoet to accomplish this or some hidden option somewhere?

    Thanks!

Viewing 15 replies - 16 through 30 (of 30 total)
  • You can edit Pages.php (in /mailpoet/lib/Subscription) and add after

    $this->subscriber->save();

    the following code:

    $to = ‘YOUR_MAILADRESS’;
    $subject = ‘The subject’;
    $body = $this->subscriber->first_name . ‘ ‘ . $this->subscriber->last_name . ‘ (‘ . $this->data[’email’] . ‘) just subscribed.’;
    $headers = array(‘Content-Type: text/html; charset=UTF-8’);
    wp_mail( $to, $subject, $body, $headers );

    Regards

    spoonconcept

    (@pierredieudonne)

    Hello,

    it is not working, because if we put a email adress in this line:
    $to = ‘YOUR_MAILADRESS’;
    like this
    $to = ‘[email protected]’;
    The @ create a problem at the frontend, and nothing appears on screen.

    Sorry. But why MailPoet3 does’nt implant it ?

    Hello Pierre,

    for me it’s working – I think, it’s not because of the @ but because of the wrong quotation marks…

    $to = '[email protected]';
    $subject = 'The subject';
    $body = $this->subscriber->first_name . ' ' . $this->subscriber->last_name . ' (' . $this->data['email'] . ') just subscribed.';
    $headers = array('Content-Type: text/html; charset=UTF-8');
    
    spoonconcept

    (@pierredieudonne)

    You are right, now no error at frontend.
    Thank you.

    But I’m waiting for the email after subscription…Never receive email…
    It use the php method to sent email ?

    Regard.

    spoonconcept

    (@pierredieudonne)

    It is correct no ?

    ` function confirm() {
    if($this->subscriber === false || $this->subscriber->status === Subscriber::STATUS_SUBSCRIBED) {
    return false;
    }

    $subscriber_data = $this->subscriber->getUnconfirmedData();

    $this->subscriber->status = Subscriber::STATUS_SUBSCRIBED;
    $this->subscriber->confirmed_ip = Helpers::getIP();
    $this->subscriber->setExpr(‘confirmed_at’, ‘NOW()’);
    $this->subscriber->unconfirmed_data = null;
    $this->subscriber->save();
    $to = ‘[email protected]’;
    $subject = ‘The subject’;
    $body = $this->subscriber->first_name . ‘ ‘ . $this->subscriber->last_name . ‘ (‘ . $this->data[’email’] . ‘) just subscribed.’;
    $headers = array(‘Content-Type: text/html; charset=UTF-8’);

    if($this->subscriber->getErrors() === false) {
    // send welcome notification
    $subsciber_segments = $this->subscriber->segments()->findArray();
    if($subsciber_segments) {
    Scheduler::scheduleSubscriberWelcomeNotification(
    $this->subscriber->id,
    Helpers::arrayColumn($subsciber_segments, ‘id’)
    );
    }

    After the line $headers = array … you have to insert

    wp_mail( $to, $subject, $body, $headers );

    Regards

    Any News about that function?

    All the best
    Karim

    +1

    Hey all, we’ve heard you loud and clear.

    We have this on our radar and we will get to it, but we can’t say when.

    We have over 200 improvements listed and we need to knock them off all the while working on new features.

    We have a team of 6 devs working on the plugin. We’d love to deliver all of it now, but we humanely can’t.

    More to come, and thanks for your patience.

    Kim and the team

    Hey all. Thanks for your patience.

    We are going to release this feature this fall 2018.

    spoonconcept

    (@pierredieudonne)

    ah Wonderfull !

    This is great ! Thanks !

    spoonconcept

    (@pierredieudonne)

    Hello @wysija (MailPoet),

    So after one month, nothing change…?

    Is it possible to be more precise for the release of this function (which is well implemented in mailpoet 2) ?

    Regard.

    Hello dear MailPoet dev team,

    I need this functionality too… ?? Please do it

    Dear @hartsig2000 if I have additional field in form:

    https://i.imgur.com/rG2aerA.png

    Phone number

    how can I add it to notification mail ?

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘New Subscriber Notifications’ is closed to new replies.