***SOLVED***

The "from" field email had an associated domain that wasn't for the site, but for the county government, so it was getting caught by the county mail server as suspicious. Changed the domain address for the email to one controlled by my department alone. Emails now go through.

***END SOLUTION***


So, I have a page where patrons can submit requests for materials to be purchased for the library; the page is clonable, and uses a databound form so the requests can be saved to a database for access at the leisure of the selectors. There's an input on the administrator side for the selector's email so they get a notification that a request has been submitted for their department or branch - multiple forms for the different branches.

Relevant code time:

Code: Select all
<cms:form enctype="multipart/form-data" mode="create" masterpage="item_acquisition_db.php" 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="acquisition_request@xxx.gov" to="<cms:show selector_email />" subject='Acquisition Request' debug='1'>
***DO NOT RESPOND TO THIS EMAIL***
The following Acquisition Request was submitted:

*Item Information*

Submitted on: <cms:date format="M j, Y" />

Item Author: <cms:show frm_acquisition_author />

Item Title: <cms:show frm_acquisition_title />

Item Publisher: <cms:show frm_acquisition_publisher />

ISBN: <cms:show frm_acquisition_isbn />

Item Type: <cms:show frm_acquisition_material_type />

Age Range: <cms:show frm_acquisition_routing_information />

Purchase For: <cms:show frm_acquisition_pickup_branch />

*Patron Information*


Patron Name: <cms:show frm_acquisition_patron_name />

Patron Phone: <cms:show frm_acquisition_phone_number />

Patron PINES ID: <cms:show frm_acquisition_card_number />

Patron E-Mail Address: <cms:show frm_acquisition_email />

*Acquisition Disclaimer*

While the library makes every effort to fill all patron requests, there is no guarantee that
the requested item will be acquired. You will be contacted when and if the item is received
and processed.

Agreed to Terms: <cms:show frm_acquisition_agreement />
                     </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>
                  <p>
                  <cms:fieldset label="Patron Information">
                     <label>Your full name:</label><br/>
                     <cms:input name="acquisition_patron_name" type="bound" /><br/>
                  
                     <label>A phone number where you can be reached:</label><br/>
                     <cms:input name="acquisition_phone_number" type="bound"  /><br/>
                  
                     <label>Your PINES library card number:</label><br/>
                     <cms:input name="acquisition_card_number" type="bound" /><br/>
                  
                     <label>If you wish to be contacted by e-mail, please enter your e-mail address:</label><br/>
                     <cms:input name="acquisition_email" type="bound" /><br/>
                  </cms:fieldset>
                  
                  <cms:fieldset label="Item Information">
                     <label>Item Title</label><br/>
                     <cms:input name="acquisition_title" type="bound"  /><br/>
                  
                     <label>Author, artist, or director:</label><br/>
                     <cms:input name="acquisition_author" type="bound" /><br/>
                     
                     <label>Publisher:</label><br/>
                     <cms:input name="acquisition_publisher" type="bound" /><br/>
                  
                     <label>Item ISBN:</label><br/>
                     <cms:input name="acquisition_isbn" type="bound" /><br/>
                     
                     <label>Material Type:</label><br/>
                     <cms:input name="acquisition_material_type" type="bound" /><br/>
                     
                     <label>Approximate age range for this item:</label><br/>
                     <cms:input type="bound" name="acquisition_routing_information" /><br/>
                  
                     <label>What branch are you requesting this item for?</label><br/>
                     <cms:input type="bound" name="acquisition_pickup_branch"  /><br/>
                  </cms:fieldset>
                  
                  <cms:fieldset label="Acquisition Request Disclaimer">
                  <label>While the library makes every effort to fill all patron requests, there is no guarantee that the requested item will be acquired. You will be contacted when and if the item is received and processed.</label>
                                 
                     <cms:input type="bound" name="acquisition_agreement" /><br/>
                  </cms:fieldset>   
                  <div style="height: 1em;"></div>
                  
                  <button type="submit" class="btn btn-primary">Submit Request</button>
               </cms:form>


It was working until I converted it to databound; emails went out properly. Then I was testing it on the form that goes to me (basically, one that exists only for me to test the form), and no email was forthcoming.

However, in the log.txt file, there is - very clearly:

Code: Select all
=======================[2015-01-09 08:26:57]=======================
From: acquisition_request@xxx.gov
To: slink@xxx.gov
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Subject: Acquisition Request
Message:
***DO NOT RESPOND TO THIS EMAIL***
The following Acquisition Request was submitted:

*Item Information*

Submitted on: Jan 9, 2015

Item Author: Tom Robbins

Item Title: Still Life With Woodpecker

Item Publisher:

ISBN:

Item Type: Book

Age Range: adult

Purchase For: evans

*Patron Information*


Patron Name: Test Patron

Patron Phone: 555-555-5555

Patron PINES ID: 12345678912345

Patron E-Mail Address:

*Acquisition Disclaimer*

While the library makes every effort to fill all patron requests, there is no guarantee that
the requested item will be acquired. You will be contacted when and if the item is received
and processed.

Agreed to Terms: By clicking this box, I affirm that I have read the above statement.
                     

Delivery Success


I'm getting emails from every other form; registration confirmations, notifications that a blog has been posted and needs approval, so it's not a server-side problem where send_mail isn't working at all. I even have another form with a variable for the recipient e-mail address that's set administrator-side which uses almost identical code.

Where's the obvious error I'm overlooking? :)