联系表格电子邮件到短信不起作用

时间:2017-05-09 18:55:56

标签: php android email text contact

你好,我希望你们能帮助我,我有这个联系表格,可以发送电子邮件给技术人员的电子邮件和他的电话号码。

现在一切正常,但他没有收到文字,我觉得好像是他的手机问题,因为我使用了我的女朋友的电话号码,使用相同的运营商,她收到的文本很好,以及其他所有人假设接收文字,但是当我发送到他的手机时,它只是不起作用......有什么我缺少的东西???,注意:他有一个安卓,但我有人都有电话。当我直接从我的电子邮件中发送电子邮件并发送给他的电话时,它工作我的女朋友电话,经理和其他同事的联系表格工作与一些与技术人员具有相同载体的人一起工作但只是不适合他(技术员)......这让我很难过,请有人帮忙!

<?php

$email='1231231234@tmomail.net, 1231231234@tmomail.net,myemail@gmail.com';

$email1=$_POST['Email1'];
$email2=$_POST['Email2'];
$from2=$_POST['Email1'];
$from=$_POST['Email1'];
$subject="Maintenance Request";
//^this is the subject of the email that serivce gets. 
$problem=$_POST['Box'];
$select=$_POST['Select'];
$name=$_POST['Name'];
$phone=$_POST['Phone'];
$number=$_POST['Number'];
$mlocation=$_POST['Machinelocation'];
$orgname=$_POST['OrganisationName'];
//^these information pulls what the customer answers in the field

$message="Name: ".$name."\r\n"."Organization: ".$orgname."\r\n"."Email: ".$from."\r\n"."Phone: ".$phone ."\r\n"."Machine: ".$select."\r\n"."Machine Location: ".$mlocation."\r\n"."Problem: ".$problem ;

$confirmation_subject = 'Your recent Maintenance request';
//^this is the subject of the confirmation email
$confirmation_sender = 'COMPANY NAME HERE<info@youremail.com>';
$msg = "".$name."\r\n" ."Thank you for your recent Maintenance request. A member of our team will respond to your request as soon as possible."."\r\nBelow you will see a copy of your request"."\r\n\n"."Name: ".$name."\r\n"."organization: ".$orgname."\r\n"."Email: ".$from."\r\n"."Phone: ".$phone ."\r\n"."Machine: ".$select."\r\n"."Machine Location: ".$mlocation."\r\n"."Problem: ".$problem ;
//^this is confirmation message message" 

if ($number !=10) {
    die("You are not a human! or your answer was incorrect!, Please go back and try again.");
}
else {
mail ($email1, $confirmation_subject,$msg, 'From: ' .$confirmation_sender );
}

if(!filter_var($email1, FILTER_VALIDATE_EMAIL)) {
    die("Invalid email ($email1)");
}
if ($email1 == $email2) {
    mail ($email, $subject, $message, "from:".$from);
    header("location: siteethankyou.php");
}
else {
    echo "This ($email2) email address is different from ($email1).\n";
}

?>

<div name="my-form" >
<div class="container">  
  <form id="contact" action="EmailHandler.php" method="post">
    <h3>Repair Form</h3>
    <h4>Contact us today, and get reply with in 24 hours!</h4>
    <fieldset>
      <input name="Name" type="text" autofocus required id="Name" placeholder="Your name" tabindex="1">
    </fieldset>
     <fieldset>
      <input name="OrganisationName" type="text" autofocus required id="OrganisationName" placeholder=" Your Organisation Name" tabindex="1">
    </fieldset>
    <fieldset>
      <p>
        <input name="Email1" type="email" autofocus required id="Email1" placeholder="Your Email Address" tabindex="2">
      </p>
      <p class="underfield"><em style="font-size: 10px">please provide your email address to better assist you.</em></p>
    </fieldset>
     <fieldset>
      <input name="Email2" type="email" autofocus required id="Email2" placeholder=" Verify Your Email Address" tabindex="2">
    </fieldset>
    <fieldset>
      <input name="Phone" type="tel" autofocus required id="Phone" placeholder="Your Phone Number" tabindex="3" maxlength="12">
    </fieldset>
  <fieldset>
    <select name="Select" autofocus required class="container" id="Select" onchange="changeSelectValue();">
            <option selected="selected">Select</option>
            <option value="Carpet Machine">Carpet Machine</option>
            <option value="Coffee Brewer">Coffee Brewer</option>
            <option value="Floor Machine">Floor Machine</option>
            <option value="Rider Scrubber Commercial">Rider Scrubber Commercial </option>
            <option value="Rider Scrubber Industrial">Rider Scrubber Industrial</option>
            <option value="Sweeper Commercial">Sweeper Commercial</option>
            <option value="Sweeper Industrial">Sweeper Industrial</option>
            <option value="Vacuum Cleaner">Vacuum Cleaner</option>
            <option value="Water Cooler">Water Cooler</option>
            <option value="Wet / Dry">Wet / Dry</option>
            <option value="Test">Test</option>
            <!--the value has to match the php-->
      </select>
      </fieldset>
      <fieldset>
      <input name="Machinelocation" type="text" autofocus required id="Machinelocation" placeholder="Your Machine Location Address" tabindex="2">
       </fieldset>
      <p class="underfield2"> please provide the address location of the machine. city,state,zipe code</p>
    <fieldset>
      <p>
        <textarea name="Box" autofocus required id="Box" placeholder="What's wrong with your machine...?" tabindex="5"></textarea>
      </p>
    </fieldset>
    
             <fieldset>
      <input name="Number" type="text" autofocus required class="container" id="Question" placeholder="What does 5 + 5 = ?" tabindex="1">
    </fieldset>
    <fieldset>
      <p>&nbsp;        </p>
      <p>
      <input name="submit" type="submit" autofocus class="container4" id="submit" value="Send Request"></p></fieldset>

  </form>
 
  
</div>
</div>

1 个答案:

答案 0 :(得分:0)

看起来就像你定义了$ email但没有使用它。

<?php

if ($number !=10) {
    die("You are not a human! or your answer was incorrect!, Please go back and try again.");
}
else {
mail ($email1, $confirmation_subject,$msg, 'From: ' .$confirmation_sender );
mail ($email, $confirmation_subject,$msg, );
}

if(!filter_var($email1, FILTER_VALIDATE_EMAIL)) {
    die("Invalid email ($email1)");
}
if ($email1 == $email2) {
    mail ($email, $subject, $message, "from:".$from);
    header("location: siteethankyou.php");
}
else {
    echo "This ($email2) email address is different from ($email1).\n";
}

?>