Jump to content
Fórum Script Brasil
  • 0

Erro Caminho Fisico


claytonprog
 Share

Question

:blink: :blink: Pessoal estou tentando enviar um e-mail com anexo para uma lista de clientes porém está dando erro no caminho fisico. Já entrei em contato com o suporte do meu provedor e me passaram o caminho fisico mais ainda está dando erro. Vou postar o erro aqui:

CDO.Message.1 error '80070003'

The system cannot find the path specified.

/cadastro/email_anexo.asp, line 29

aqui está o link da pagina:

http://www.ministerionovavida.org/cadastro/index.asp

aqui esta meus scripts:

index.asp

<%

Set conexao = Server.CreateObject("ADODB.Connection")

Conexao.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("contato.mdb")

SQL="Select * From contato order by autonum"

Set RS = conexao.execute(sql)%>

<table width="611" border="0" align="center" height="215" cellspacing="0" cellpadding="0">

<tr bgcolor="#009966">

<td colspan="2" bgcolor="#009966">

<div align="center"><font size="2" face="Verdana, Arial, sans-serif"><b><font color="#FFFFFF">Enviando

email por anexo</font></b></font></div>

</td>

</tr>

<tr bgcolor="#E6FFEC">

<td colspan="2"><font size="1" face="Verdana, Arial, sans-serif"><a href="java script:abrir('email_anexo.asp')"><font size="1" face="Verdana, Arial, sans-serif"><font size="1"><font size="1"><font size="1" face="Verdana, Arial, sans-serif"><font size="1"><font size="1"><font face="Verdana, Arial, sans-serif">

<form name="form" method="post" action="email_anexo.asp" enctype="multipart/form-data">

<div align="center">

<input type="file" name="anexos" style="border: 1 solid #666666" onBlur="this.className='selectBoxNormal';" onFocus="this.className='selectOver';" class="selectBoxNormal" size="20">

<input type="submit" name="Submit3" value="Anexar" style="border: 1 solid #666666" onBlur="this.className='selectBoxNormal';" onFocus="this.className='selectOver';" class="selectBoxNormal">

</div>

</form>

</font></font></font></font></font></font></font></a></font></td>

</tr>

<tr bgcolor="#E6FFEC">

<td colspan="2" height="167">

<form method="post" action="email_anexo.asp">

<table width="613" border="0">

<tr>

<td width="335" height="38">

<div align="right"><font size="1" face="Verdana, Arial, sans-serif">De:</font></div>

</td>

<td width="353" height="38">

<input type="text" name="nome" value="[email protected]" size="30" style="border: 1 solid #666666" onBlur="this.className='selectBoxNormal';" onFocus="this.className='selectOver';" class="selectBoxNormal">

</td>

</tr>

<tr>

<td width="335" height="28">

<div align="right"><font size="1" face="Verdana, Arial, sans-serif">Email:</font></div>

</td>

<td width="353" height="28"><font size="1" face="Verdana, Arial, sans-serif">

<input type="text" name="email" value="<%do while not rs.EOF %><%=rs("email")%>,<%rs.MoveNext%><%Loop%>" size="38" maxlength="50" style="border: 1 solid #666666" onBlur="this.className='selectBoxNormal';" onFocus="this.className='selectOver';" class="selectBoxNormal">

</font></td>

</tr>

<tr>

<td width="335" height="16">

<div align="right"><font size="1" face="Verdana, Arial, sans-serif">Arquivo

</font></div>

</td>

<td width="353" height="16"><font size="1" face="Verdana, Arial, sans-serif"><%=request.querystring("anexos")%> <%=request.querystring("msg")%>

</font></td>

</tr>

<tr bgcolor="#009966">

<td colspan="2" height="40">

<div align="center"><font size="1" face="Verdana, Arial, sans-serif"><font size="1"><font size="1"><font size="1" face="Verdana, Arial, sans-serif"><font size="1"><font size="1">

<input type="hidden" name="anexo" value="<%=request.querystring("anexos")%>">

<input type="submit" name="Submit" value="Enviar" style="border: 1 solid #666666" onBlur="this.className='selectBoxNormal';" onFocus="this.className='selectOver';" class="selectBoxNormal">

</font></font></font></font></font></font></div>

</td>

</tr>

</table>

</form>

</td>

</tr>

</table>

email_anexo.asp

<%

vanexo = request.form("anexo")

vnome = request.form("nome")

vemail = request.form("email")

HTML = " Nome:" & vnome &" Email: "& vemail &""

Set objCDOSYSMail = Server.CreateObject("CDO.Message")

'cria o objeto para configuração do SMTP

Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

'SMTP

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"

'porta do SMTP

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'porta do CDO

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'timeout

objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30

objCDOSYSCon.Fields.update

'atualiza a configuração do CDOSYS para o envio do e-mail

Set objCDOSYSMail.Configuration = objCDOSYSCon

'e-mail do remetente

objCDOSYSMail.From = "Nome Remetente" & "<[email protected]>"

'e-mail do destinatário

objCDOSYSMail.To = "[email protected]"

'anexo

objCDOSYSMail.AddAttachment("d:\web\htdocs\ministerionovavida\cadastro\upload\"& vanexo &"") ---- linha que está dando o erro

'd:/web/htdocs/ministerionovavida/cadastro/upload/

'assunto da mensagem

objCDOSYSMail.Subject = "Anexo"

'conteúdo da mensagem

objCDOSYSMail.HtmlBody = request.form("recado")

'objCDOSYSMail.fields.update

'envia o e-mail

objCDOSYSMail.Send

'destrói os objetos

Set objCDOSYSMail = Nothing

Set objCDOSYSCon = Nothing

response.write "E-mail enviado com Sucesso..."

%>

enviar_anexo.asp

<%

' Esta secao faz o upload do arquivos para o diretório /upload

Set myFileUpload = Server.CreateObject("SoftArtisans.FileUp")

if myFileUpload.form("anexos").UserFilename <> "" then

' diretório em que a imagem será salva

myFileUpload.Form("anexos").Path = "d:\web\htdocs\ministerionovavida\cadastro\upload\"

myFileUpload.form("anexos").Save

end if

arquivo = Mid(myFileUpload.UserFilename, InstrRev(myFileUpload.UserFilename, "\") + 1)

If Err Then

Response.Write("<b>Erro : </b>" & Err.description & "<br>")

Set myFileUpload = nothing

Response.End

End If

%>

<%

response.redirect "email_anexo.asp?anexos="& arquivo &"&msg= anexado com sucesso!"

%>

Por favor Helpppp!!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      151k
    • Total Posts
      649.1k
×
×
  • Create New...