perlunity.de - PERL | JAVASCRIPT | PHP | MySQL | APACHE



#!/COMMUNITY

Members: 5374
davon online: 1
weitere User: 30
Click for quality!




11.02.2012 / 18:21

Community-Member werden   |   Paßwort vergessen   |   OnlineMonitor (1) Wer ist online ... OnlineMonitor starten !
     

 

Home


PERLscripts


PHPscripts


JAVAscripts


Hilfreiches


Links2www


Newscenter


Community


Interna




Community  »  PHP: Allgemeines Forum zur Themenübersicht Themensuche Themenansicht in Thread-Modus


Beitragganz simples Mailform - Providersettings?
Seitenanfang
Hallo zusammen,
habe ein simples Mailform auf Hp integriert.
ich habe provider gewechselt - war bisher bei strato und hatte da das formular über den hauseigenen mailmanager.pl gemacht aber der funktioniert eben nur bei strato...deswegen hab ich ein formular jetzt mit einem anderen script angepasst.

So, und die HP liegt bei hosteurope im Webpak M. (php vorhanden).
Es kommt auch keine fehlermeldung...wird auch alles schön geprüft, ABER es kommt keine email bei angegebender adresse an.

Hab einen Test gemacht und die exakt gleiche seite bei anderer HP in ein Webpak XXL geladen, dort geht es....sprich alles i.o.

habe die php - settings auch verglichen. hmm...mir fällt nix mehr ein.

hab ich irgendwas vergessen?? das paket wurde neu eröffnet - muß man irgendwas noch aktivieren, deaktivieren, etc??

hier das script...kann mir 0 vorstellen, das dafür besondere settings notwendig wären.

besten dank für hinweise...
stefanie

[PHP]<?php
/***********************************************************
* MAILFORMULAR-SCRIPT © BY DANIEL RATHJEN *
* Dieses Script darf frei verändert und weitergegeben *
* sowie auf jeder beliebigen Webseite eingesetzt werden, *
* solange dieser Copyright-Hinweis unverändert bleibt. *
* *
* webmaster@chaosonline.de *
* http://www.chaosonline.de *
***********************************************************/

/**********************************************************************************
* Version: 1.1 - 08.11.2006 *
* *
* Änderungen gegenüber Version 1.0: *
* - Sicherheitslücke beim Mailversand behoben *
* - Darstellung von Umlauten und Sonderzeichen in der Mail korrigiert *
* - Backslashes (\) vor Sonderzeichen in der Mail entfernt *
* (kompatibel zu "magic_quotes_gpc" on und off) *
* - Unsauberkeit im PHP-Code behoben *
* - mehrere Mailempfänger ermöglicht *
**********************************************************************************/

/****** CONFIGURATION ***********************/
error_reporting(E_ALL);

$contact_url = 'kontakt.php'; // URL zum Kontaktformular
$header = ''; // Header-Datei
$footer = ''; // Footer-Datei
$recipients = array( // Adressen, an die die Mail geschickt wird
'stefanie@s-lounge.com', // (beliebig viele möglich)
'stefanie.heid@web.de', // Achtung: Kein Komma hinter letztem
'amsl_55@hotmail.com' // Eintrag!
);
$subject_pre = 'Anfrage via Website: '; // Präfix für den Mailbetreff
$req_name = TRUE; // Name Pflichtangabe? TRUE oder FALSE
$req_email = TRUE; // E-Mail Pflichtangabe? TRUE oder FALSE
$req_subject = TRUE; // Betreff Pflichtangabe? TRUE oder FALSE
$error_msg = 'Bitte alle Pflichtfelder korrekt ausfüllen!'; // Fehlermeldung bei fehlenden Angaben
$success_msg = 'Nachricht erfolgreich verschickt! Wir werden uns in Kürze mit einem Angebot zurück melden'; // Erfolgsmeldung nach Versand
/****** END OF CONFIGURATION ****************/

function encode_iso88591($string) {
$text = '=?iso-8859-1?q?';

for($i=0; $i<strlen($string); $i++) {
$val = ord($string[$i]);
if($val > 127 or $val == 63) {
$val = dechex($val);
$text .= '='.$val;
}
else {
$text .= $string[$i];
}
}
$text .= '?=';

return $text;
}

$name = $email = $subject = $text = '';
$failed_name = $failed_email = $failed_subject = $failed_text = FALSE;
$failed = $success = FALSE;

if (!empty($_POST['send'])) {
if (get_magic_quotes_gpc()) {
foreach ($_POST as $key=>$val) {
$_POST[$key] = stripslashes($val);
}
}

if (!empty($_POST['name'])) {
$name = $_POST['name'];
}
elseif ($req_name) $failed = $failed_name = TRUE;

if (!empty($_POST['email'])) {
$email = $_POST['email'];

// Prüfung, ob die Mailadresse gültig ist
if (!preg_match('/^[\w\.\-]+@[\w\.\-]{2,}\.[a-zA-Z]{2,}$/',$email)) $failed = $failed_email = TRUE;
}
elseif ($req_email) $failed = $failed_email = TRUE;

if (!empty($_POST['subject'])) {
$subject = $_POST['subject'];
}
elseif ($req_subject) $failed = $failed_subject = TRUE;

if (!empty($_POST['text'])) {
$text = $_POST['text'];
}
else $failed = $failed_text = TRUE;

// Mailversand
if (!$failed) {
foreach ($recipients as $recipient) {
mail($recipient,encode_iso88591($subject_pre.$subject),'Name: '.$name."\nE-Mail: ".$email."\n\n".$text,'From: '.$email."\r\nReply-To: ".$email."\r\nX-Mailer: PHP/".phpversion()."\r\nMIME-version: 1.0\r\nContent-type: text/plain; charset=ISO-8859-1\r\nContent-Transfer-Encoding: 8BIT\r\n");
}
$success = TRUE;
$name = $email = $subject = $text = '';
}
}

/********************************* OUTPUT ***********************/

if ($header!='') include($header);
if ($success) echo '<p style="text-align:center;color:#008000;">'.$success_msg.'</p>';
elseif ($failed) echo '<p style="text-align:center;color:#FF0000;">'.$error_msg.'</p>';

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

<meta name="author" content="stefanie heid, stefanie@s-lounge.com">
<meta name="description" content="Gasthof zur Post in Egloffstein. Erleben Sie die fränkische Schweiz in all Ihrer Schönheit. Eine gut bürgerliche Küche mit mancherlei Spezialitäten erwarten Sie. Für Tagungen und Familienfeiern sind wir der richtige Ansprechpartner. Frau Erika Heid 09197/555">
<meta name="keywords" content="Hotel, Gasthof zur Post, Erika Heid, Essen, Trinken, Tagung, Klettern, Fahrrad, Wandern ohne Gepäck, Bett and Bike, Fränkische Schweiz, Kurort, Erholung, Schwimmbad, Übernachtung, Messe, Nü rnberg">

<title>Gasthof zur Post in Egloffstein</title>
<link href="../post.css" rel="stylesheet" type="text/css" media="all">
<csactions>
<csaction name="BE85948F2" class="Open Window" type="onevent" val0="wegskizze.html" val1="_blank" val2="600" val3="600" val4="true" val5="false" val6="false" val7="false" val8="false" val9="false" val10="false" urlparams="1"></csaction>
</csactions>
<csscriptdict import>
</csscriptdict>
<script type="text/javascript" src="file:///Users/steffal/Library/Preferences/Adobe/GoLive/Settings7/JScripts/GlobalScripts/CSScriptLib.js"></script>

</head>

<body bgcolor="#750000">
<table width="786" cellspacing="0" cellpadding="0" align="center" bgcolor="#efeec7" height="577" border="0">
<tr height="20">
<td colspan="3" bgcolor="#750000" height="20" align="right">
<a href="../impressum.php" onMouseOver="window.status='Impressum : Stefanie Heid';
return true"; onMouseOut="window.status='';return true">
 <font size="-3" color="#efeec7" face="Verdana, Arial, Helvetica,
sans-serif">[ impressum ]</font></a>
</td>
</tr>
<tr height="30">
<td class="rand" rowspan="2" align="center" valign="middle" bgcolor="#750000" width="120" height="120">
<p class="links"><img src="../bilder/wappen.jpg" alt="wappen familie heid" height="90" width="90" border="0"></p>
</td>
<td class="rand" rowspan="2" colspan="2" align="right" valign="bottom" bgcolor="#750000" width="666" height="120" background="../bilder/postname3.jpg">
<div align="center">
<table width="547" border="0" align="left" height="70">
<tr height="35">
<td valign="middle" width="20" height="35"></td>
<td valign="bottom" width="116" height="35">
<p class="links"><font color="#727272"><a href="../index.php"
onMouseOver="window.status='aktuell im Hause Heid';
return true"; onMouseOut="window.status='';return true"> Home</a></font></p>
</td>
<td valign="bottom" width="150" height="35">
<p class="links"><font color="#737373"><a href="../gastro.php"
onMouseOver="window.status='Besuchen Sie unsere gemütlichen Gasträume';
return true"; onMouseOut="window.status='';return true">Gastronomie</a></font></p>
</td>
<td valign="bottom" width="150" height="35">
<p class="links"><font color="#750000"><a href="../unterkunft.php"
onMouseOver="window.status='Unsere Unterkunft bietet behaglichen Komfort';
return true"; onMouseOut="window.status='';return true">Unterkunft</a></font></p>
</td>
<td valign="bottom" width="101" height="35">
<p class="links"> <font color="#737373"><a href="../tagung.php"
onMouseOver="window.status='erfolgreich tagen im Gasthaus zu Post';
return true"; onMouseOut="window.status='';return true"> Tagung</a></font></p>
</td>
</tr>
<tr height="35">
<td width="20" height="35"></td>
<td valign="bottom" width="116" height="35">
<p class="links"> <a href="../arrangement.php"
onMouseOver="window.status='Verwöhnwochenende in unserem Haus';
return true"; onMouseOut="window.status='';return true">Arrangement</a></p>
</td>
<td valign="bottom" width="150" height="35">
<p class="links"><a href="../aktiv.php"
onMouseOver="window.status='aktiv in Egloffstein';
return true"; onMouseOut="window.status='';return true">Aktivitäten </a></p>
</td>
<td valign="bottom" width="150" height="35">
<p class="links"><a href="../schweiz.php"
onMouseOver="window.status='erleben Sie die romantische fränkische Schweiz';
return true"; onMouseOut="window.status='';return true">Fränkische Schweiz</a></p>
</td>
<td valign="bottom" width="101" height="35">
<p class="links"> <font color="#750000"> Kontakt</font></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr height="90">

</tr>
<tr height="6">
<td colspan="3" width="906" height="9">
<hr noshade>
</td>
</tr>
<tr height="10">
<td rowspan="7" colspan="2" width="620" height="400">
<table width="620" border="0" cellspacing="0" cellpadding="0" cool gridx="16" gridy="16" height="380" showgridx usegridx usegridy>
<tr height="16">
<td width="619" height="16" colspan="4"></td>
<td width="1" height="16"><spacer type="block" width="1" height="16"></td>
</tr>
<tr height="48">
<td width="16" height="363" rowspan="2"> </td>
<td content csheight="22" width="320" height="48" valign="top" xpos="16">
<p class="normtext"><font size="4">[ kontakt und wegbeschreibung ]</font></p>
</td>
<td width="283" height="48" colspan="2"></td>
<td width="1" height="48"><spacer type="block" width="1" height="48"></td>
</tr>
<tr height="315">
<td cslocked content csheight="304" width="592" height="315" colspan="2" valign="top" xpos="16">


<form action="<?=$contact_url;?>" method="POST">



<table width="569" border="0" cellspacing="0" cellpadding="0" height="236">
<tr height="38">
<td height="38">
<p class="normtext"><?=($req_name?'*':'');?>Name:</p>

</td>
<td height="38">
<p class="normtext"><input type="Text" name="name" value="<?=$name;?>" size="30" maxlength="30" /></p>
</td>
<td width="70" height="38"> </td>
<td rowspan="6">
<p class="normtext"><font size="3" face="Georgia, Times New Roman, Times, serif">Gasthof zur Post</font></p>
<p class="normtext">Frau Erika Heid</p>
<p class="normtext">Talstraße 8</p>
<p class="normtext">91349 Egloffstein</p>
<p class="normtext">Tel. 0049 9197 555</p>
<p class="normtext">Fax. 0049 9197 8801</p>
<p class="normtext"><a href="mailto:info@gasthofzurpost-egloffstein.de?body=Guten%20Tag%20Frau%20Heid,">info@gasthofzurpost-egloffstein.de</a></p>
<p class="normtext"> </p>
<p class="normtext"><a href="#" onClick="window.open('wegskizze.html','wegbeschreibung','width=600,height=600,scrollbars=no,resizeable=no,status=no');">der Weg zur Post</a></p>
</td>
</tr>

<tr height="38">
<td height="38">
<div align="right">
<p class="normtext"><?=($req_email?'*':'');?>E-Mail:*</p>
</div>
</td>
<td height="38"><input type="Text" name="email" value="<?=$email;?>" size="30" maxlength="80" /></td>
<td width="70" height="38"> </td>
</tr>
<tr height="38">
<td height="38">
<div align="right">
<p class="normtext"><?=($req_subject?'*':'');?>Betreff:</p>
</div>
</td>
<td height="38"><input type="Text" name="subject" value="<?=$subject;?>" size="30" maxlength="30" /></td>
<td width="70" height="38"> </td>
</tr>
<tr>
<td valign="top">
<p class="normtext">*Nachricht:</p>
</td>
<td valign="top"><textarea name="text" cols="30" rows="10" wrap="soft"><?=$text;?></textarea></td>
<td width="70"> </td>
</tr>
<tr height="30">
<td height="30">
<p class="normtext">
</p> </td>
<td height="30"> <input type="Submit" value="Abschicken" />
   
<input type="Reset" value="Zurücksetzen" /></td>
<td width="70" height="30"> </td>
</tr>

</table>
<input type="Hidden" name="send" value="1" />
</form>


</td>
<td width="11" height="315"></td>
<td width="1" height="315"><spacer type="block" width="1" height="315"></td>
</tr>
<tr height="1" cntrlrow>
<td width="16" height="1"><spacer type="block" width="16" height="1"> </td>
<td width="320" height="1"><spacer type="block" width="320" height="1"> </td>
<td width="272" height="1"><spacer type="block" width="272" height="1"> </td>
<td width="11" height="1"><spacer type="block" width="11" height="1"> </td>
<td width="1" height="1"> </td>
</tr>
</table>
</td>
<td bgcolor="#750000" width="166" height="10"></td>
</tr>
<tr height="120">
<td class="rand" width="166" height="120" align="right"><img src="../bilder/zettel.jpg" alt="hotel post" height="112" width="160" border="0"></td>
</tr>
<tr height="10">
<td bgcolor="#750000" width="166" height="10"></td>
</tr>
<tr height="120">
<td class="rand" width="166" height="120" align="right"><img src="../bilder/fuesse.jpg" alt="halle" height="112" width="160" border="0"></td>
</tr>
<tr height="10">
<td bgcolor="#750000" width="166" height="10"></td>
</tr>
<tr height="120">
<td class="rand" width="166" height="120" align="right"><img src="../bilder/haus.jpg" alt="tafel" height="112" width="160" border="0"></td>
</tr>
<tr height="10">
<td bgcolor="#750000" width="166" height="10"></td>
</tr>
<tr valign="middle" height="30">
<td align="center" width="120" height="30"> 
</td>
<td width="500" height="30" align="center" bgcolor="#e0dfa3" class="rand">  </td>
<td class="rand" align="center" width="166" height="30">
<div align="right">
<font size="-3" color="#727272" face="Verdana, Arial, Helvetica, sans-serif">© 2005 by s. heid  </font></div><div align="left">
<font size="-4" color="#727272" face="Verdana, Arial, Helvetica, sans-serif">Stand: 15.April 2005</font></div>
</td>
</tr>
</table>
</body>

</html>

<?php
if ($footer!='') include($footer);
?>

[/PHP]

Datum: 02.08.2007-10:50

Beitragre: ganz simples Mailform - Providersettings?
Seitenanfang
HostEurope verlangt einen zusätzlichen Parameter im mail(); Befehl zu Spamschutzzwecken.
Am besten Du liest Dir mal die FAQ von HE durch.

Datum: 03.08.2007-11:36

-






-
-