Posso inviarti il codice dove lo vedo ?
codice:
<%Case "Invia"%>
<div style="display:none;">
<iframe id="frm_sms1" src="frameconfermano.asp"></iframe>
</div>
<div style="display:none;">
<iframe id="frm_sms2" src="framecarichino.asp"></iframe>
</div>
<table border="0" width="100%" height="600" cellspacing="0" cellpadding="0"><tr><td class="normalemail" VALIGN="top">
<%
strEmail = Request.Form("recipients") ' "xxx@xxx.it" '
subject = Request.form("nwsubject")
'send email so subscriber can confirm
' strEmailMsg = Replace(Request.Form("msg"),Chr(13) & Chr(10),"
")
strEmailMsg = Request.Form("msg")
' If Request.Form("version") = "html" Then
' strEmailMsg = strEmailMsg & strFooter
' Else
' strEmailMsg = Replace(strEmailMsg & strFooter,"
",Chr(13) & Chr(10))
' End If
'Send email based on mail component.
'Send email (CDONTS version). Note: CDONTS doesn't support a reply-to
'address and has no error checking.
if mailComp = "CDONTS" then
set mailObj = Server.CreateObject("CDONTS.NewMail")
If Request.Form("version") = "html" Then
mailObj.BodyFormat = 0
mailObj.MailFormat = 0
Else
mailObj.BodyFormat = 1
End If
mailObj.From = fromAddr
mailObj.To = strEmail
mailObj.Subject = subject
mailObj.Body = strEmailMsg
mailObj.Send
set mailObj = Nothing
end if
'Send email (CDOSYS version).
if mailComp = "CDOSYS" then
Set rsNews = Server.CreateObject("ADODB.Recordset")
rsNews.Open "SELECT * FROM anagrafica WHERE confirm = 'SI' and bloccoutente<>'on';", objConn, adOpenForwardOnly, adLockOptimistic, adCmdText
If Not rsNews.EOF Then
Do While Not rsNews.EOF
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.From = fromAddr
cdoMessage.To = rsNews("email")
' cdoMessage.Bcc = rsNews("email")
cdoMessage.Subject = subject
If Request.Form("version") = "html" Then
cdoMessage.HtmlBody = "<html><head></head><body>[img][/img]
<table border=""0"" width=""100%"" height=""30"" cellspacing=""0"" cellpadding=""0""><tr><td>"& Request.Form("dicitura1") &"</td></tr></table>
<table border=""0"" width=""100%"" height=""30"" cellspacing=""0"" cellpadding=""0""><tr><td><font size=""2"" color=""#9A9A9A"" face=""arial"">"& Request.Form("msg1") &"</font></td></tr></table>
<table border=""0"" width=""100%"" height=""30"" cellspacing=""0"" cellpadding=""0""><tr><td><font size=""2"" color=""#9A9A9A"" face=""arial"">"& Request.Form("utente1") &"</font></td></tr></table></body></html>"
Else
cdoMessage.TextBody = strEmailMsg
End If
on error resume next
cdoMessage.Send
intErrNumber = Err.Number
set cdoMessage = Nothing
set cdoConfig = Nothing
rsNews.MoveNext
Loop
%>
<%
if intErrNumber <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
else
Response.Write "<div align=""center""><font color=""#9A9A9A"" face=""arial"" size=""6"">La email sono state inviate con successo!</font></div>"
end if
End If
rsNews.Close
Set rsNews = Nothing
end if
'Send email (JMail version).
if mailComp = "JMail" then
set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = smtpServer
mailObj.Sender = fromAddr
mailObj.ReplyTo = fromAddr
mailObj.Subject = subject
addrList = Split(strEmail, ",")
for each addr in addrList
mailObj.AddRecipient Trim(addr)
next
If Request.Form("version") = "html" Then mailObj.ContentType = "text/html"
mailObj.Body = strEmailMsg
if not mailObj.Execute then
SendMail = "Email send failed: " & mailObj.ErrorMessage & "."
end if
end if
'Send email (ASPMail version).
if mailComp = "ASPMail" then
set mailObj = Server.CreateObject("SMTPsvg.Mailer")
mailObj.FromAddress = fromAddr
mailObj.RemoteHost = smtpServer
mailObj.ReplyTo = fromAddr
for each addr in Split(strEmail, ",")
mailObj.AddRecipient "", Trim(addr)
next
mailObj.Subject = subject
If Request.Form("version") = "html" Then mailObj.ContentType = "text/html"
mailObj.BodyText = strEmailMsg
if not mailObj.SendMail then
SendMail = "Email send failed: " & mailObj.Response & "."
end if
end if
End Select
objConn.Close
Set objConn = Nothing
%>
si fromaddr è un indirizzo valido