HexaHost.de wurde von mir, Samuel Müller, mit der Vision gegründet, zuverlässiges - und preiswertes Hosting und IT-Lösungen direkt aus Deutschland anzubieten. Als regionales + und preiswertes Hosting und IT-Lösungen direkt aus Bayern anzubieten. Als regionales Unternehmen aus Niederbayern verstehe ich die Bedürfnisse meiner Kunden - und bieten persönlichen Support. + und biete persönlichen Support.
Meine Expertise liegt in der Bereitstellung moderner Hosting- und IT-Lösungen diff --git a/public/composer.json b/public/composer.json deleted file mode 100644 index e5a0ee9..0000000 --- a/public/composer.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "hexahost/contact-form", - "description": "HexaHost.de Contact Form with PHPMailer", - "type": "project", - "require": { - "phpmailer/phpmailer": "^6.8" - }, - "autoload": { - "psr-4": { - "HexaHost\\": "src/" - } - }, - "config": { - "optimize-autoloader": true, - "sort-packages": true - }, - "minimum-stability": "stable", - "prefer-stable": true -} \ No newline at end of file diff --git a/public/contact-handler.php b/public/contact-handler.php index abb9eae..732e3f5 100644 --- a/public/contact-handler.php +++ b/public/contact-handler.php @@ -1,18 +1,13 @@ isSMTP(); - $mail->Host = $config['smtp_host']; - $mail->SMTPAuth = true; - $mail->Username = $config['smtp_username']; - $mail->Password = $config['smtp_password']; - $mail->SMTPSecure = $config['smtp_encryption']; - $mail->Port = $config['smtp_port']; - $mail->CharSet = 'UTF-8'; - - $mail->setFrom($config['from_email'], $config['from_name']); - $mail->addReplyTo( - sanitizeHeaderValue($data['email']), - sanitizeHeaderValue($data['firstName'] . ' ' . $data['lastName']) - ); - $mail->addAddress($config['to_email'], $config['to_name']); - - $subject = getSubjectLabel($data['subject']); - $mail->Subject = '[HexaHost.de] ' . $subject; - - $mail->isHTML(true); - $mail->Body = generateEmailHTML($data); - $mail->AltBody = generateEmailText($data); - - $mail->addCustomHeader('X-Mailer', 'HexaHost Contact Form'); - $mail->addCustomHeader('X-Priority', '3'); - $mail->addCustomHeader('X-MSMail-Priority', 'Normal'); - $mail->addCustomHeader('Importance', 'Normal'); - $mail->addCustomHeader('X-Report-Abuse', 'Please report abuse here: abuse@hexahost.de'); - - $mail->send(); - return true; - } catch (Exception $e) { - error_log('HexaHost Contact Form Error: ' . $e->getMessage()); - return false; - } -} - -function sendEmailNative($data) { - global $config; - $subject = '[HexaHost.de] ' . getSubjectLabel($data['subject']); $replyName = sanitizeHeaderValue($data['firstName'] . ' ' . $data['lastName']); $replyEmail = sanitizeHeaderValue($data['email']); @@ -165,6 +113,7 @@ function sendEmailNative($data) { 'X-Report-Abuse: Please report abuse here: abuse@hexahost.de', ]; + // Native PHP Mailversand ohne externe Libraries return mail($config['to_email'], $subject, generateEmailHTML($data), implode("\r\n", $headers)); }