Ir para conteúdo
Fórum Script Brasil

Blastman

Membros
  • Total de itens

    3
  • Registro em

  • Última visita

Sobre Blastman

Blastman's Achievements

0

Reputação

  1. O erro mantém-se Bareta! Para além desse bug gostava ainda de colocar um ligthbox na galeria http://www.zoominstudio.eu/portfolio.asp?id=0 é possivel? Sem mais, Blastman
  2. OI, obg pela resposta, mas me parece que persiste algum problema, porque gera um erro Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'CDONTS2.TO' /painel/env_news.asp, line 101 Obrigado, Blast
  3. Oi pessoal, estou a precisar de uma help para voltar a colocar uma página que uso para enviar newsletters a funcionar. O problema surgiu devido à mudança de servidor. Antes o envio de emails era feito com CDonts e agora é por objEmail. Envio em baixo o code antigo <% endereco = "http://www.zoominstudio.eu/zoomin/" SET UPLOAD = Server.CreateObject("Persits.upload") lang = Trim(Request("lang")) Upload.OverwriteFiles = False Upload.Save Server.Mappath("../upload") For Each File in Upload.Files arquivo = File.FileName Next Set FSO = Server.CreateObject("Scripting.FileSystemObject") Set TXT = FSO.OpenTextFile(Server.Mappath("../emails/newsletter_" & lang & ".asp")) texto = txt.readALL TXT.close Set TXT = Nothing Set FSO = Nothing variasp_assunto = Trim(Upload.Form("variasp_assunto")) variasp_titulo = Trim(Upload.Form("variasp_titulo")) variasp_mensagem = Trim(Upload.Form("variasp_mensagem")) variasp_mensagem = Replace(variasp_mensagem,chr(13),"<br>") texto = replace(texto,"##texto##",variasp_mensagem) if arquivo <> "" then texto = replace(texto,"##imagem##","<img src='" & endereco & "upload/" & arquivo & "' border='0'") elseif arquivo = "" then texto = replace(texto,"##imagem##","") end if SQL="SELECT TOP 3 id, titulo_" & lang & ", descricao_" & lang & ", imagem FROM news ORDER BY id DESC" SET RS = Server.CreateObject("AdoDB.RecordSet") RS.Open SQL,Conexao,3,3 if not rs.eof then news = rs.getrows() end if rs.close set rs = nothing if isarray(news) Then FOR I=0 TO UBOUND(news,2) noticias = noticias & "<table width='480' border='0' cellspacing='0' cellpadding='0'>" noticias = noticias & "<tr>" noticias = noticias & "<td>" noticias = noticias & "<table width='480' border='0' cellspacing='0' cellpadding='0'>" noticias = noticias & "<tr>" noticias = noticias & "<td width='110' height='100'><a href='" & endereco & "news_detalhe.asp?id=" & news(0,I) & "' target='_blank'><img src='" & endereco & "upload/" & news(3,I) & "' width='100' height='100' border='0'></a></td>" noticias = noticias & "<td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>" noticias = noticias & "<tr>" noticias = noticias & "<td height='22' valign='top' class='textonormal'><b><a href='" & endereco & "news_detalhe.asp?id=" & news(0,I) & "' class='textonormal' target='_blank'><font size='1' color='606060' face='tahoma'>" & news(1,I) & "</font></a></b></td>" noticias = noticias & "</tr>" noticias = noticias & "<tr>" noticias = noticias & "<td height='78' valign='top' class='textonormal'><font size='2' color='666666' face='tahoma'>" & left(troca(news(2,I)),250) & "...</font></td>" noticias = noticias & "</tr>" noticias = noticias & "</table></td>" noticias = noticias & "</tr>" noticias = noticias & "</table>" noticias = noticias & "</td>" noticias = noticias & "</tr>" noticias = noticias & "</table>" noticias = noticias & "<br><br>" next end if texto = replace(texto,"##noticias##",noticias) IF variasp_assunto = "Individual" THEN For Each Item in Upload.Form emails = Trim(Item) quebrar = split(emails,",") transforma = texto SET UPLOAD = Nothing FOR I=LBOUND(quebrar) TO UBOUND(quebrar) quebrar2 = split(quebrar(i),"-") Set CDONTS2 = Server.CreateObject("CDONTS.NewMail") CDONTS2.From = "ZOOMIN STUDIO" & "<zoominstudio@gmail.com>" if ubound(quebrar2) > 0 then transforma = replace(transforma,"##nome##",quebrar2(0)) email = quebrar2(1) CDONTS2.To = quebrar2(0) & "<" & email & ">" end if transforma2 = replace(transforma,"##email##",email) CDONTS2.BodyFormat = 0 CDONTS2.MailFormat = 0 CDONTS2.Subject = variasp_titulo CDONTS2.Body = transforma2 CDONTS2.Send SET CDONTS2 = Nothing NEXT NEXT ELSEIF variasp_assunto = "Todos" THEN SET RS_email = Conexao.EXECUTE("SELECT * FROM newsletter WHERE lang = '" & lang & "' ORDER BY id ASC") While Not RS_email.EOF transforma = texto nome = RS_email("nome") email = RS_email("email") transforma = replace(transforma,"##nome##",nome) transforma2 = replace(transforma,"##email##",email) Set CDONTS2 = Server.CreateObject("CDONTS.NewMail") CDONTS2.From = "ZOOMIN STUDIO" & "<carlosars9@gmail.com>" CDONTS2.To = email CDONTS2.Importance = 1 CDONTS2.BodyFormat = 0 CDONTS2.MailFormat = 0 CDONTS2.Subject = variasp_titulo CDONTS2.Body = transforma2 CDONTS2.Send SET CDONTS2 = Nothing RS_email.movenext Wend ELSEIF variasp_assunto <> "Individual" OR variasp_assunto <> "Todos" THEN SET RS_email = Conexao.EXECUTE("SELECT * FROM newsletter WHERE assunto = '" & variasp_assunto & "' and lang = '" & lang & "' ORDER BY id ASC") While Not RS_email.EOF transforma = texto nome = RS_email("nome") email = RS_email("email") transforma = replace(transforma,"##nome##",nome) transforma2 = replace(transforma,"##email##",email) Set CDONTS2 = Server.CreateObject("CDONTS.NewMail") CDONTS2.From = "ZOOMIN STUDIO" & "<carlosars9@gmail.com>" CDONTS2.To = email CDONTS2.Importance = 1 CDONTS2.BodyFormat = 0 CDONTS2.MailFormat = 0 CDONTS2.Subject = variasp_titulo CDONTS2.Body = transforma2 CDONTS2.Send SET CDONTS2 = Nothing RS_email.movenext Wend END IF %> <html> <head> <title><%=titulo_admin%></title> <link href="../css/pura_admin.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0"> <!--#include file="../includes/admin_topo.asp"--> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="170" align="left" valign="top"><!--#include file="../includes/admin_categorias.asp"--></td> <td width="10">&nbsp;</td> <td align="center" valign="top"><table width="96%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="21"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8"><img src="../imagens_admin/ponta_esq.jpg" width="8" height="21"></td> <td background="../imagens_admin/fundo_menu.jpg" class="texto_preto_bold_01">&Aacute;rea Administrativa - Newsletter </td> <td width="8"><img src="../imagens_admin/ponta_dir.jpg" width="8" height="21"></td> </tr> </table></td> </tr> <tr> <td class="tabela_cinza_esq_dir">&nbsp;</td> </tr> <tr> <td align="center" class="tabela_cinza_esq_dir"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10">&nbsp;</td> <td align="center" class="texto_preto_bold_01">Newsletter enviada com sucecesso!<br><br> <a href="admin_newsletter_port.asp"><font color=000000>Voltar</font></a></td> <td width="10">&nbsp;</td> </tr> </table></td> </tr> <tr> <td class="tabela_cinza_esq_dir_baixo">&nbsp;</td> </tr> </table></td> <td width="10" align="center" valign="top">&nbsp;</td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8" height="21"><img src="../imagens_admin/ponta_esq.jpg" width="8" height="21"></td> <td align="center" valign="middle" background="../imagens_admin/fundo_menu.jpg"><%=rodape_admin%></td> <td width="8"><img src="../imagens_admin/ponta_dir.jpg" width="8" height="21"></td> </tr> </table></td> </tr> </table></td> </tr> </table> </body> </html> <% conexao.close set conexao = nothing %> Code cedido pelo host: <% Set objEmail = Server.CreateObject("Persits.MailSender") objEmail.Username = "you@domain.com" objEmail.Password = "password" objEmail.Host = "mymail.brinkster.com" objEmail.From = "you@domain.com" objEmail.AddAddress "user@domain.com" objEmail.Subject = "Test message sent using the ASPEMail component" objEmail.Body = "This is a test message." objEmail.Send Set objEmail = Nothing %>
×
×
  • Criar Novo...