Arctic Tails, LLC New Customer Grooming Request

Error/Status message is displayed below Submit button

* Required

Owner Information

We will call you to set up an appointment, confirm prices, etc.

Pet Information

Male

Female

Yes

No

Grooming Information

Daycare

Boarding

Neither

Full Groom

Bath

Nails

Scent Glands

Mini Groom

Ear Cleaning

Teeth Cleaning

"; $name=$_POST['name']; $message .= "Name:" . $name; $message .= "
"; $address=$_POST['address']; $message .= "Address:" . $address; $message .= "
"; $phone=$_POST['phone']; $message .= "Phone:" . $phone; $message .= "
"; $message .= "On our web page we tell the customer we will call them: " . $phone . ""; $message .= "
"; $email=$_POST['email']; $message .= "Email:" . $email; $message .= "
"; $message .= "*****Pet Information*****"; $message .= "
"; $petName=$_POST['petName']; $message .= "Pet Name:" . $petName; $message .= "
"; $breed=$_POST['breed']; $message .= "Breed:" . $breed; $message .= "
"; $color=$_POST['color']; $message .= "Color:" . $color; $message .= "
"; $gender=$_POST['gender']; $message .= "Gender:" . $gender; $message .= "
"; $birthDate=$_POST['birthDate']; $message .= "Birth Date:" . $birthDate; $message .= "
"; $veterinarian=$_POST['veterinarian']; $message .= "Veterinarian:" . $veterinarian; $message .= "
"; $spayedNeutered=$_POST['spayedNeutered']; $message .= "Spayed or Neutered:" . $spayedNeutered; $message .= "
"; $message .= "*****Grooming Information*****"; $message .= "
"; $daycareBoarding=$_POST['daycareBoarding']; $message .= "Here for daycare/boarding?:" . $daycareBoarding; $message .= "
"; foreach($_POST['groomingService'] as $groomingServiceArray) { if ($groomingServiceArray<>"") { $message .= "Grooming service:" . $groomingServiceArray; $message .= "
"; } } $addlInfo=$_POST['addlInfo']; $message .= "Addl Info:" . $addlInfo; $subject="New Customer Grooming Request"; $from = new SendGrid\Email($name, $email); $to = new SendGrid\Email("Arctic Tails", "arctictails.info@gmail.com"); // $to = new SendGrid\Email("Arctic Tails", "w.soon800@gmail.com"); $content = new SendGrid\Content("text/html", $message); $mail = new SendGrid\Mail($from, $subject, $to, $content); $apiKey = "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"; $sg = new \SendGrid($apiKey); $response = $sg->client->mail()->send()->post($mail); if ($response->statusCode()=="202") { echo "Email sent!"; } else { echo "Email failed. Please try again."; } } ?>