Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
So, here's my deal:

For uniformity, I put several databound forms in snippets so they can be dropped in where they need to be.

However, this seems to have broken their email functionality entirely.

Here's how the embedding area is coded (as an example):

Code: Select all
<cms:if k_is_page >
                  <div class="row">
                     <div class="col-md-9">
                        <div class="panel panel-primary shadow-normal" >
                           <div class="panel-heading">
                              <h2><cms:show k_page_title /></h2>
                           </div>
                           <div class="panel-body">
                              <cms:if k_page_name="library-value-calculator" >
                                 <cms:embed 'valueCalc.html' />
                              <cms:else_if k_page_name="volunteer-application" />
                                 <cms:embed 'volunteer_application.html' />
                              <cms:else />
                                 <cms:show support_content />
                              </cms:if>   
                           </div>
                        </div>
                     </div>
                     <div class="col-md-3">
                        <cms:embed 'gen_sidebar.html' />
                     </div>
                  </div>


With volunteer_application.html being the databound form snippet.

Here's how that looks:

Code: Select all
<div class='alert alert-warning'><h4 class="text-center">If you need to volunteer to fulfill court-ordered community service, please speak with your desired volunteer location <em>before</em> submitting this application. Volunteers between the ages of 12 and 15 must have a parent or guardian present at the library during their volunteer hours.</h4></div>
<cms:set submit_success="<cms:get_flash 'submit_success' />" />
<cms:if submit_success >
   <!-- IF/THEN statement appropriately setting the recipient_email variable -->
   <div class="alert alert-success" id="successMessage"><h4>Success: Your application has been submitted. Thank you for your interest! A library representative will be in contact.</h4></div>
   <script>
      setTimeout(function() {
         $('#successMessage').fadeOut('slow', function() {
            $(this).delay(200).alert('close');
         });
      }, 15000;
   </script>
</cms:if>   
<cms:form masterpage="vol_app_db.php" mode="create" enctype="multipart/form-data" method="post" anchor='1'>
   <cms:if k_success >
      <cms:db_persist_form
         _invalidate_cache='0'
         _auto_title='1'
      />     
      <cms:set_flash name="submit_success" value='1' />
      <cms:send_mail from="volunteer_application@gchrl.org" to="<cms:show recipient_email />" subject='Volunteer Application'>
***DO NOT RESPOND TO THIS EMAIL***

The following Volunteer Application was submitted:

**Personal Information**

Applicant Name: <cms:show frm_volunteer_name />

Submission Date: <cms:date format="M j, Y" />

Volunteer Phone Number: <cms:show frm_volunteer_phone_number />

Volunteer Address: <cms:show frm_volunteer_street_address /> <cms:show frm_volunteer_city />,  <cms:show frm_volunteer_state /> <cms:show frm_volunteer_zip />

Volunteer Age Range: <cms:show frm_volunteer_age />

Volunteer Email: <cms:show frm_volunteer_email />

May we contact via e-mail? <cms:show frm_vol_email_permission />

Branch Preference: <cms:show frm_volunteer_branch />

**Education**

Current School: <cms:show frm_current_school />

Education Level: <cms:show frm_education_level />

Other Languages: <cms:show frm_volunteer_languages />

**Employment History**

Current Employer: <cms:show frm_current_employer />

Job Title: <cms:show frm_volunteer_title />

Job Duties: <cms:show frm_volunteer_duties />

**Volunteer Experience**

Prior Volunteer Experience: <cms:show frm_previous_volunteer />

Volunteer Experience: <cms:show frm_previous_volunteer_information />

**Hobbies and Skills**

Hobbies and Interests: <cms:show frm_volunteer_hobbies />

Skills: <cms:show frm_volunteer_skills />

Placement Information: <cms:show frm_volunteer_placement />

**Emergency Contacts**

First Emergency Contact: <cms:show frm_emergency_contact_one_name  />, Phone: <cms:show frm_e_contact_one_phone_number />

Second Emergency Contact: <cms:show frm_emergency_contact_two_name />, Phone: <cms:show frm_e_contact_two_phone_number />

**Other Information**

Criminal Record: <cms:show frm_criminal_history />

Is this for Community Service: <cms:show frm_community_service />

Reason for Community Service: <cms:show frm_community_service_reason />

Hours of Community Service Needed: <cms:show frm_community_service_hours />

Community Service End Date: <cms:show frm_community_service_date />

Volunteer Age Certification: <cms:show frm_volunteer_age_certification />

I understand that this information will be handled confidentially and will only be disclosed to
parties with proper authorization. I release this agency from any liability whatsoever when supplying
such information. I certify that the statements made in this application are true and correct and
have been given voluntarily. I understand that misrepresentation of any information may result in
termination of my volunteer involvement. I understand that a background check may be required. I agree
to abide by the rules of the library. I understand that I will not be paid for any services as a
volunteer and I expect no compensation.

Volunteer Signature:



Date:




Parent/Guardian Signature:





Date:                     
      </cms:send_mail>
      <cms:redirect k_page_link />
   </cms:if>
   <cms:if k_error >
      <div class="k_errormessage alert alert-danger">
         <a class="close" data-dismiss="alert" href="#" aria-hidden="true">
            &times;
         </a>
         <ul>
            <cms:each k_error >
               <li><cms:show item /></li>
            </cms:each>
         </ul>
      </div>
   </cms:if>
   <cms:fieldset label="Personal Information">
      <label>Your Full Name: * </label><br/>
      <cms:input name="volunteer_name" type="bound" /><br/>
      
      <label>Phone Number (in xxx-xxx-xxxx format): *</label><br/>
      <cms:input name="volunteer_phone_number" type="bound" /><br/>

      <label>Street Address: *</label><br/>
      <cms:input name="volunteer_street_address" type="bound" /><br/>

      <label>City: *</label><br/>
      <cms:input name="volunteer_city" type="bound" /><br/>
      
      <label>State: *</label><br/>
      <cms:input name="volunteer_state" type="bound" /><br/>

      <label>Zip Code: *</label><br/>
      <cms:input name="volunteer_zip" type="bound" /><br/>

      <label>Your Age: *</label><br/>
      <cms:input name="volunteer_age" type="bound" /><br/>
      
      <label>E-Mail Address:</label><br/>
      <cms:input name="volunteer_email" type="bound" /><br/>
      
      <label>May we contact you by e-mail?</label><br/>
      <cms:input name="vol_email_permission" type="bound"/><br/>
      
      <label>Where would you like to volunteer? *</label><br/>
      <cms:input type="bound" name="volunteer_branch"  /><br/>

   </cms:fieldset>

   <cms:fieldset label="Education">
      <label>Current School (if applicable):</label><br/>
      <cms:input name="current_school" type="bound" /><br/>
      
      <label>Highest Grade Completed:</label><br/>
      <cms:input name="education_level" type="bound" /><br/>
      
      <label>Languages Spoken (other than English):</label><br/>
      <cms:input name="volunteer_languages" type="bound" /><br/>

   </cms:fieldset>

   <cms:fieldset label="Employment History">
      <label>Current or Most Recent Employer:</label><br/>
      <cms:input name="current_employer" type="bound" /><br/>

      <label>Title or Job Description</label><br/>
      <cms:input name="volunteer_title" type="bound" /><br/>
      
      <label>Job Duties:</label><br/>
      <cms:input name="volunteer_duties" type="bound" /><br/>

   </cms:fieldset>

   <cms:fieldset label="Volunteer Experience">
      <label>Have you ever volunteered previously? *</label><br/>
      <cms:input name="previous_volunteer" type="bound" /><br/>
      
      <label>If so, where, and what were your duties?</label><br/>
      <cms:input type="bound" name="previous_volunteer_information" /><br/>
      
   </cms:fieldset>
   
   <cms:fieldset label="Interests and Skills">
      <label>List your hobbies and interests: *</label><br/>
      <cms:input type="bound" name="volunteer_hobbies" /><br/>
      
      <label>What skills do you possess that would be helpful at the library? *</label><br/>
      <cms:input type="bound" name="volunteer_skills" /><br/>
      
      <label>What information do we need to know that may be helpful in placing you as a volunteer at the library?</label><br/>
      <cms:input type="bound" name="volunteer_placement" /><br/>
   
   </cms:fieldset>
   
   <cms:fieldset label="Emergency Contacts">
      <label>Emergency Contact #1: *</label><br/>
      <cms:input name="emergency_contact_one_name" type="bound" size="15" /><br/>
      
      <label>Contact #1 Phone (xxx-xxx-xxxx format): *</label><br/>
      <cms:input name="e_contact_one_phone_number" type="bound" /><br/>
      
      <label>Emergency Contact #2:</label><br/>
      <cms:input name="emergency_contact_two_name" type="bound" /><br/>
      
      <label>Contact #2 Phone (xxx-xxx-xxxx format):</label><br/>
      <cms:input name="e_contact_two_phone_number" type="bound" /><br/>

   </cms:fieldset>
   
   <cms:fieldset label="Other Information">
      <label>Have you ever been convicted of or pled guilty to a felony or misdemeanor, other than a minor traffic violation? (Conviction or plea will not necessarily disqualify applicant, but will require a background check.) *</label><br/>
      <cms:input type="bound" name="criminal_history" /><br/>
      
      <label>Are you volunteering to fulfill a community service requirement? *</label><br/>
      <cms:input type="bound" name="community_service" /><br/>
      
      <label>If you are needing to fulfill a community service requirement, what kind of requirement are you filling?</label><br/>
      <cms:input type="bound" name="community_service_reason" />
   
      <p class="alert alert-warning bound-center">If you wish to volunteer to fulfill a court-mandated community service requirement, please speak with library staff before completing this form.</p>
      
      <label>Number of Hours Needed:</label><br/>
      <cms:input name="community_service_hours" type="bound" /><br/>
      
      <label>Date by which Community Service must be Completed:</label><br/>
      <cms:input name="community_service_date" type="bound" /><br/>
      
      <label>Please detail the times and days when you are available to volunteer: *</label><br/>
      <cms:input name="volunteer_availability" type="bound" /><br/>

   </cms:fieldset>

   <cms:fieldset label="Volunteer Agreement">
      <p><strong>By clicking "Submit," you certify your agreement with these statements:</p>
      <p>I understand that this information will be handled confidentially and will only be disclosed to parties with proper authorization. I release this agency from any liability whatsoever when supplying such information. I certify that the statements made in this application are true and correct and have been given voluntarily. I understand that misrepresentation of any information may result in termination of my volunteer involvement. I understand that a background check may be required. I agree to abide by the rules of the library. I understand that I will not be paid for any services as a volunteer and I expect no compensation.</strong></p>
      
      <label>I certify that I am either over eighteen years of age, or have permission from a parent or guardian to submit a volunteer application, and that a parent or guardian will come to the library to sign that I have permission to volunteer. *</label><br/>
      <cms:input type="bound" name="volunteer_age_certification" />
               
   </cms:fieldset>   
   
   <button type="submit" class="btn btn-primary">Submit Request</button>
</cms:form>


Now, the databound part is working correctly. I have a page that allows staff to pull - as an example - the volunteer forms and print them out as an RTF file, and the forms are appearing on that side. However, no emails are being received.

On a possibly related note, no emails are going out from the registration section of the members module in 1.4.5RC1, either.

I've submitted the issue with the SysAdmin to see if there's a problem on the other side. The log.txt from the debug shows the emails as going out, and they were until 4 days ago.

Thanks,
Sam
Hi Sam,

Correct me if I am wrong but I don't see the 'recipient_email' variable getting set anywhere -
<cms:send_mail from="volunteer_application@gchrl.org" to="<cms:show recipient_email />" subject='Volunteer Application'>

That said, try setting debug='1' and then study the log file. Do you see anything amiss?
Nothing's amiss - I just cut the if-then segment that sets the recipient email based on the chosen branch for volunteer work.

That bit goes like so:

Code: Select all
<cms:if frm_volunteer_branch == 'evans'>
      <cms:set recipient_email='mock_email@mock.com' />
   <cms:else_if frm_volunteer_branch =='euchee' />
      <cms:set recipient_email='mock_email2@mock.com' />
   <cms:else_if frm_volunteer_branch =='Harlem' />
      ...continue through all options...
        </cms:if>


The debug shows the emails are being sent. However, they aren't being received from any form, and this problem only cropped up recently. I think it might be server-side settings got changed.
Ok, if nothing is amiss then it has to be a server configuration problem.

Maybe you should try using the phpMailer method instead of cms:send_mail tag - viewtopic.php?f=8&t=8720

Hope this helps.
I'll try out PHPMailer and see if that works. Thanks, KK!
5 posts Page 1 of 1