CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php -- do not send mails
Pages: [1]

Author Topic: UpdateMembershipRecord.php -- do not send mails  (Read 1252 times)

kaless

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
UpdateMembershipRecord.php -- do not send mails
August 20, 2009, 04:16:56 am
Hello,

I don't want, that the script UpdateMembershipRecord.php sends mails, when it renews memberships. Where can I configure that?

Thanks

Bene

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: UpdateMembershipRecord.php -- do not send mails
August 20, 2009, 05:01:19 am

u will need to modify the file directly.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: UpdateMembershipRecord.php -- do not send mails
December 10, 2012, 02:36:15 pm
(an old thread, but I'm working on a v3.3.6 installation...)

UpdateMembershipRecord.php only sends emails if 1) the expiration date has arrived:
Code: [Select]
            //send reminder for membership renewal
            if ( $dao->reminder_date &&
                 $dao->reminder_date != '0000-00-00' &&
                 ( $reminder_date <= $today_date ) ) {
and 2) if a renewal message has been defined:
Code: [Select]
                $renewalMsgId = $memType->renewal_msg_id;
                ...
                if ( $renewalMsgId ) {
                    $toEmail  = CRM_Contact_BAO_Contact::getPrimaryEmail( $dao->contact_id );

I have not defined a renewal message, but some members received emails like this at the time UpdateMembershipRecord ran:
Code: [Select]
From: ...
Date: Mon, Dec 10, 2012 at 4:05 AM
Subject: Receipt -
To: ...

Please print this confirmation for your records.

Could this be coming from the following snippet that is called for every status change?:
Code: [Select]
                    //since there is change in status.
                    $statusChange = array( 'status_id' => $statusId );
                    $smarty->append_by_ref('memberParams', $statusChange, true );
                   
                    //process member record.
                    civicrm_contact_membership_create( $memParams );

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • UpdateMembershipRecord.php -- do not send mails

This forum was archived on 2017-11-26.