Author Topic: Welcome message not sent with aMember plugin  (Read 11271 times)

rwlms

  • Posts: 12
    • View Profile
Welcome message not sent with aMember plugin
« on: June 28, 2006, 11:34:24 am »
I have two databases. The first is a trial membership where people sign up directly through ListMail PRO. All works fine there.

The second is a paid membership list integrated with amember software. When I sign up through amember, it adds me to the paid database in ListMail PRO, but ListMail PRO does not send out the welcome message as it does with the trial membership.

Any clues?

Thanks,
Roger

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Welcome message not sent with aMember plugin
« Reply #1 on: June 28, 2006, 12:51:02 pm »
Since aMember is doing the insertion it also needs to trigger sending of the welcome message.  This hasn't been possible in as long as I've known... maybe you could encourage them to add this feature.  I'm willing to help if they need any clarification or help with it.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

rwlms

  • Posts: 12
    • View Profile
Welcome message not sent with aMember plugin
« Reply #2 on: July 04, 2006, 03:25:32 am »
Dean,

Here is Alexander's reply from amemeber:

"Ok. Can you please ask Dean what exactly should be done to "to trigger sending of the welcome message. I will do this."

--
Alexander

So please tell me here or contact him directly at http://cgi-central.net/

Thanks so much!
Roger

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Welcome message not sent with aMember plugin
« Reply #3 on: July 04, 2006, 06:52:59 pm »
I will possibly need to rework some of ListMail to accomodate for them to be able to add it easily...

The heart of the welcome message in ListMail is the "sendwelcome($userid)" function in admin.php.  This function accepts the numeric auto-incremented userid as the first variable.  It also automatically detects whether to send the confirmation or welcome message based on the value of "cnf" in the user table (0 = unconfirmed/confirmation email, 1=confirmed/welcome email).

Here's the code...

Note: Code removed because it was too complicated.  See next posts for the most recent suggestion and some progress on the welcome email feature for the aMember plugin
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

terriz

  • Posts: 46
    • View Profile
Welcome message not sent with aMember plugin
« Reply #4 on: July 24, 2006, 09:00:03 am »
I've also used aMember integrated with ListMailPro and this is the workaround we've used:
--Use aMember's capability to send the immediate "welcome message".
--Use the ListMail followup function to send a message the next day.

This assumes the LMP list you are using with aMember can only be "subscribed to" by being added via aMember.

Peace,
Terri Z

It's not just about the business -- it's about the lifestyle!
www.Solo-E.com for Solo Entrepreneurs

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Welcome message not sent with aMember plugin
« Reply #5 on: January 29, 2007, 02:33:26 pm »
Has aMember since added the ability to send the welcome email?

I looked at their code and changed the listmail_added() function as follows:

Code: [Select]
function listmail_added($member_id, $product_id,
    $member){
    global $db, $config, $plugin_config;
   
    $this_config = $plugin_config['protect']['listmail'];
    $lm_db = $this_config['db'];


    foreach ($member as $k=>$v)
        $member[$k] = $db->escape($v);

    /// delete customer from expired list, if any
    if ($expired_list_id = $this_config['expired_list']) {
        $q = $db->query($s = "DELETE
        FROM {$lm_db}users
        WHERE email = '$member[email]' AND list = $expired_list_id
        ");
    }

    $product = $db->get_product($product_id);
    $list_id = $product['listmail_access'];
    if (!$list_id) return;

    // DW modified
    // add user to list_id on first followup, ignoring dupes
    $fn = urlencode($member[name_f]);
    $ln = urlencode($member[name_l]);
    $em = urlencode($member[email]);
    $lmpurl = "http://happymommynews.com/mail"; // no trailing slash

    $url = "$lmpurl/signup.php?list=$list_id&email=$em&fname=$fn&lname=$ln&s=
eq=1&del=0";
    mail('test@listmailpro.com','test','URL='.$url);
    $lmp = fopen($url,'r');
    fclose($lmp);
/*
    // OLD START
    $q = $db->query("SELECT email
    FROM {$lm_db}users
    WHERE email = '$member[email]' AND list = $list_id
    ");
    list($e) = mysql_fetch_row($q);
    $dat = date('Y-m-d');
    if (!$e){ //user not exists
        $u = '';
        do {
         $us = strtolower(substr(md5(rand()), 0,7));
         $q = $db->query("SELECT uid FROM {$lm_db}users WHERE = uid='$us'");
        } while (mysql_fetch_row($q));
        $db->query($s = "INSERT INTO {$lm_db}users
        (uid,list,fname,lname,email,cseq,cdel,cnf,dateadd,htmail)
        VALUES
        ('$us',$list_id,'$member[name_f]', '$member[name_l]',
        '$member[email]',  1, 0, 1, '$dat', 1
        )
        ");
    }
    // OLD END
*/

}

This should also result in list "Additional Operations" taking effect.

Anyone care to try it?
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

rffeddes

  • Posts: 14
    • View Profile
I'll gieve it a try
« Reply #6 on: May 14, 2007, 08:19:20 am »
Hi Dean,

I am testing amember and listmail, just added those lines and will test now.

Will get back to tell what happens.

rffeddes

  • Posts: 14
    • View Profile
Welcome message not sent with aMember plugin
« Reply #7 on: May 14, 2007, 09:39:38 am »
Did not work, screwed up amember admin login, when I reverted to old one amember login came back up

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Welcome message not sent with aMember plugin
« Reply #8 on: May 14, 2007, 08:07:09 pm »
I believe aMember has made improvements in this area - please contact them to find out.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting