Forums

Email Blues

simonshah 05 Nov, 2007
I have created a chronoengine form with validation and where data successfully passes to the back end database table. My problem is with the emails not being sent on form submission.

I have checked the hosting server, another form on the website and a simple php script with the mal() function and these work fine, so I know email from the hosting account is working.

My Joomla global settings for mail are set at PHP mail function, although I tried other settings and did not achieve success..

I attach an image for the settings in the general tab.

the html code is as follows:
<table class=CONTENT width=29%>
    <tr>
      <td colspan=9></td>
    </tr>
    
    <tr>
      <td  valign=TOP >Company Name:<br />
          
            <input type="text" class="required" id="lead_companyname" name="lead_companyname"  value="" maxlength=60 />
          <font color="blue" >*</font></td>
    </tr>
    <tr>
      <td  valign=TOP >First name: <br />
        <input type="text" class="required" id="lead_personfirstname" name="lead_personfirstname"  value="" maxlength="30" />
        <font color="blue" >*</font></td>
    </tr>
    <tr>
      <td  valign=TOP >Last name:<br />
          
            <input type="text" class="required" id="lead_personlastname" name="lead_personlastname"  value="" maxlength=30 />
          <font color="blue" >*</font></td>
    </tr>
    <tr>
      <td  valign=TOP >Email : <br />
        <input type="text" class="validate-email" id="lead_personemail" name="lead_personemail"  value="Email address" maxlength="255" />
        <font color="blue" >*</font></td>
    </tr>
    <tr>
      <td  valign=TOP >Phone Number : <br />
        <input type="text" class="required" id="lead_personphonenumber" name="lead_personphonenumber" maxlength="20" />
        <font color="blue" >*</font></td>
    </tr>
  </table>
  
  <!-- Caroline, here are hidden form values that map to the SageCRM system and identify the lead and it's source  -->
  <!-- Caroline, here are hidden form values that map to the SageCRM system and identify the lead and it's source  -->
  
  <input type=hidden name=_HIDDENlead_sourceweb value="destinationcrm">
  <input type=hidden name=_HIDDENlead_source value="Web">
 
 <!-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --> 

  
<input type="submit" value="Go">
I even put some code in the on submit code box to see whether I could force an email as below, but that did not work either, although this code works if I just upload as a spearate php file and run the script (again telling me that email is working from the server)
<?php
mail("lead_personemail",
      "This is the message subject from the onsubmit code",
      "This is the message body"«»);
?>
If you are wondering what lead_personemail is in the email field of the image, it is because I want to send an email to the person who actually submitted the form.

Any ideas on what my next steps would be?

Regards

Simon

Edited to add code tags<br><br>Post edited by: GreyHead, at: 2007/11/05 16:28
simonshah 05 Nov, 2007
Sorry here is the image from the general tab of the chronoforms

<br><br>Post edited by: simonshah, at: 2007/11/05 16:05
GreyHead 05 Nov, 2007
Hi Simon,

The image is a bit hard to read but it looks as though you have "simon.shah@candogo.com,lead_personemail" in the Email address(es) field. This field only takes email addresses, add the field name in the Special Fields tab.

I'm not sure from memory if this will send to both but we can hack the code if it doesn't.

Please try this then post the debug info that you get when you submit the form.

Bob
simonshah 05 Nov, 2007
Thanks you. You are truly a star. I removed the dynamic field lead_personemail from the Email address field and tested and it unblocked everything. redirect, data table update and email works.

I have just one question remaining. For the email template (I want to thank the form susbciber) as send them to a web link, what code do I use to include line breaks. Can I use and HTML code in that?? I am going to try in any event..

Thanks once again

Regards

Simon
GreyHead 05 Nov, 2007
Hi Simon,

IIRC you've been able to use html in templates for the last few versions.

Bob
simonshah 05 Nov, 2007
Bob

This is great and the solution works a dream. Also thank you for the very quick responses.

Regards

Simon
This topic is locked and no more replies can be posted.