SMTP CDONTS
am 14.01.2008 15:17:24 von PaulO
Hi, I have a asp system and it is hosted on W2003 SBS at intranet with ADSL
connection, but when I try to send email, gives me a error
Set objEmail = Server.CreateObject("CDONTS.NewMail")
objEmail.BodyFormat = 0 ' mensagem em TEXTO
objEmail.MailFormat = 0 ' formato MIME
objEmail.From = authorname & "<" & emailfrom & ">"
objEmail.To = lcase(emailto)
objEmail.Subject = assunto
objEmail.Body = mensagem
objEmail.Send
set objEmail = nothing
Objeto Server erro 'ASP 0177 : 800401f3'
Falha em Server.CreateObject
the server cannot create the object
How can I fix it? any IIS configuration?
Thanks
Re: SMTP CDONTS
am 14.01.2008 17:35:04 von patfilot
CDONTS is not included in Win2k3 (and later) based systems.
http://support.microsoft.com/kb/315197/en-us
Pat
"Paulo" wrote in message
news:eu%23PXhrVIHA.5300@TK2MSFTNGP03.phx.gbl...
> Hi, I have a asp system and it is hosted on W2003 SBS at intranet with
> ADSL connection, but when I try to send email, gives me a error
>
>
> Set objEmail = Server.CreateObject("CDONTS.NewMail")
> objEmail.BodyFormat = 0 ' mensagem em TEXTO
> objEmail.MailFormat = 0 ' formato MIME
> objEmail.From = authorname & "<" & emailfrom & ">"
> objEmail.To = lcase(emailto)
> objEmail.Subject = assunto
> objEmail.Body = mensagem
> objEmail.Send
> set objEmail = nothing
>
> Objeto Server erro 'ASP 0177 : 800401f3'
> Falha em Server.CreateObject
>
> the server cannot create the object
>
> How can I fix it? any IIS configuration?
>
> Thanks
>
Re: SMTP CDONTS
am 14.01.2008 18:39:31 von PaulO
<%
On Error Resume Next
' Send by connecting to port 25 of the SMTP server.
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Const cdoSendUsingPort = 2
set iMsg = Server.CreateObject("CDO.Message")
set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendus ing") =
cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpse rver") =
"smtp.sao.terra.com.br"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpco nnectiontimeout")
= 10
.Update
End With
' Build HTML for message body.
strHTML = ""
strHTML = strHTML & "
"
strHTML = strHTML & ""
strHTML = strHTML & " This is the test HTML message body"
strHTML = strHTML & ""
strHTML = strHTML & ""
' Apply the settings to the message.
With iMsg
Set .Configuration = iConf
.To = "eris_paulo@terra.com.br" 'ToDo: Enter a valid email address.
.From = "eris_paulo@terra.com.br" 'ToDo: Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = strHTML
.Send
End With
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
if err.number = 0 then
response.write("email sent!!!")
else
response.write(err.description)
end if
%>
ERROR: 550 Must Authenticate!
How can I authenticate before??
Thanks!
"Pat [MSFT]" escreveu na mensagem
news:ECFD5E25-C5DF-497F-93B4-F914A1F6CA7B@microsoft.com...
> CDONTS is not included in Win2k3 (and later) based systems.
>
> http://support.microsoft.com/kb/315197/en-us
>
>
> Pat
>
> "Paulo" wrote in message
> news:eu%23PXhrVIHA.5300@TK2MSFTNGP03.phx.gbl...
>> Hi, I have a asp system and it is hosted on W2003 SBS at intranet with
>> ADSL connection, but when I try to send email, gives me a error
>>
>>
>> Set objEmail = Server.CreateObject("CDONTS.NewMail")
>> objEmail.BodyFormat = 0 ' mensagem em TEXTO
>> objEmail.MailFormat = 0 ' formato MIME
>> objEmail.From = authorname & "<" & emailfrom & ">"
>> objEmail.To = lcase(emailto)
>> objEmail.Subject = assunto
>> objEmail.Body = mensagem
>> objEmail.Send
>> set objEmail = nothing
>>
>> Objeto Server erro 'ASP 0177 : 800401f3'
>> Falha em Server.CreateObject
>>
>> the server cannot create the object
>>
>> How can I fix it? any IIS configuration?
>>
>> Thanks
>>
>