Mi sono scaricato da questo sito un file semplice semplice per l'invio delle email dal sito, ma sembra non funzionare; Il file è nella sezione di PHP di questo sito, e verificato il funzionamento del server ( mi visualizza correttamente ora e data del server remoto con un file.php) ho contattato l'amministratore per informazioni, e quest'ultimo mi ha invitato a inserire la seguente riga: $mail->Host = 'smtp.orion.it';
Io ho inserito la riga ma continua a non funzionare, dove andrebbe inserita correttamente ??
Posto anche il codice del file dal nome 686
<?php
$receiverMail = "mimma.gianni@aliceposta.it";
$name = ltrim(rtrim(strip_tags(stripslashes($_POST['name']))));
$email = ltrim(rtrim(strip_tags(stripslashes($_POST['email']))));
$subject = ltrim(rtrim(strip_tags(stripslashes($_POST['subject']))));
$msg = ltrim(rtrim(strip_tags($_POST['msg'])));
$ip = getenv("REMOTE_ADDR");
$msgformat = "From: $name ($ip)\nEmail: $email\n\n$msg";
// VALIDATION
if(empty($name) || empty($email) || empty($subject) || empty($msg)) {
echo "<h3>The email was not sent</h3>
Please fill all the required fields</p>";
}
elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
echo "<h3>The email was not sent</h3>
The email address is invalid</p>";
}
else {
mail($receiverMail, $subject, $msgformat, "From: $name <$email>");
echo "<h3>The email has been sent!</h3>
I will get back to you as soon as possible.</p>"; }
?>
Nessuno sa dirmi come mai non funzia ?
Grazie a tutti.