Originariamente inviato da lorem
Ciao,
Non sono molto bravo con php...
L'azienda che mi fa l'hostin dice che per inviare una mail dal form del mio sito con php devo usare SMTP, mi ha dato un indirizzo di 10 cifre, ma sinceramente non so come fare...
Quesri sono i fale php del mio form:
config.php
<?
#####
# Edit me
$email = "************@mail.com";
$subject = "dal sito fa********ox";
?>
sendmail.php
<?
include "config.php";
if ($f_name <> "" and $f_mail <> "" and $f_message <> "") {
mail("$email", "$subject", "Nome e Cognome: $f_name\nMail: $f_mail\nMessaggio:\n\n$f_message");
$msg = "grazie per averci contattato.";
} else {
$msg = "Completa tutti i campi, grazie.";
}
?>
<? echo $msg; ?></p>
form.php
Contatti</p>
<form action="sendmail.php" method=POST>
<table width=47%>
<tr>
<td align="right">Nome e Cognome:</td>
<td align="left"><input type="text" name="f_name" size="30" /></td>
</tr>
<tr>
<td align=right>Indirizzo email:</td>
<td align=left><input type=text name=f_mail size=30></td></tr>
<tr>
<td height="97" align=right>Messaggio</td>
<td align=left><textarea cols=40 rows=5 name=f_message></textarea></td></tr>
</table>
<input type=submit value="Invia">
</form>
grazie.