⚡ Request Service from A1 Home Electric ⚡

New Contact Form Submission

Name: $name

Email: $email

Phone: $phone

Message:
$message

“; $headers_admin = “MIME-Version: 1.0\r\n”; $headers_admin .= “Content-type: text/html; charset=UTF-8\r\n”; $headers_admin .= “From: contact@a1homeelectric.com\r\n”; $headers_admin .= “Reply-To: $email\r\n”; // Email to User (HTML) $subject_user = “Thanks for contacting A1 Home Electric!”; $body_user = ”

Thanks for contacting A1 Home Electric

Hi $name,

Thanks for reaching out! We’ve received your message and will get back to you shortly.


Your message:

Phone: $phone

Message:
$message


— The A1 Home Electric Team

“; $headers_user = “MIME-Version: 1.0\r\n”; $headers_user .= “Content-type: text/html; charset=UTF-8\r\n”; $headers_user .= “From: contact@a1homeelectric.com\r\n”; $headers_user .= “Reply-To: contact@a1homeelectric.com\r\n”; // Send emails $sent_admin = mail($to_admin, $subject_admin, $body_admin, $headers_admin); $sent_user = mail($email, $subject_user, $body_user, $headers_user); // === Dolibarr API Integration Using DOLAPIKEY === $api_key = “57K44tJtABby9qN2u7jDVdI0eA25DuqQ”; $api_url = “https://account.a1homeelectric.com/api/index.php/thirdparties”; // or use /leads if Leads module is active $lead_data = [ “name” => $name, “email” => $email, “phone” => $phone, “note_private” => $message ]; $headers = [ “DOLAPIKEY: $api_key”, “Content-Type: application/json” ]; $options = [ “http” => [ “method” => “POST”, “header” => implode(“\r\n”, $headers), “content” => json_encode($lead_data) ] ]; $context = stream_context_create($options); $result = file_get_contents($api_url, false, $context); // Final response to browser if ($sent_admin && $sent_user) { echo “Thank you! Your message has been sent.”; } else { http_response_code(500); echo “One or both emails failed to send.”; } ?>

Share Your Stories with the World

This platform serves as a personal space to publish thoughtful blog posts and engage readers, aiming to grow traffic and build a vibrant community.

Insights and Inspiration in Every Post

Join our community to discover fresh perspectives and exclusive content.

Blog

Explore a collection of thoughtful posts, sharing experiences and ideas to engage and motivate every visitor.

Share Your Stories and Grow Your Audience

Discover valuable tips and tools to elevate your blogging journey.

Getting Started

Master the basics to build a strong blogging foundation.

Content Creation

Uncover creative methods to craft engaging blog posts.

Audience Growth

Learn effective ways to attract and retain readers.

A Personal Blog to Inspire and Connect

Discover heartfelt stories and genuine feedback from readers who enjoy this personal blog platform.

Sharing insights that truly resonate and inspire a deeper connection with readers.

Emily R.

Creative Writer

An enriching experience that supports growth and meaningful conversations.

David K.

Digital Marketer