PDA

View Full Version : [ASP] Invio email CDONTS.NewMail


OrcaAssassina
06-10-2006, 13:42
Ho una pagina, con la quale invio una email

Mi da un errore quando invio l'email

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/send.asp, line 141

800401f3


Se vado a vedere la riga di tale pagina č la sequente:

Set objMail = Server.CreateObject("CDONTS.NewMail")

Qui sotto vi riporto il vodice con la quale invio l'email, mi sembra che č tutto corretto perchč l'ho presa da un sito.

------------------------
<%
Set cn = Server.CreateObject("ADODB.Connection")
%><!--#include file="OpenConn.asp"--><%
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL="SELECT Email FROM Mailing ORDER BY Email"
rs.Open strSQL,cn
tipo=request("Tipo")
email=request("Email")
mittente=request("Mittente")
oggetto=request("Oggetto")
if tipo="html" then
do while not rs.eof
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.From=mittente
objMail.To=rs("Email")
objMail.Subject=oggetto
objMail.Body=email
objMail.Send
Set objMail = nothing
rs.movenext
loop
else
do while not rs.eof
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.BodyFormat = 1
objMail.MailFormat = 1
objMail.From=mittente
objMail.To=rs("Email")
objMail.Subject=oggetto
objMail.Body=email
objMail.Send
Set objMail = nothing
rs.movenext
loop
end if
set cn = nothing
set rs = nothing
%>
--------------------------------

Da cosa puņ dipendere????

Dal server che ospita il sito????

Ciao e grazieeeeee

cionci
06-10-2006, 16:27
Il server che ospita il sito non ha CDONTS...

OrcaAssassina
06-10-2006, 16:57
Il server che ospita il sito non ha CDONTS...


Esatto mi sono accorto, lanciando un file .asp che rileva le impostazione

Nel caso ti servesse ecco il link

http://forum.html.it/forum/showthread.php?s=&postid=9362179#post9362179

Ho letto in giro di sostituire le parti con questo codice
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "soggetto_email"
myMail.From = "tua_email@email.com"
myMail.To = "email_dest@email.com"
myMail.Bcc =
myMail.Cc =
myMail.TextBody = "tutto il testo che vuoi"
myMail.Send

Set myMail = Nothing

L'ho fatto, non mi da errore, perņ ancora non mi č arrivata nella email di quello che ho mandato!!!!

Conoscete altro codice da propormi????

Ciao e grazieeeeeeeeeee