'') { $to = 'kregan@adcetera.com'; $from = $_POST["txtFirstName"].' '.$_POST["txtLastName"].' <'."noreply@axip.com".'>'; $subject = 'AXIP Contact-Us Form Submission'; $MESSAGE_BODY = "Name: ".$_POST["txtFirstName"].' '.$_POST["txtLastName"]."\n"; if(isset($_POST["txtCompany"])) { $MESSAGE_BODY .= "Company: ".$_POST["txtCompany"]."\n"; } if(isset($_POST["txtPhone"])) { $MESSAGE_BODY .= "Phone: ".$_POST["txtPhone"]."\n"; } if(isset($_POST["txtEmail"])) { $MESSAGE_BODY .= "Email: ".$_POST["txtEmail"]."\n"; } $MESSAGE_BODY .= "Comments: ".$_POST["txtComments"]."\n"; $success = mg_send($to, $subject, $MESSAGE_BODY); function mg_send($to, $subject, $message) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, 'api:key-4cta6lgzugsewx6a2f1bkajtglrtv306'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $plain = strip_tags(br2nl($message)); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_URL, 'https://api.mailgun.net/v2/axip.com/messages'); curl_setopt($ch, CURLOPT_POSTFIELDS, array('from' => 'support@axip.com', 'to' => $to, 'subject' => $subject, 'html' => $message, 'text' => $plain)); $j = json_decode(curl_exec($ch)); $info = curl_getinfo($ch); if($info['http_code'] != 200) error("Fel 313: Vänligen meddela detta via E-post till support@axip.com"); curl_close($ch); return $j; } /*$ch = curl_init(); curl_setopt ($ch, CURLOPT_USERPWD, "api:" . "key-4cta6lgzugsewx6a2f1bkajtglrtv306"); curl_setopt($ch, CURLOPT_URL," https://api.mailgun.net/v3/axip.com/messages"); $params = 'from='.urlencode($from).'&to='.urlencode($to); $params .= '&subject='.urlencode($subject); $params .= '&text='.urlencode($MESSAGE_BODY); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_HEADER, false); // in real life you should use something like: // curl_setopt($ch, CURLOPT_POSTFIELDS, // http_build_query(array('postvar1' => 'value1'))); // receive server response ... curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); try { $server_output = curl_exec ($ch); $success = "We received your information, thanks!"; } catch (Exception $e) { $success = 'Error: '.$e->getMessage(); } curl_close ($ch); // Send email through Mailgun (configured through Rackspace cloud settings) /*require_once 'Mailgun.php'; // PHP wrapper for Mailgun API try { mailgun_init('key-4cta6lgzugsewx6a2f1bkajtglrtv306'); // Mailgun API Key MailgunMessage::send_text($from, $to, $subject, $MESSAGE_BODY); // Send as plain text message $success = "We received your information, thanks!"; } catch (Exception $e) { $success = 'Error: '.$e->getMessage(); }*/ } ?>

Contact Us

Axip Energy Services has the personnel and service expertise to design and implement comprehensive solutions for oil and gas operators. Fill out the form below or contact us by phone today to learn how Axip can optimize your performance with contract and producer service solutions tailored to meet each project's unique requirements.

'.$success.'

'; echo ''; } ?>

Please correct the highlighted fields below.

Axip Energy Services

1301 McKinney, Suite 900
Fulbright Tower
Houston, TX 77010

Phone: 832.294.6500