title: My Email To Form is not working on mobile device
body: <p>I have an email to form, this works fine on a desktop but doesn't work using a mobile device as in it says it sent but isn't coming through to emails, I'm guessing it's because the phone doesn't possibly click on send form button in the HTML? I was hoping for some help please which would be much appriatied</p>
  <p>So from the HTML page, I have the submit button</p>
  <pre><code>&lt;div class=&quot;submitForm&quot;&gt;
      &lt;button type=&quot;submit&quot; name=&quot;contact_query&quot; class=&quot;submit_query&quot; onClick=&quot;gtag_report_conversion()&quot;&gt;Submit&lt;/button&gt;
  &lt;/div&gt;  
  </code></pre>
  <p>at the bottom of the HTML file, I have a script that opens a PHP script file and leaves a message to the user</p>
  <pre><code>&lt;script&gt;
    $(function () {
      $('form').on('submit', function (e) {
        e.preventDefault();
        var formdata = $('form').serialize()
        $.ajax({
          type: 'post',
          url: 'formDataBad.php',
          data: {formData:formdata,form:'home'},
          success: function (result) {
              console.log(result);
  
          var message = '&lt;div id=&quot;stage&quot; class=&quot;form-all&quot; style=&quot;    margin-top: 100px;&quot;&gt;&lt;p style=&quot;text-align:center;&quot;&gt;&lt;img src=&quot;https://cdn.jotfor.ms/img/check-icon.png&quot; alt=&quot;&quot; width=&quot;128&quot; height=&quot;128&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align:center;&quot;&gt;&lt;h1 style=&quot;text-align:center;&quot;&gt;Thank You!&lt;/h1&gt;&lt;p style=&quot;text-align:center;&quot;&gt;Your submission has been received.&lt;/p&gt;&lt;p style=&quot;text-align:center;&quot;&gt;One of our friendly team will contact you shortly to discuss your application.&amp;nbsp;&lt;/p&gt;&lt;/div&gt; &lt;/div&gt;';
          
              $('article.box.post').html(message);                            
           
           document.getElementById(&quot;queryForm&quot;).reset();
          }
        });
        
      });                
    });
  &lt;/script&gt;
  </code></pre>
  <p>This then opens the php script file which has this below</p>
  <pre><code>&lt;?php
  $data = explode('&amp;',$_POST['formData']);
  $to = 'info@domain.uk,domain@gmail.com';
  
  if($_POST['form'] == 'home'){
      $firstname = explode('=',$data[0]);
      $lastname = explode('=',$data[1]);
      $email = explode('=',$data[2]);
      $phone = explode('=',$data[3]);
      $alternative_number = explode('=',$data[4]);
      $house_number = explode('=',$data[5]);
      $street_address = explode('=',$data[6]);
      /*$street_address2 = explode('=',$data[6]);
      $city = explode('=',$data[7]);*/
      $postcode = explode('=',$data[7]);
      $home_owner = explode('=',$data[8]);
      
      $loan_amount = explode('=',$data[9]);
      $mortgage = explode('=',$data[10]);
      $secured_loan = explode('=',$data[11]);
      $property_value = explode('=',$data[12]);
      /*$question = explode('=',$data[14]);*/
      
      $message = '&lt;html&gt;
                  &lt;head&gt;
                  &lt;style&gt;
                  table, th, td {
                    border: 1px solid black;
                    border-collapse: collapse;
                  }
                  th, td {
                    padding: 5px;
                    text-align: left;    
                  }
                  &lt;/style&gt;
                  &lt;/head&gt;
                  &lt;body&gt;
                   &lt;table style=&quot;width:60%&quot;&gt;
                    &lt;tr&gt;
                      &lt;th&gt;First Name:&lt;/th&gt;
                      &lt;td&gt;'.urldecode($firstname[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Last Name&lt;/th&gt;
                      &lt;td&gt;'.urldecode($lastname[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;th&gt;E-mail&lt;/th&gt;
                      &lt;td&gt;'.urldecode($email[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Phone&lt;/th&gt;
                      &lt;td&gt;'.urldecode($phone[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Alternate Number&lt;/th&gt;
                      &lt;td&gt;'.urldecode($alternative_number[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;House Number&lt;/th&gt;
                      &lt;td&gt;'.urldecode($house_number[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                     &lt;tr&gt;
                      &lt;th&gt;Street Address&lt;/th&gt;
                      &lt;td&gt;'.urldecode($street_address[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Post Code&lt;/th&gt;
                      &lt;td&gt;'.urldecode($postcode[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Homeowner ?&lt;/th&gt;
                      &lt;td&gt;'.urldecode($home_owner[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                    
                  
                    &lt;tr&gt;
                      &lt;th&gt;Loan Amount&lt;/th&gt;
                      &lt;td&gt;&amp;#163; '.urldecode($loan_amount[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Mortgage&lt;/th&gt;
                      &lt;td&gt;&amp;#163; '.urldecode($mortgage[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Secured Loan&lt;/th&gt;
                      &lt;td&gt;&amp;#163; '.urldecode($secured_loan[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                    &lt;th&gt;Property Value&lt;/th&gt;
                      &lt;td&gt;&amp;#163; '.urldecode($property_value[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                     
                  &lt;/table&gt;
                  &lt;/body&gt;
                  &lt;/html&gt;';
      
      $headers =  'MIME-Version: 1.0' . &quot;\r\n&quot;; 
      $headers .= 'From: '.urldecode($firstname[1]).' &lt;'.urldecode($email[1]).'&gt;' . &quot;\r\n&quot;;
      $headers .= 'Content-type: text/html; charset=iso-8859-1' . &quot;\r\n&quot;; 
      
      $sendemail = mail($to,&quot;Lender App&quot;,$message,$headers);
      if($sendemail){
          print_r(&quot;TRUE&quot;);
      }else{
          print_r(&quot;FALSE&quot;);
      }
  } else if($_POST['form'] == 'contact'){
      $fullname = explode('=',$data[0]);
      $email = explode('=',$data[1]);
      $telephone = explode('=',$data[2]);
      $query = explode('=',$data[3]);
      
      $message = '&lt;html&gt;
                  &lt;head&gt;
                  &lt;style&gt;
                  table, th, td {
                    border: 1px solid black;
                    border-collapse: collapse;
                  }
                  th, td {
                    padding: 5px;
                    text-align: left;    
                  }
                  &lt;/style&gt;
                  &lt;/head&gt;
                  &lt;body&gt;
                   &lt;table style=&quot;width:60%&quot;&gt;
                    &lt;tr&gt;
                      &lt;th&gt;Fullname:&lt;/th&gt;
                      &lt;td&gt;'.urldecode($fullname[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                   
                      &lt;th&gt;E-mail&lt;/th&gt;
                      &lt;td&gt;'.urldecode($email[1]).'&lt;/td&gt;
                    &lt;/tr&gt;
                  
                    &lt;tr&gt;
                      &lt;th&gt;Phone&lt;/th&gt;
                      &lt;td&gt;'.urldecode($telephone[1]).'&lt;/td&gt;
                    &lt;/tr&gt;  
                  
                     &lt;tr&gt;
                     &lt;th&gt;Query&lt;/th&gt;
                      &lt;td&gt;'.urldecode($query[1]).'&lt;/td&gt;
                    &lt;/tr&gt; 
                  &lt;/table&gt;
                  &lt;/body&gt;
                  &lt;/html&gt;';
      
      $headers =  'MIME-Version: 1.0' . &quot;\r\n&quot;; 
      $headers .= 'From: '.urldecode($fullname[1]).' &lt;'.urldecode($email[1]).'&gt;' . &quot;\r\n&quot;;
      $headers .= 'Content-type: text/html; charset=iso-8859-1' . &quot;\r\n&quot;; 
      
      $sendemail = mail($to,&quot;Contact Query&quot;,$message,$headers);
      if($sendemail){
          echo &quot;TRUE&quot;;
      } else {
          echo &quot;FALSE&quot;;
      }
  }
  ?&gt;
      
  </code></pre>