+27 68 732 8637 info@samangileenergysol.co.za 20067 Sebokeng Unit 14, 1983
Samangile logo

SAMANGILEENERGY SOLUTIONS (PTY) LTD

Powering innovation. Engineering the Future.
Request a Quote

ENGINEERING EXCELLENCE. FABRICATION PRECISION. ENERGY SOLUTIONS.

Samangile Energy Solutions delivers professional engineering, fabrication, electrical, automation and renewable energy solutions across South Africa. We combine technical expertise with innovative technology to deliver reliable, safe and cost-effective results.

Chat on WhatsApp Call Us Now

OUR SERVICES

Electrical Installations
Solar & Backup Power
Industrial Maintenance
Automation & IoT Solutions
Engineering Consulting
Structural Steel Fabrication
Project Management
Health, Safety & Compliance

What We Do

Our Services

Structural Fabrication

Custom steel structures, gates, and industrial frameworks fabricated to spec, from design through on-site installation.

Solar & Backup Power

Grid-tied and off-grid solar installations with battery backup, sized to your household or business load profile.

Electrical Installations

Certified electrical wiring, distribution boards, and compliance-ready installations for residential and industrial sites.

Industrial Maintenance

Scheduled and emergency maintenance for plant equipment, keeping downtime low and operations running safely.

Automation & IoT Solutions

Remote monitoring, GPS fleet tracking via TrackSureSA, and automated systems that give you real-time visibility.

Engineering Consulting

Technical advisory on project feasibility, structural design, and energy systems from a Red Seal-qualified team.

Project Management

End-to-end oversight from planning to handover, keeping projects on budget, on schedule, and on spec.

Health, Safety & Compliance

Site safety audits and compliance support, ensuring every project meets industry and regulatory standards.

FEATURED PROJECTS

View All Projects
Custom Steel Gazebo

Fabrication of circular gazebo with steel seating.

Sebokeng, Gauteng
Decorative Steel Bench

Custom designed steel bench with powder coating.

Sebokeng, Gauteng
Static Screening Machine

Design and fabrication of manual screening machine.

Mining Industry
Structural Steel Fabrication

Heavy-duty structural steel fabrication and welding.

Industrial Project
Steel Gate & Fencing

Custom steel gate with decorative design and finishing.

Residential Project
Mining Platform

Fabrication and installation of mining access platform.

Mining Industry

WHY CHOOSE US

Qualified Professionals

Skilled team with industry experience and expertise.

Safety First Approach

We prioritize safety in every project we undertake.

Quality Workmanship

High quality materials and precision workmanship.

Competitive Pricing

Cost-effective solutions without compromising quality.

Reliable Support

Dedicated support before, during and after project.

Innovative Solutions

Modern technology and smart engineering.

ABOUT SAMANGILE ENERGY SOLUTIONS

Samangile Energy Solutions (Pty) Ltd is a South African engineering and fabrication company committed to delivering innovative, reliable and sustainable solutions. We specialize in structural fabrication, mechanical design, electrical installations, renewable energy and industrial maintenance.

Learn More About Us
Get In Touch

REQUEST A FREE QUOTE

Tell us about your project and we'll get back to you within 24 hours.

Call Us
+27 68 732 8637
Visit Us
20067 Sebokeng Unit 14, 1983
// netlify/functions/contact.js // // Handles POST requests from the website contact form. // Validates input, then sends an email via Resend. // // Required environment variable (set in Netlify dashboard, NOT in code): // RESEND_API_KEY - your Resend API key (starts with "re_") // // Optional environment variables: // CONTACT_FROM_EMAIL - verified sender, e.g. "Samangile Website " // Defaults to Resend's test sender if not set (only works for testing). // CONTACT_TO_EMAIL - where submissions should be delivered, e.g. "info@samangileenergysol.co.za" const { Resend } = require("resend"); const resend = new Resend(process.env.RESEND_API_KEY); const FROM_EMAIL = process.env.CONTACT_FROM_EMAIL || "Samangile Website "; const TO_EMAIL = process.env.CONTACT_TO_EMAIL || "info@samangileenergysol.co.za"; // Basic email format check (not exhaustive, just catches obvious mistakes) const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; exports.handler = async function (event) { // CORS headers so the form can be submitted from the live site const headers = { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "Content-Type", "Access-Control-Allow-Methods": "POST, OPTIONS", }; // Browsers send a preflight OPTIONS request before POST — just acknowledge it if (event.httpMethod === "OPTIONS") { return { statusCode: 204, headers, body: "" }; } if (event.httpMethod !== "POST") { return { statusCode: 405, headers, body: JSON.stringify({ error: "Method not allowed" }), }; } let data; try { data = JSON.parse(event.body); } catch (err) { return { statusCode: 400, headers, body: JSON.stringify({ error: "Invalid request body" }), }; } const name = (data.name || "").trim(); const email = (data.email || "").trim(); const phone = (data.phone || "").trim(); const message = (data.message || "").trim(); // Honeypot field — if a bot fills this hidden field, silently pretend success if (data["bot-field"]) { return { statusCode: 200, headers, body: JSON.stringify({ success: true }) }; } // Validation const errors = []; if (!name) errors.push("Name is required"); if (!email) errors.push("Email is required"); else if (!EMAIL_REGEX.test(email)) errors.push("Email address is not valid"); if (!message) errors.push("Message is required"); if (errors.length > 0) { return { statusCode: 400, headers, body: JSON.stringify({ error: errors.join(", ") }), }; } // Build the email body const htmlBody = `

New contact form submission

Name: ${escapeHtml(name)}

Email: ${escapeHtml(email)}

${phone ? `

Phone: ${escapeHtml(phone)}

` : ""}

Message:

${escapeHtml(message).replace(/\n/g, "
")}


Sent from the Samangile Energy Solutions website contact form.

`; try { const { error } = await resend.emails.send({ from: FROM_EMAIL, to: [TO_EMAIL], replyTo: email, subject: `New website enquiry from ${name}`, html: htmlBody, }); if (error) { console.error("Resend error:", error); return { statusCode: 502, headers, body: JSON.stringify({ error: "Failed to send email. Please try again later." }), }; } return { statusCode: 200, headers, body: JSON.stringify({ success: true }), }; } catch (err) { console.error("Unexpected error:", err); return { statusCode: 500, headers, body: JSON.stringify({ error: "Something went wrong. Please try again later." }), }; } }; // Prevent HTML injection from form fields into the email body function escapeHtml(str) { return String(str) .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); }