Also hier ist das Validierungs script:
PHP
<?php
function tep_validate_email($email) {
$email = trim($email);
if ( strlen($email) > 255 ) {
$valid_address = false;
} elseif ( function_exists('filter_var') && defined('FILTER_VALIDATE_EMAIL') ) {
$valid_address = (bool)filter_var($email, FILTER_VALIDATE_EMAIL);
} else {
if ( substr_count( $email, '@' ) > 1 ) {
$valid_address = false;
}
//if ( preg_match("/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i", $email) ) {
if ( preg_match("/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?!hotmail|live|outlook)(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i", $email) ) {
$valid_address = true;
} else {
$valid_address = false;
}
}
if ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') {
$domain = explode('@', $email);
if ( !checkdnsrr($domain[1], "MX") && !checkdnsrr($domain[1], "A") ) {
$valid_address = false;
}
}
return $valid_address;
}
?>
Alles anzeigen
Und hier ist das Mailformular auf der Seite:
PHP
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
https://beispiel.rocks/beispiel.rocks/www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) {
$error = false;
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
if (!tep_validate_email($email_address)) {
$error = true;
$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
$actionRecorder = new actionRecorder('ar_contact_us', (tep_session_is_registered('customer_id') ? $customer_id : null), $name);
if (!$actionRecorder->canPerform()) {
$error = true;
$actionRecorder->record(false);
$messageStack->add('contact', sprintf(ERROR_ACTION_RECORDER, (defined('MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES') ? (int)MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES : 5)));
}
if ($error == false) {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);
$actionRecorder->record();
tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
}
}
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
require(DIR_WS_INCLUDES . 'template_top_seiten.php');
?>
<div class="page-header">
<h1><?php echo HEADING_TITLE; ?></h1>
</div>
<?php
if ($messageStack->size('contact') > 0) {
echo $messageStack->output('contact');
}
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
<div class="contentContainer">
<div class="contentText">
<div class="alert alert-info"><?php echo TEXT_SUCCESS; ?></div>
</div>
<div class="pull-right">
<?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', tep_href_link(FILENAME_DEFAULT)); ?>
</div>
</div>
<?php
} else {
?>
<script type="text/javascript">
function checkForm(form)
{
if(!form.terms.checked) {
alert("Lt. § 13 TMG sind wir verpflichtet, Ihnen unsere Datenschutzbestimmungen zu § 13 TMG zu zeigen und verständlich zu erläutern, bevor Sie dieses Formular absenden können. Lesen Sie bitte unsere Datenschutzbestimmungen (über dem "Daten absenden"-Button erreichbar) oder klicken Sie einfach die Checkbox an.");
form.terms.focus();
return false;
}
return true;
}
</script>
<?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', 'class="form-horizontal" onsubmit="return checkForm(this);"', true); ?>
<div class="contentContainer">
<div class="contentText">
<p class="inputRequirement text-right"><?php echo FORM_REQUIRED_INFORMATION; ?></p>
<div class="clearfix"></div>
<div class="form-group has-feedback">
<label for="inputFromName" class="control-label col-sm-3"><?php echo ENTRY_NAME; ?></label>
<div class="col-sm-9">
<?php
echo tep_draw_input_field('name', NULL, 'required autofocus="autofocus" aria-required="true" id="inputFromName" placeholder="' . ENTRY_NAME . '"');
echo FORM_REQUIRED_INPUT;
?>
</div>
</div>
<div class="form-group has-feedback">
<label for="inputFromEmail" class="control-label col-sm-3"><?php echo ENTRY_EMAIL; ?></label>
<div class="col-sm-9">
<?php
echo tep_draw_input_field('email', NULL, 'required aria-required="true" id="inputFromEmail" placeholder="' . ENTRY_EMAIL2 . '"', 'email');
echo FORM_REQUIRED_INPUT;
?>
</div>
</div>
<div class="form-group has-feedback">
<label for="inputEnquiry" class="control-label col-sm-3"><?php echo ENTRY_ENQUIRY; ?></label>
<div class="col-sm-9">
<?php
echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, NULL, 'required aria-required="true" id="inputEnquiry" placeholder="' . ENTRY_ENQUIRY . '"');
echo FORM_REQUIRED_INPUT;
?>
</div>
</div>
</div>
<div class="buttonSet">
<div class="text-right"><div>
<input type="checkbox" name="terms" /> Ich habe die <a href="datenschutz.php#tmg13" target="_blank">Datenschutzbestimmungen</a> gelesen und stimme zu.
</div></div>
<div class="text-right"><input type="submit" />
<?php //echo tep_draw_button(IMAGE_BUTTON_SEND, 'glyphicon glyphicon-send', null, 'primary', null, 'btn-success'); ?></div>
</div>
</div>
</form>
<div class="clearfix"></div>
<div class="col-sm-12"><?php echo CONTACT_TEXT; ?></div>
<?php
}
require(DIR_WS_INCLUDES . 'template_bottom.php');
require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
Alles anzeigen
Ich finde es halt irritierend, das ich scheinbar der einzige osC-Benutzer bin, der das Problemchen hat und das noch nie jemand anderer maildomains ausschließen wollte und es nicht auf meine Art geschafft hat.
Dieses hotmail, live, outlook-Problem habe ja nicht nur ich alleine^^
Ich habe auch die infragekommenden Dateien, die beim Versand von mails mitspielen alle mit den Originaldateien verglichen und die waren bis auf mein selbst eingebautes Checkfield zum Datenschutz identisch.
Das Checkfiels und das dazugehörige JS hab ich auch schon testweise wieder gelöscht - hat aber auch nichts bewirkt.