porca miseria, adesso funziona!!!
Ho messo l'email del cliente che corrisponde al dominio e funziona!
Però così non posso fare delle prove ?
porca miseria, adesso funziona!!!
Ho messo l'email del cliente che corrisponde al dominio e funziona!
Però così non posso fare delle prove ?
Perché?
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
perchè per fare delle prove devo lasciare per forza (altrimenti non funziona) l'email del cliente e quindi a me non arriva nulla via email
giusto?
L'email del cliente deve essere il MITTENTE non il destinatario.... :rollo:
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
ho usato questo codice, ma il destinatario allora dove lo devo mettere? (perdonami ma non ci sto capendo più nulla):
<%@LANGUAGE="VBSCRIPT"%>
<%
HOST1="192.168.0.100"
SENDER1=Request("email") & ""
TARGET1="info@nomedominio.com"
function filtra__Naturale(st)
dim r,n,c
r="0"
if (st<>"") then st=Trim(st)
if (st<>"") then
for n=1 to len(st)
c=mid(st,n,1)
if (c>="0") and (c<="9") then r=r & c
next
r=mid(r,1,8)
end if
filtra__Naturale=CLng(r)
end function
TIPO=filtra__Naturale(Request("TIPO") & "") - 0
SUBJECT1=""
if (TIPO=1) then SUBJECT1="Richiesta informazioni"
Dim FIELD_NAME()
Dim FIELD_SHOW()
Dim FIELD_TYPE()
Dim FIELD_VALU()
nFIELD=0
sub addFIELD(n,s,t)
nFIELD=nFIELD+1
Redim Preserve FIELD_NAME(nFIELD)
Redim Preserve FIELD_SHOW(nFIELD)
Redim Preserve FIELD_TYPE(nFIELD)
Redim Preserve FIELD_VALU(nFIELD)
FIELD_NAME(nFIELD)=Trim(n & "") & ""
FIELD_SHOW(nFIELD)=Trim(s & "") & ""
FIELD_TYPE(nFIELD)=filtra__Naturale(t & "") - 0
FIELD_VALU(nFIELD)=Request(FIELD_NAME(nFIELD) & "") & ""
'type 0 = stringa
'type 1 = testo
'type 2 = boolean (checkbox)
end sub
if (TIPO=1) then
addFIELD "Azienda ","Azienda ",0
addFIELD "Mansione ","Mansione ",0
addFIELD "Nome ","Nome ",0
addFIELD "Cognome ","Cognome ",0
addFIELD "PIva ","Partita Iva ",0
addFIELD "Indirizzo ","Indirizzo ",0
addFIELD "Localita ","Localita' ",0
addFIELD "Provincia ","Provincia ",0
addFIELD "Cap ","CAP ",0
addFIELD "Telefono_fax ","Telefono/Fax ",0
addFIELD "Email ","Email ",0
addFIELD "Richieste ","Richieste ",1
end if
'Response.Write("<hr>nFIELD: " & nFIELD & "
")
'for n=1 to nFIELD
' Response.Write("[" & FIELD_NAME(n) & "] ")
' Response.Write("[" & FIELD_SHOW(n) & "] ")
' Response.Write("[" & FIELD_TYPE(n) & "] ")
' Response.Write("[" & FIELD_VALU(n) & "] ")
' Response.Write("
")
' next
'Response.Write("<hr>")
BODY1=""
for n=1 to nFIELD
if (FIELD_TYPE(n)=0) then
BODY1=BODY1 & FIELD_SHOW(n) & ": "
BODY1=BODY1 & FIELD_VALU(n) & vbCrLf
end if
if (FIELD_TYPE(n)=1) then
BODY1=BODY1 & FIELD_SHOW(n) & ": "
BODY1=BODY1 & vbCrLf & FIELD_VALU(n) & vbCrLf
end if
if (FIELD_TYPE(n)=2) then
if (FIELD_VALU(n)<>"") then BODY1=BODY1 & FIELD_SHOW(n) & vbCrLf
end if
next
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stile1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
}
.Stile2 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<%
STATOMAIL=-1
if (1=0) then
Response.Write("Host = [" & HOST1 & "]
")
Response.Write("From = [" & SENDER1 & "]
")
Response.Write("AddAddress = [" & TARGET1 & "]
")
Response.Write("Subject = [" & SUBJECT1 & "]
")
Response.Write("Body = <pre style=""background-color:yellow;"">" & BODY1 & "</pre>
")
end if
if (1=1) then
Set MyMail = Server.CreateObject("Persits.MailSender")
MyMail.Host = HOST1 & ""
MyMail.From = SENDER1 & ""
MyMail.AddAddress TARGET1 & ""
MyMail.Subject = SUBJECT1 & ""
MyMail.Body = BODY1 & ""
STATOMAIL=MyMail.Send
Set MyMail = nothing
end if
STATOMAIL=0
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<span class="Stile1">Gentile cliente,
<% if (STATOMAIL<>0) then %>
<span class="Stile2">si è verificato un errore durante l'invio.</span>
Ritenti un nuovo invio della sua comunicazione.
Grazie.
<% else %>
<span class="Stile2">il tuo messaggio è stato inviato correttamente.</span>
Riceverai al più presto la nostra risposta.
Grazie per averci scelto.
<% end if %>
<span class="Stile2">Cordiali saluti.</span></span></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
MyMail.AddAddress TARGET1 & ""
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
ok, ho messo la mia email dove mi hai detto tu ma mi da ora il seguente errore:
Persits.MailSender.4 error '800a0006'
553 This server does not accept routed mail
/mailer1.asp, line 123
Rivediamo tutto lo script con le correzioni.
Roby
www.creamweb.it [v. 3.0]
:: Script ASP!
:: Web directory gratuita!
:: Campioni del mondo!
Ho solo inserito la mia email dove mi hai detto tu (MyMail.AddAddress TARGET1 & "info@miodominio.com").
Ecco il codice:
<%@LANGUAGE="VBSCRIPT"%>
<%
HOST1="192.168.0.100"
SENDER1=Request("email") & ""
TARGET1="info@nomedominio.com"
function filtra__Naturale(st)
dim r,n,c
r="0"
if (st<>"") then st=Trim(st)
if (st<>"") then
for n=1 to len(st)
c=mid(st,n,1)
if (c>="0") and (c<="9") then r=r & c
next
r=mid(r,1,8)
end if
filtra__Naturale=CLng(r)
end function
TIPO=filtra__Naturale(Request("TIPO") & "") - 0
SUBJECT1=""
if (TIPO=1) then SUBJECT1="Richiesta informazioni"
Dim FIELD_NAME()
Dim FIELD_SHOW()
Dim FIELD_TYPE()
Dim FIELD_VALU()
nFIELD=0
sub addFIELD(n,s,t)
nFIELD=nFIELD+1
Redim Preserve FIELD_NAME(nFIELD)
Redim Preserve FIELD_SHOW(nFIELD)
Redim Preserve FIELD_TYPE(nFIELD)
Redim Preserve FIELD_VALU(nFIELD)
FIELD_NAME(nFIELD)=Trim(n & "") & ""
FIELD_SHOW(nFIELD)=Trim(s & "") & ""
FIELD_TYPE(nFIELD)=filtra__Naturale(t & "") - 0
FIELD_VALU(nFIELD)=Request(FIELD_NAME(nFIELD) & "") & ""
'type 0 = stringa
'type 1 = testo
'type 2 = boolean (checkbox)
end sub
if (TIPO=1) then
addFIELD "Azienda ","Azienda ",0
addFIELD "Mansione ","Mansione ",0
addFIELD "Nome ","Nome ",0
addFIELD "Cognome ","Cognome ",0
addFIELD "PIva ","Partita Iva ",0
addFIELD "Indirizzo ","Indirizzo ",0
addFIELD "Localita ","Localita' ",0
addFIELD "Provincia ","Provincia ",0
addFIELD "Cap ","CAP ",0
addFIELD "Telefono_fax ","Telefono/Fax ",0
addFIELD "Email ","Email ",0
addFIELD "Richieste ","Richieste ",1
end if
'Response.Write("<hr>nFIELD: " & nFIELD & "
")
'for n=1 to nFIELD
' Response.Write("[" & FIELD_NAME(n) & "] ")
' Response.Write("[" & FIELD_SHOW(n) & "] ")
' Response.Write("[" & FIELD_TYPE(n) & "] ")
' Response.Write("[" & FIELD_VALU(n) & "] ")
' Response.Write("
")
' next
'Response.Write("<hr>")
BODY1=""
for n=1 to nFIELD
if (FIELD_TYPE(n)=0) then
BODY1=BODY1 & FIELD_SHOW(n) & ": "
BODY1=BODY1 & FIELD_VALU(n) & vbCrLf
end if
if (FIELD_TYPE(n)=1) then
BODY1=BODY1 & FIELD_SHOW(n) & ": "
BODY1=BODY1 & vbCrLf & FIELD_VALU(n) & vbCrLf
end if
if (FIELD_TYPE(n)=2) then
if (FIELD_VALU(n)<>"") then BODY1=BODY1 & FIELD_SHOW(n) & vbCrLf
end if
next
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.Stile1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
}
.Stile2 {font-family: Verdana, Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<%
STATOMAIL=-1
if (1=0) then
Response.Write("Host = [" & HOST1 & "]
")
Response.Write("From = [" & SENDER1 & "]
")
Response.Write("AddAddress = [" & TARGET1 & "]
")
Response.Write("Subject = [" & SUBJECT1 & "]
")
Response.Write("Body = <pre style=""background-color:yellow;"">" & BODY1 & "</pre>
")
end if
if (1=1) then
Set MyMail = Server.CreateObject("Persits.MailSender")
MyMail.Host = HOST1 & ""
MyMail.From = SENDER1 & ""
MyMail.AddAddress TARGET1 & "info@miodominio.com"
MyMail.Subject = SUBJECT1 & ""
MyMail.Body = BODY1 & ""
STATOMAIL=MyMail.Send
Set MyMail = nothing
end if
STATOMAIL=0
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<span class="Stile1">Gentile cliente,
<% if (STATOMAIL<>0) then %>
<span class="Stile2">si è verificato un errore durante l'invio.</span>
Ritenti un nuovo invio della sua comunicazione.
Grazie.
<% else %>
<span class="Stile2">il tuo messaggio è stato inviato correttamente.</span>
Riceverai al più presto la nostra risposta.
Grazie per averci scelto.
<% end if %>
<span class="Stile2">Cordiali saluti.</span></span></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>