System emails

From VPOIDS Documentation

System emails

Provides for the customization of the email messages that are sent automatically through AFIDS.

There is support for html for improved formatting.

Values can be substituted from defaults or from information based on the context using substitution strings, which are variable names enclosed in double curly brackets {{}}.

Password reset emails

Sent when a user requests a password reset.

key (recipient group): passwordchange

Discussion item added


/* Discussion */

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);
    $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);
    $mainBody = str_replace('{{message}}', $message, $mainBody);

    $subject = str_replace('{{external_id}}', $external_id, $subject);
    $subject = str_replace('{{leg_number}}', $leg_number, $subject);

Member Application Emails

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{member_info_name}}', $member_info_name, $mainBody);
    $mainBody = str_replace('{{member_info_email}}', $member_info_email, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);

    $subject = str_replace('{{organization_name}}', $organization_name, $subject);

executeMemberApplicationProcessed

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);
    $mainBody = str_replace('{{organization_home_page}}', $organization_home_page, $mainBody);
    $mainBody = str_replace('{{member_info_name}}', $member_info_name, $mainBody);
    $mainBody = str_replace('{{member_info_email}}', $member_info_email, $mainBody);
    $mainBody = str_replace('{{member_id}}', $member_id, $mainBody);
    $mainBody = str_replace('{{wing_leader_name}}', $wl_name, $mainBody);
    $mainBody = str_replace('{{wing_leader_email}}', $wl_email, $mainBody);
    $mainBody = str_replace('{{site_url}}', $site_url, $mainBody);

executeMemberApplicationFailure

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);
    $mainBody = str_replace('{{member_info_email}}', $member_info_email, $mainBody);

executeMemberApplicationNotice

    $mainBody=str_replace('{{first_name}}', $first_name, $mainBody);
    $mainBody=str_replace('{{last_name}}', $last_name, $mainBody);
    $mainBody=str_replace('{{address}}', $address, $mainBody);
    $mainBody=str_replace('{{city}}', $city, $mainBody);
    $mainBody=str_replace('{{state}}', $state, $mainBody);
    $mainBody=str_replace('{{zipcode}}', $zipcode, $mainBody);

Member Renewal Emails

    $mainBody = str_replace('{{donation_amount}}', $donation_amount, $mainBody);
    $mainBody = str_replace('{{dues_amount}}', $dues_amount, $mainBody);
    $mainBody = str_replace('{{total_amount}}', $total_amount, $mainBody);
    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{member_info_name}}', $member_info_name, $mainBody);
    $mainBody = str_replace('{{member_info_email}}', $member_info_email, $mainBody);

    $subject = str_replace('{{organization_name}}', $organization_name, $subject);

executeMemberRenewalFailure

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{member_info_name}}', $member_info_name, $mainBody);
    $mainBody = str_replace('{{member_info_email}}', $member_info_email, $mainBody);
    $mainBody = str_replace('{{webmaster_email}}', $webmaster_email, $mainBody);

executeMemberRenewalNotice

    $mainBody = str_replace('{{first_name}}', $first_name, $mainBody);
    $mainBody = str_replace('{{last_name}}', $last_name, $mainBody);
    $mainBody = str_replace('{{address}}', $address, $mainBody);
    $mainBody = str_replace('{{city}}', $city, $mainBody);
    $mainBody = str_replace('{{state}}', $state, $mainBody);
    $mainBody = str_replace('{{zipcode}}', $zipcode, $mainBody);


=== Mission coordination notification emails ===
/* sent when a pilot makes a pilot request, letting them know that the request was received */

==== executePilotRequestAck ====

<pre>
        $mainBody=str_replace('{{external_id}}', $external_id, $mainBody);       
        $mainBody=str_replace('{{leg_number}}', $leg_number, $mainBody);
        $mainBody=str_replace('{{pilot_type}}', $pilot_type, $mainBody);
        $mainBody=str_replace('{{organization_name}}', $organization_name, $mainBody);
        $mainBody=str_replace('{{afids_url}}', $afids_url, $mainBody);
        $mainBody=str_replace('{{mission_date}}', $mission_date, $mainBody);
        $mainBody=str_replace('{{name}}', $name, $mainBody);

				$subject = str_replace('{{external_id}}', $external_id, $subject);
        $subject = str_replace('{{leg_number}}', $leg_number, $subject);
        $subject = str_replace('{{organization_name}}', $organization_name, $subject);

/* Send when a pilot request is accepted, and the pilot is added to the mission leg */

executePilotRequestAccepted

        $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);       
        $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);
        $mainBody = str_replace('{{pilot_type}}', $pilot_type, $mainBody);
        $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
        $mainBody = str_replace('{{afids_url}}', $afids_url, $mainBody);
        $mainBody = str_replace('{{mission_date}}', $mission_date, $mainBody);

				$subject = str_replace('{{external_id}}', $external_id, $subject);
        $subject = str_replace('{{leg_number}}', $leg_number, $subject);
        $subject = str_replace('{{organization_name}}', $organization_name, $subject);

	/* Sent when a pilot request is not accepted, that is the pilot is not added to the mission */
	public function executePilotRequestNotAccepted(sfWebRequest $request)


        $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);       
        $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);
        $mainBody = str_replace('{{mission_date}}', $mission_date, $mainBody);
        $mainBody = str_replace('{{organization_name}}', $this->organization_name, $mainBody);
        $mainBody = str_replace('{{siteName}}', $siteName, $mainBody);

        $subject = str_replace('{{external_id}}', $external_id, $subject);       
        $subject = str_replace('{{leg_number}}', $leg_number, $subject);
        $subject = str_replace('{{organization_name}}', $this->organization_name, $subject);

executeRemoveLegPilotAck

        $mainBody = str_replace('{{name}}', $name, $mainBody);
        $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
        $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);
        $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);
        $mainBody = str_replace('{{mission_date}}', $mission_date, $mainBody);

        $subject = str_replace('{{organization_name}}', $organization_name, $subject);

executeRevivalPilotRequestAck

        $mainBody = str_replace('{{name}}', $name, $mainBody);
        $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
        $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);
        $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);
        $mainBody = str_replace('{{mission_date}}', $mission_date, $mainBody);

executeMissionInfoToRecipients

 //doc: The sends the mission itinerary form from the mission leg or mission
 //param 
 {
   $organization_name = sfConfig::get('app_organization_name');      


executeMissionToPilot

executeSendBulk

Mission requests

executeMissionReqReject

executeMissionReqRefer

executeMissionReqReceived

    $mainBody = str_replace('{{name}}', $this->name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);

executeMissionCoordinatedAdded

    $mainBody=str_replace('{{name}}', $name, $mainBody);
    $mainBody=str_replace('{{leg_number}}', $leg_number, $mainBody);
    $mainBody=str_replace('{{external_id}}', $external_id, $mainBody);

executeMissionPilotAdded

    $mainBody=str_replace('{{name}}', $name, $mainBody);
    $mainBody=str_replace('{{leg_id}}', $leg_id, $mainBody);
    $mainBody=str_replace('{{pilot_name}}', $pilot_name, $mainBody);
    $mainBody=str_replace('{{changedBy}}', $changedBy, $mainBody);

executeMissionReqFailure

    $mainBody = str_replace('{{name}}', $name, $mainBody);
    $mainBody = str_replace('{{siteName}}', $siteName, $mainBody);           
    $mainBody = str_replace('{{webmasteremail}}', $webmasteremail, $mainBody);

executeMissionReqProcessed

    $mainBody = str_replace('{{name}}', $this->name, $mainBody);
    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);

executeMissionReqNotice

    $mainBody=str_replace('{{first_name}}', $first_name, $mainBody);
    $mainBody=str_replace('{{last_name}}', $last_name, $mainBody);
    $mainBody=str_replace('{{address}}', $address, $mainBody);
    $mainBody=str_replace('{{city}}', $city, $mainBody);
    $mainBody=str_replace('{{state}}', $state, $mainBody);
    $mainBody=str_replace('{{zipcode}}', $zipcode, $mainBody);

executeMissionReqCreate

executeItinerary_Mission_MissionLegCancel

    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);
    $mainBody = str_replace('{{coordination_name}}', $coordination_name, $mainBody);
    $mainBody = str_replace('{{coordination_email}}', $coordination_email, $mainBody);
    $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);
    $mainBody = str_replace('{{leg_number}}', $leg_number, $mainBody);

executeItinerary_Mission_MissionCancel

    $mainBody = str_replace('{{organization_name}}', $organization_name, $mainBody);
    $mainBody = str_replace('{{organization_phone}}', $organization_phone, $mainBody);
    $mainBody = str_replace('{{coordination_name}}', $coordination_name, $mainBody);
    $mainBody = str_replace('{{coordination_email}}', $coordination_email, $mainBody);
    $mainBody = str_replace('{{external_id}}', $external_id, $mainBody);
    
    $subject = str_replace('{{organization_name}}', $organization_name, $subject);

Events

executeEventReservationSuccessMail

         $mainBody=str_replace('{{name}}', $name, $mainBody);
         $mainBody=str_replace('{{eventName}}', $eventName, $mainBody);
         $mainBody=str_replace('{{eventDate}}', $eventDate, $mainBody);
         $mainBody=str_replace('{{eventTime}}', $eventTime, $mainBody);
         $mainBody=str_replace('{{eventLocation}}', $eventLocation, $mainBody);
         $mainBody=str_replace('{{primary_guest}}', $primary_guest, $mainBody);
         $mainBody=str_replace('{{Adult_guest}}', $Adult_guest, $mainBody);
         $mainBody=str_replace('{{child_guest}}', $child_guest, $mainBody);
         $mainBody=str_replace('{{total_amount}}', $total_amount, $mainBody);