<?php

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require_once "PHPMailer/src/PHPMailer.php";
require_once "PHPMailer/src/SMTP.php";
require_once "PHPMailer/src/Exception.php";

$mail = new PHPMailer(true);

//Enable SMTP debugging.
$mail->SMTPDebug = 0; //0 or 2 

//Set PHPMailer to use SMTP.
$mail->isSMTP();

//Set SMTP host name                          
$mail->Host = "smtpout.secureserver.net";

//Set this to true if SMTP host requires authentication to send email
$mail->SMTPAuth = true;

$mail->SMTPOptions = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
    )
);

//Provide username and password     
$mail->Username = "dr.sudhirgupta@carencure.co.in";
$mail->Password = "Carencure#121";

//If SMTP requires TLS encryption then set it
$mail->SMTPSecure = "tls";

//Set TCP port to connect to
$mail->Port = 587;

$mail->From = "dr.sudhirgupta@carencure.co.in";
$mail->FromName = "Carencure.co.in";

$mail->addAddress("dr.sudhirgupta@carencure.co.in", "Sudhir Gupta");

$mail->isHTML(true);
$mail->Subject = "Questionnaire Form details";

$message = "
<table>
Questionnaire Form details<br><br>

     Name : ".$_POST["element_0"]."<br>
     Email : ".$_POST["element_1"]."<br>
     Mobile : ".$_POST["mobile"]."<br>





 
Age:    ".$_POST["element_2"]."<br>
Sex:  ".$_POST["element_3"]."<br>  
Marital status:  ".$_POST["element_4"]."<br> 
Address:    ".$_POST["element_5"]."<br> 
Occupation/Education: ".$_POST["element_6"]."<br><br>


1.What is the location/area of complian? -> ".$_POST["element_7"]."<br>
 
2.What is the sensation or discomfort that you have? -> ".$_POST["element_8"]."<br>
 
3.Describe the origin of the problem and how it started? -> ".$_POST["element_9"]."<br>
 
4.When does the complaint increase/decrease? -> ".$_POST["element_10"]."<br>
 
5.What time or period of the day or night you feel pain or discomfort? increase? -> ".$_POST["element_11"]."<br>
 
6. Present complaint for which you have contacted us (If more than one problem is there, then state them in chronological order of their appearance) -> ".$_POST["element_12"]."<br>
 
7. Was there any cause/causes for the start of your illness?(physical, mental or emotional) ->".$_POST["element_13"]."<br><br>

 
Any gastric complaints, dust allergy, any headache you get when exposed to sunlight or any other health wise problems you are suffering along with the above complaints? ->".$_POST["element_14"]."<br>

 
Any serious ilness for which you needed hospitalization or long term treatment? ->".$_POST["element_15"]."<br>

 
 
Any previous treatment that is going on for the presenting complaint or any treatment for any 
other trouble?(Mention the name of the medicine if possible and its dosage)? ->".$_POST["element_16"]."<br>

 
Does anybody from your family members including your parents and grand parents have/had any 
health related problems like high/low blood presser, Dibetis, Arthritis, skin complaints, asthma, pneumonia, tuberculosis, cancer etc? ->".$_POST["element_17"]."<br>

 
 
(a) How is your appetite? ->".$_POST["element_18"]."<br>
   
(b) Is there a tendancy to indulge in particular kinds of foods (eg:sweet, sour foods, salty
foods, etc.) ->".$_POST["element_19"]."<br>
   
(c)Are you allergic or sensitive to any foods? ->".$_POST["element_20"]."<br>
 
 
(d) What kind of weather are you most comfortable in?(Summers, humid weather, winter) ->".$_POST["element_21"]."<br>
   
(e) Are you particularly uncomfortable in any weather or climate?   ->".$_POST["element_22"]."<br>
   
(f) Do you sweat at all? If you do, where do you sweat noticeably?(Scalp, upper lip, under arms, back, chest, etc) Under what 
circumstances?(While eating, under tension, when you physically exert yourself etc.) ->".$_POST["element_23"]."<br>
   
(g) In general do you like being out in the open air or do you feel more comfortable in closed room? ->".$_POST["element_24"]."<br>
 
 
(h) How is the quality of your sleep most of the time? (Rested and refreshed, feel tired most mornings etc.) ->".$_POST["element_25"]."<br>
 
 
(i)Any complaint during night/sleep? ->".$_POST["element_26"]."<br>
 
 
(j)How many times per day you visit latrine or pass stools? Any problem during passing stools? ->".$_POST["element_27"]."<br>
 
 
(k)How many times you pass urine per (day & night)? Any problem during passing urine? ->".$_POST["element_28"]."<br>
 
 
(l)Any habits of smoking/chewing 
tobacco/drinks? ->".$_POST["element_29"]."<br>
 
 
(m) Do you dream at all? If you do, do you remember them? What is the content? (eg:daily events, falling into space , running after a 
train , etc.) ->".$_POST["element_30"]."<br>
 
 
(n) How is your bowel habit? (Regular, constipated, diarrhea etc.) ->".$_POST["element_31"]."<br>
 
 
(o) How is your liquid intake?(Feel thirsty all the time, fairly normal etc) ->".$_POST["element_32"]."<br>
 
 
(p) How would you describe yourself?(Amiable, loner, quite social, tendancy to be very picky 
about things like cleanliness and keeping appointments etc.) ->".$_POST["element_33"]."<br>
 
 
(q) How do you react to stress and tension? (Tend to verbally expressive, tend to keep things to yourself and brood about them etc.) ->".$_POST["element_34"]."<br>
 
 

 
1. Age at onset of menstrual periods?    ->".$_POST["element_40"]."<br>
2 .Periods?(Regular/Irregular) ->".$_POST["element_41"]."<br>
 
3. Physical symptoms preceding the periods (eg:heaviness/pain in the breasts, changes in moods, changes appetite, changes in bowel habit, backache, pain in the legs, headachs, dreams etc.)?
 ->".$_POST["element_42"]."<br>
 
4. Duration and intervals between periods (eg:bleeding last for 3-5 days and the intervals between periods is 27 days?
   ->".$_POST["element_43"]."<br>
5. Are you using any contraceptive pills?
   ->".$_POST["element_44"]."<br>
6. Any discharge before /during /after periods? 
   ->".$_POST["element_45"]."<br>
7. Number of children and wheather the deliveries were normal? Any post-delivery problems? Were the children breastfed or not? Any problems during the breastfeeding 
phase? Any Abortions? Any complications after abortions? 
 
 ->".$_POST["element_46"]."<br>
8. Age of onset of menopause? ->".$_POST["element_47"]."<br>
   
9. Did the periods cease gradually or abruptly? ->".$_POST["element_48"]."<br>
   
10. Have you had any operations done in the pelvic area?  ->".$_POST["element_49"]."<br>   










</table>
";

$mail->Body = $message;

try {
    $mail->send();
    echo "<br><br><br><br><h2 align=center>Message has been sent successfully</h2>";
} catch (Exception $e) {
    echo "Mailer Error: " . $mail->ErrorInfo;
}





























?>