Salve a tutti, volevo presentarvi questo problema che sicuramente per molti di voi sarà banale ma che per me è complicatissimo!
Sto usando la coolcafè chat che in un file ha le funzioni per inviare le email per confermare l'iscrizione alla chat e per recuperare la password! Il problema è che il tutto funziona usando jmail e non cdonts! Vi posto il codice nella speranza che qualcuno possa segnalarmi le modifiche da fare...
<%
Sub sendConfirmationEmail(langage, userKey, email)
'
' Send an email using an ASP component
' In our example, we use JMail, free ASP component that you can get at http://www.dimac.net/
' You can easily change this code to your ASP component specification
' If you have problem doing so, please contact us at support@coolcafe.ca
'
Dim objConn1, objRS1, strSQL1, bodyText
Set objConn1 = Server.CreateObject("ADODB.Connection")
objConn1.ConnectionString = Application("DBString")
objConn1.Open
Set objRS1 = Server.CreateObject("ADODB.Recordset")
strSQL1 = "SELECT * FROM memo" & langage & " WHERE memoNumber=4;"
objRS1.Open strSQL1, objConn1, adOpenStatic, adLockReadOnly
bodyText = objRS1("memoText") & "<br>" & "Confirmation U101" & objRS("key")
objRS1.Close
Set objRS1 = Nothing
objConn1.Close
Set objConn1 = Nothing
Set JMail = Server.CreateObject ("JMail.SMTPMail")
JMail.ContentType = "text/html"
JMail.ServerAddress = Application("mailServer")
JMail.Sender = Application("adminEmail")
JMail.SenderName = Application("senderName")
JMail.Subject = "Confirmation U101" & userKey
JMail.AddRecipient email
JMail.Body = bodyText
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")
JMail.Execute
Set JMail = Nothing
End Sub
Sub sendPassword(langage, email, nickname, password)
Dim objConn1, objRS1, strSQL1, bodyText
Set objConn1 = Server.CreateObject("ADODB.Connection")
objConn1.ConnectionString = Application("DBString")
objConn1.Open
Set objRS1 = Server.CreateObject("ADODB.Recordset")
strSQL1 = "SELECT * FROM memo" & langage & " WHERE memoNumber=2;"
objRS1.Open strSQL1, objConn1, adOpenStatic, adLockReadOnly
bodyText = objRS1("memoText")
objRS1.Close
Set objRS1 = Nothing
objConn1.Close
Set objConn1 = Nothing
Set JMail = Server.CreateObject ("JMail.SMTPMail")
JMail.ContentType = "text/html"
JMail.ServerAddress = Application("mailServer")
JMail.Sender = Application("adminEmail")
JMail.SenderName = Application("senderName")
JMail.Subject = Application("msg26" & langage)
JMail.AddRecipient email
JMail.Body = bodyText
JMail.AppendText(Application("msg2" & langage) & ": " & nickname & "<br>")
JMail.AppendText(Application("msg5" & langage) & ": " & password & "<br>")
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")
JMail.Execute
Set JMail = Nothing
End Sub
%>
Ciao e grazie a tutti
Luigi