Email Expired Memberships

Discussion in 'Troubleshooting' started by vacc_webmaster, Aug 30, 2010.

  1. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    okay, almost there alex but i need to put more info in that email. is the content after the third comma what is sent for the message field? and how can I, in php, make that a multi-line field. the content i want to include in the email is much longer than this and will involve the first name, last name, address, custom fields etc.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Here is example:
    PHP:
    mail_customer("email@address.com""
    User's 
    $member[login] subscription to product $product_id expired
    Member name: 
    $member[name_f] $member[name_l]
    Address: 
    $member[country] $member[state] $member[zip] $member[city] $member[street] 
    "
    "User $member[login] expired");
  3. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    aha, almost there. I also want to include some custom fields in the email. how would i call those?

    is there a way to add line breaks to that?

    and, finally, this will send an additional email on expire to my third party, but also still send the email to the customer herself, correct? because that's how i need this to work.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    $member[data][fieldname] - for common fields
    $member[fieldname] for sql fields.

    use \n for line breaks;

    yes correct;
  5. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    it never ends. Now i need to know how to capture the product title instead of the product id. sorry!
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This should work:
    $product[title]
  7. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    Most of the products on my site are auto renew. However, not all subscriptions successfully renew, and those customers expire. For the customers whose auto renewal succeeds, they have one expired membership, and one active membership. I want to search all my expired members who have not successfully auto renewed. When I just search for expire before a particular date it brings up both groups.
  8. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    Actually, I guess all I want is to be able to search by status. Any way o can add that to the mix? I don't want to run a SQL query because I like being able to go in and view the subscribers history, etc, from the control panel.
  9. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    aMember CP -> Browser users -> Filter -> Expired This will display only expired users.
  10. celina

    celina Member

    Joined:
    Sep 9, 2008
    Messages:
    86
    yes of course, that's it! thank you!
  11. antyloois

    antyloois New Member

    Joined:
    Apr 13, 2011
    Messages:
    1
    Thanks so much alexander! I will try that

Share This Page