Ciao,
ho scovato un leggerissimo codice x inviare mail da sito e l'ho messo qui:
http://www.paoloemax.it/contattaci/contattaci.php però la mail che viene inviata ad utente parte con una BRUTTA SCRITTA che dice array.........poi di seguito il testo della mail regolare.
Vi chiedo: dato che questo array non c'è da nessuna parte nel codice, qualcuno sa come faccio a levarlo che fa poco professionale?
vabbè dai, vi giro il codice:
<? include("../sopra.html") ?>
<h1>Scrivi a Paolo e Max</h1>
Vuoi sapere qualcosa di più su Paolo e Max ?</p>
Hai qualche curiosità che il sito non ti ha levato?</p>
O semplicemente scambiare 2 parole con il duo di Cabaret?</p>
E allora che aspetti?</p>
<?php
/************************************************** ***************/
/* Program Name : SmE Form */
/* Program Version : 1.0 */
/* Program Author : Estevan Simonyi */
/* Site : http://www.scriptme.com */
/* Email : scriptme@scriptme.com */
/* */
/* Copyright (c) 2004 Scriptme.com All rights reserved. */
/* Do NOT remove any of the copyright notices in the script. */
/* This script can not be distributed or resold by anyone else */
/* than the author, unless special permisson is given. */
/* */
/************************************************** ***************/
/************************************************** *******************************
* Filename: sme_form.php
************************************************** *******************************/
// change the variables bellow
// Your email here
$email1 = "info@paoloemax.it";
// Contact formname
$sme_form_c = "Messaggio da utente";
// your site URL
$homepageurl = "Mail da Paoloemax.it";
// automatic message send to user send email
$tnk = " E-mail Arrivata.
Ti risponderemo al più presto.
Grazie.
Paolo e Max.";
// not change more anything
// not change more anything
// not change more anything
// not change more anything
// not change more anything
// not change more anything
?>
<script Language="JavaScript">
<!--
function checa_formulario(form){
if (form.Name.value == ""){
alert("Devi inserire il nome!");
form.Name.focus();
return (false);
}
if (form.sub.value == ""){
alert("Devi inserire l'oggetto del Messaggio!");
form.sub.focus();
return (false);
}
if (form.Message.value == ""){
alert("Devi inserire il Messaggio!");
form.Message.focus();
return (false);
}
if (form.Email.value.indexOf('@', 0) == -1){
alert("Devi inserire la tua E-mail!");
form.Email.focus();
return (false);
}
return (true);
}
//-->
</script>
<form method="post" action="" name='form' onSubmit='return checa_formulario(this)'>
<?php
$date = date("m/d/Y H:i:s");
if (!$_POST['sme_form']) { ?>
<h2> Tuo Nome:</h2>
<input type="text" name="Name" size="40">
<h2> Tua E-Mail:</h2>
<input type="text" name="Email" size="40">
<h2> Oggetto:</h2>
<input name="sub" type="text" size="40">
<h2> Messaggio:</h2>
<textarea name="Message" cols="40" rows="5" ></textarea> </br>
<input type="hidden" name="sme_form" value="1">
<input type="submit" value="Invia" name="submit">
<input type="reset" value="Cancella" name="reset">
</form>
<?php }
else
{
echo "
Grazie per averci contattato :</br>
$_POST[Name]!
</br>
Verrai contattato nella tua e-mail :</br> $_POST[Email]
";
mail("$email1", "$sme_form_c","
Message sent in $date
--------------------------------------------------------
Name : $_POST[Name]
Email : $_POST[Email]
Subject : $_POST[sub]
Message : $_POST[Message]
--------------------------------------------------------
Powered by SmE Form.\n
Script by http://www.scriptme.com\n\n
","From: $_POST[Email]");
mail("$_POST[Email]","$homepageurl ", " $Name\n
---------------------------------------------\n
Ciao:$_POST[Nome]\n
$tnk \n
---------------------------------------------\n
Paolo e Max, il Cabaret secondo me.\n
Mail inviata da http://www.paoloemax.it\n\n","From: $email1");
}
?>
Se invece vuoi sapere le date degli Spettacoli, iscriviti alla</p>
Mailing List
Verrai aggiornato di volta in volta su tutte le Serate del Duo Comico.</p>
<? include("../sotto.html") ?>
Grazie
![]()