Jump to content


Photo

Problemas Com O Cdonts


  • Faça o login para participar
3 replies to this topic

#1 invictus

invictus

    Turista

  • Usuários
  • 52 posts
  • Sexo:Não informado

Posted 17/04/2003, 02:19

coloquei numa pg o seguinte script e o servidor dá esse erro:

Microsoft VBScript runtime error '800a0046'

Permission denied

/veget/send_email_veget.asp, line 69

alguém tem ideia do que pode estar errado? o site tá hospedado no websamba, há a possibilidade desse servidor não suportar o componente cdo?

------------------------------------------------------------------------------------
<%@ language="vbscript" %>
<%

'The Surf-Net e-mail script and form is written by Bruce Corkhill ©2001
'If you want your own e-mail script and form then goto 'http://www.surf-net.co.uk

'Set the response buffer to true so we execute all code before sending to the clients browser
Response.Buffer = True

'Dimension variables
Dim strBody 'Holds the body of the e-mail
Dim objCDOMail 'Holds the mail server object
Dim strMyEmailAddress 'Holds your e-mail address
Dim strCCEmailAddress 'Holds any carbon copy e-mail addresses if you want to send to more tahn on e-mail address
Dim strReturnEmailAddress 'Holds the return e-mail address of the user


'----------------- Place your e-mail address in the following sting ----------------------------------

strMyEmailAddress = "yourmail@hotmail.com"

'-----------------------------------------------------------------------------------------------------

'----------- Place Carbon Copy e-mail address's in the following sting, supporated by ; --------------
'Use this string only if you want to send the copy's of the e-mail to more than one person

strCCEmailAddress = ""

'-----------------------------------------------------------------------------------------------------


'Read in the users e-mail address
strReturnEmailAddress = Request.Form("email")


'Initialse strBody string with the body of the e-mail
strBody = "Name: " & Request.Form("nome") & vbCrLf & vbCrLf
strBody = strBody & "E-mail: " & strReturnEmailAddress & vbCrLf & vbCrLf
strBody = strBody & "Enquiry: - " & vbCrLf & Request.Form("mensagem") & vbCrLf

'Create the e-mail server object
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")


'Send the e-mail

'Who the e-mail is from (this needs to have an e-mail address in it for the e-mail to be sent)
objCDOMail.From = Request.Form("nome") & " " & " <" & strReturnEmailAddress & ">"

'Who the e-mail is sent to
objCDOMail.To = strMyEmailAddress

'Who the carbon copies are sent to
objCDOMail.Cc = strCCEmailAddress

'The subject of the e-mail
objCDOMail.Subject = "email restaurantes vegetarianos"

'The main body of the e-amil
objCDOMail.Body = strBody

'The format the e-mail is sent in
objCDOMail.MailFormat = CdoMailFormatText 'If you want it to be in MIME(HTML) format use CdoMailFormatMIME

'Importance of the e-mail (0=Low, 1=Normal, 2=High)
objCDOMail.Importance = 1

'Send the e-mail
objCDOMail.Send


'Close the server object
Set objCDOMail = Nothing


%>

#2 sosnilc

sosnilc
  • Visitantes

Posted 17/04/2003, 07:39

Runtime Error '800a0046' Using the Send Method of CDONTS.NewMail
The information in this article applies to:
Microsoft Internet Information Server 4.0

This article was previously published under Q197619
SYMPTOMS
When you try to send mail using the CDONTS.NewMail object from the SMTP service included in the Windows NT Option Pack (NTOP) and Active Server Pages (ASP), you may receive the following error message:

Microsoft VBScript runtime error '800a0046'
Permission denied
/filename.asp, line xxx
where xxx is the line number using the send method of the NewMail object.
CAUSE
This behavior can occur if the anonymous user account is not granted at least CHANGE permissions to the SMTP mail server folders.
RESOLUTION
To resolve this error, follow these steps:
Open the Windows NT Explorer and browse to your mail folders. By default, this is the X:\InetPub\MailRoot folder, where X: is the drive that you specified during the installation of NTOP.
Right-click the Pickup folder, and then click Properties.
On the Security tab, click Permissions.
If the IIS user accounts are listed, IUSR_<computer> and IWAM_<computer> are the defaults, skip to step 13.
Click Add.
Select your computer in the List Names From: drop-down menu.
Click Show Users.
Highlight the IUSR_<computer> Internet guest account and the IWAM_<computer> impersonation account, then click Add.
Click Change in the Type Of Access drop-down menu.
Click OK to close the Add Users And Groups dialog.
Click OK to close the Directory Permissions dialog.
Click OK to close the Directory Properties dialog.
Repeat steps 2 through 12 for each folder under the MailRoot folder.

#3 otavio

otavio

    http://www.cursosvirtuais.net

  • Usuários
  • 443 posts
  • Sexo:Não informado

Posted 17/04/2003, 08:28

Provavelmente vc tem que atribuir valor a algum host smtp para enviar sua mensagem....

em que servidor vc está executando seu script?
qual é a linha 69?

Abraços,
t+
/////////////////////////////////////////////

http://www.cursosvirtuais.net/

#4 invictus

invictus

    Turista

  • Usuários
  • 52 posts
  • Sexo:Não informado

Posted 18/04/2003, 16:19

sosnilc: eu to usando o pws e não o iis, pois tenho win 98, tem alguma ideia se é igual?

otavio: se eu entendi direito nesse script nao precisa incluir smtp. ele tá hospedado
no websamba http://www.websamba.com/veget

a linha 69 é
'Send the e-mail
objCDOMail.Send




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq