Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

gamefe

Newsletter em asp

Recommended Posts

Pessoal, estava tentando fazer um sistema de newsletter diferente, onde o asp enviaria pacotes de 10 em 10 e-mails, retornando se o e-mail foi enviado com sucesso ou não. A medida que fosse enviado iria aparecendo se foi enviado ou não. Tentei fazer mais não consegui.Alguém tem ideia de como fazer ? Alguém aqui já fez isso ? Onde posso achar algum tutorial ?ObrigadoGabriel

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara,à medida que você for fazendo o loop para enviar, monte uma verificação com 2 contadores para ok e erro, e um outro para total. Quando o total chegar a 10, exiba a mensagem de quantos foram ok e qtos deram erro. Zere o contador do total.Teoricamente, deve funcionar. É que onde trabalho não dá tempo pra testar, amanhã eu posto isso, se quiser...

Compartilhar este post


Link para o post
Compartilhar em outros sites

valeu...hj eu vou chapar, mas amanhã eu vou tentar fazer isso pro cê! ok?Mas lembre-se: nada é impossível, você é que ainda não tentou...krak, filosofei...

Compartilhar este post


Link para o post
Compartilhar em outros sites

Se você tiver como me ajudar agradeço. Se você tiver algo parecido... se der pra me mandar...Até maisGabriel

kra, vai na área da tranferencia da aspbrasil... lá tem um exemplo de newsletter...www.aspbrasil.com.brespero que tenha ajudado...flw

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bom, eu utilizo o cdonts. Não sei quais são as caracteristicas dele não, se você souber onde posso achar pra te passar é só falar que eu pego e te mando... valeu e até mais.Gabriel

Compartilhar este post


Link para o post
Compartilhar em outros sites

Gabriel,segue abaixo o script para envio de e-mail's de 10 em 10.

x = 0do while x < 10'aqui você coloca as intruções de envio.  if mail.send then    foi = foi+1  else    nfoi = nfoi+1  end if x=x+1  if x=10 then    x=0    response.write "E-mail's enviados: "& foi &"<br>"    response.write "E-mail's não enviados: "& nfoi  end ifrs.movenextloop

agora é só encaixar no seu script. Qq dúvida...Se for isso que você quer e der certo, me responda aqui ou por e-mail, valeu?!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Pessoal, arrumei o código que o J. Filho me passou, mas está dando um erro... alguém poderia me ajudar ?O erro que ta dando é E-mail's enviados: E-mail's não enviados: 10 ADODB.Recordset error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /administrando_fmc/administrar_newsletter/newsletter_enviar.asp, line 167 O código da página é:<!-- #include file="admin.asp" --><%Server.ScriptTimeOut=99999999Dim strConDim objRecDim objConDim vmailDim vuserDim nvtext = request.form("txt")'vtext = "TESTE GABRIEL"'Response.write vtext'Response.endstrCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\home\fmc1\dados\news.mdb"Set objCon = Server.CreateObject ("ADODB.Connection")set rs = server.createobject("adodb.recordset")sql = "select n_cod,n_mail from emails"rs.open sql,strConn = 0x = 0while not rs.eof do while x < 10 If not rs.eof then'*** enviando os 10 emails vmail = rs("n_mail") vuser = rs("n_cod") n = n + 1 style = "" HTML = "" footer = "" top = ""style = "<style type='text/css'><!--"style = style & ".fonte_menor {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #000000}"style = style & ".fonte_menor_bold {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #000000}"style = style & ".fonte_menor_bold_azul {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #003399}"style = style & ".fonte_menor_azul { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #003399}"style = style & "A:link { "style = style & "color: #003399; }"style = style & "A:visited {"style = style & "color: #003399; }"style = style & "A:active {"style = style & "color: #003399; }"style = style & "A:hover {"style = style & "color: #003399; }"style = style & "-->"style = style & "</style>"top = "<table width='405' border='0' cellspacing='0' cellpadding='1' height='300' align='center'>"top = top & " <tr> "top = top & " <td><img src='http://www.fmc.org.br/img/newsletter_topo.gif'></td>"top = top & " </tr>"top = top & " <tr> "top = top & " <td bgcolor='#023292'> "HTML = HTML &" <table width='100%' border='0' cellspacing='0' cellpadding='0' height='300' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td width='450' height='276' bgcolor='#FFFFFF' valign='top'> "HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td><div style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:9pt;'>"HTML = HTML & vtextHTML = HTML & "</div></td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " <tr> "HTML = HTML & " <td width='450' bgcolor='#FFFFFF'> "HTML = HTML & " <div align='right'></div>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & "</table>"HTML = HTML & "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>"HTML = HTML & " <tr bgcolor='#023292'> "HTML = HTML & " <td> "HTML = HTML & " <table width='100%' border='0' cellspacing='0' cellpadding='0'>"HTML = HTML & " <tr valign='middle' align='center'> "HTML = HTML & " <td bgcolor='#FFFFFF'> "HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td> "HTML = HTML & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>"HTML = HTML & " <span class='fonte_menor'><span class='fonte_menor_azul'><b><font size='1'>© Federação Mineira de Ciclismo 2003 - Todos os direitos reservados</font></b></span></span><font size='1'><b><span class='fonte_menor'><span class='fonte_menor_azul'>"HTML = HTML & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'><br>"HTML = HTML & " <font size='1' color='#003399'>Av: Olegário Maciel, 311 SL 109 Centro - Cep: 30180.110<br>"HTML = HTML & " Belo Horizonte - MG / Brasil - Tel: 31 3201 3610 </font></span></span>"HTML = HTML & " </span></font></p>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>" HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & "</table>" footer = "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>" footer = footer & "<tr bgcolor='#023292'>" footer = footer & " <td> " footer = footer & " <table width='100%' border='0' cellspacing=0' cellpadding='0'>" footer = footer & " <tr valign='middle' align='center'>" footer = footer & " <td bgcolor='#FFFFFF'> " footer = footer & " <table width='435' border='0' cellspacing='0' cellpadding='0' align='center'>" footer = footer & " <tr> " footer = footer & " <td>" footer = footer & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>" footer = footer & " <span class='fonte_menor'><span class='fonte_menor_azul'><b>Este e-mail não é um SPAM.<br></b></span></span><b><span class='fonte_menor'><span class='fonte_menor_azul'> " footer = footer & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'>" footer = footer & " <font size='1' color='#003399'>Você recebeu este e-mail porque está cadastrado no site <a href='http://www.fmc.org.br'>www.fmc.org.br</a><br>" footer = footer & " Se não deseja receber mais este e-mail, <a href='http://www.fmc.org.br/newsletter/newsletter_apaga.asp?n_cod="& vuser &"'>clique aqui.</a></font></span></span> </span></font></p>" footer = footer & " </span></font></p>" footer = footer & " </td>" footer = footer & " </tr>" footer = footer & " </table>" footer = footer & "</table></table>" Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.To = vmail objMail.From = "newsletter@fmc.org.br" objMail.Subject = request.form("assunto_do_email") objMail.BodyFormat = 0 objMail.MailFormat = 0 objMail.Body = style & top & HTML & footer if objMail.send then foi = foi+1 else nfoi = nfoi+1 end if set objMail = nothing'fim do código do email ***********End Ifx=x+1 if x=10 then x=0 response.write "E-mail's enviados: "& foi &"<br>" response.write "E-mail's não enviados: "& nfoi end ifrs.movenextlooprs.movenextwendrs.closeset rs = nothingIf n = 1 thenmsg = "Foi enviado " & n & " e-mail com sucesso"elsemsg = "Foram enviados " & n & " e-mails com sucesso"end ifcall sucesso(msg)%>Espero que alguém possa me ajudar.ObrigadoGabriel

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bom, continua dando o erro

 

E-mail's enviados:

E-mail's não enviados: 10

ADODB.Recordset error '800a0bcd'

 

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

 

/administrando_fmc/administrar_newsletter/newsletter_enviar.asp, line 167

 

Só que agora eu pude perceber que o asp está enviando e-mails diretos, sem parar para os e-mails cadastrados, mesmo eu fechando o asp e só executando ele uma vez ele não para de enviar e-mails... recebi agora mais de 400 e-mails em menos de 3 minutos, alguém sabe onde pode estar o erro ? A linha 167 está em negrito.

 

 

 

<!-- #include file="admin.asp" -->

<%

 

Server.ScriptTimeOut=99999999

 

Dim strCon

Dim objRec

Dim objCon

Dim vmail

Dim vuser

Dim n

 

vtext = request.form("txt")

'vtext = "TESTE GABRIEL"

'Response.write vtext

'Response.end

 

 

strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\home\fmc1\dados\news.mdb"

 

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

 

set rs = server.createobject("adodb.recordset")

sql = "select n_cod,n_mail from emails"

rs.open sql,strCon

n = 0

 

x = 0

 

while not rs.eof

do while x < 10

If not rs.eof then

 

'*** enviando os 10 emails

 

vmail = rs("n_mail")

vuser = rs("n_cod")

n = n + 1

style = ""

HTML = ""

footer = ""

top = ""

 

style = "<style type='text/css'><!--"

style = style & ".fonte_menor {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #000000}"

style = style & ".fonte_menor_bold {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #000000}"

style = style & ".fonte_menor_bold_azul {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #003399}"

style = style & ".fonte_menor_azul { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #003399}"

style = style & "A:link { "

style = style & "color: #003399; }"

style = style & "A:visited {"

style = style & "color: #003399; }"

style = style & "A:active {"

style = style & "color: #003399; }"

style = style & "A:hover {"

style = style & "color: #003399; }"

style = style & "-->"

style = style & "</style>"

 

top = "<table width='405' border='0' cellspacing='0' cellpadding='1' height='300' align='center'>"

top = top & " <tr> "

top = top & " <td><img src='http://www.fmc.org.br/img/newsletter_topo.gif'></td>"

top = top & " </tr>"

top = top & " <tr> "

top = top & " <td bgcolor='#023292'> "

HTML = HTML &" <table width='100%' border='0' cellspacing='0' cellpadding='0' height='300' align='center'>"

HTML = HTML & " <tr> "

HTML = HTML & " <td width='450' height='276' bgcolor='#FFFFFF' valign='top'> "

HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"

HTML = HTML & " <tr> "

HTML = HTML & " <td><div style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:9pt;'>"

HTML = HTML & vtext

HTML = HTML & "</div></td>"

HTML = HTML & " </tr>"

HTML = HTML & " </table>"

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & " <tr> "

HTML = HTML & " <td width='450' bgcolor='#FFFFFF'> "

HTML = HTML & " <div align='right'></div>"

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & " </table>"

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & "</table>"

HTML = HTML & "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>"

HTML = HTML & " <tr bgcolor='#023292'> "

HTML = HTML & " <td> "

HTML = HTML & " <table width='100%' border='0' cellspacing='0' cellpadding='0'>"

HTML = HTML & " <tr valign='middle' align='center'> "

HTML = HTML & " <td bgcolor='#FFFFFF'> "

HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"

HTML = HTML & " <tr> "

HTML = HTML & " <td> "

HTML = HTML & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>"

HTML = HTML & " <span class='fonte_menor'><span class='fonte_menor_azul'><b><font size='1'>© Federação Mineira de Ciclismo 2003 - Todos os direitos reservados</font></b></span></span><font size='1'><b><span class='fonte_menor'><span class='fonte_menor_azul'>"

HTML = HTML & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'><br>"

HTML = HTML & " <font size='1' color='#003399'>Av: Olegário Maciel, 311 SL 109 Centro - Cep: 30180.110<br>"

HTML = HTML & " Belo Horizonte - MG / Brasil - Tel: 31 3201 3610 </font></span></span>"

HTML = HTML & " </span></font></p>"

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & " </table>"

 

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & " </table>"

 

 

HTML = HTML & " </td>"

HTML = HTML & " </tr>"

HTML = HTML & "</table>"

footer = "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>"

footer = footer & "<tr bgcolor='#023292'>"

footer = footer & " <td> "

footer = footer & " <table width='100%' border='0' cellspacing=0' cellpadding='0'>"

footer = footer & " <tr valign='middle' align='center'>"

footer = footer & " <td bgcolor='#FFFFFF'> "

footer = footer & " <table width='435' border='0' cellspacing='0' cellpadding='0' align='center'>"

footer = footer & " <tr> "

footer = footer & " <td>"

footer = footer & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>"

footer = footer & " <span class='fonte_menor'><span class='fonte_menor_azul'><b>Este e-mail não é um SPAM.<br></b></span></span><b><span class='fonte_menor'><span class='fonte_menor_azul'> "

footer = footer & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'>"

footer = footer & " <font size='1' color='#003399'>Você recebeu este e-mail porque está cadastrado no site <a href='http://www.fmc.org.br'>www.fmc.org.br</a><br>"

footer = footer & " Se não deseja receber mais este e-mail, <a href='http://www.fmc.org.br/newsletter/newsletter_apaga.asp?n_cod="& vuser &"'>clique aqui.</a></font></span></span> </span></font></p>"

footer = footer & " </span></font></p>"

footer = footer & " </td>"

footer = footer & " </tr>"

footer = footer & " </table>"

footer = footer & "</table></table>"

 

 

 

 

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

objMail.To = vmail

objMail.From = "newsletter@fmc.org.br"

objMail.Subject = request.form("assunto_do_email")

 

objMail.BodyFormat = 0

objMail.MailFormat = 0

 

objMail.Body = style & top & HTML & footer

 

 

if objMail.send = true then

foi = foi+1

else

nfoi = nfoi+1

end if

 

set objMail = nothing

 

 

'fim do código do email ***********

 

End If

x=x+1

 

if x=10 then

x=0

response.write "E-mail's enviados: "& foi &"<br>"

response.write "E-mail's não enviados: "& nfoi

end if

rs.movenext

loop

rs.movenext

wend

 

rs.close

set rs = nothing

 

If n = 1 then

msg = "Foi enviado " & n & " e-mail com sucesso"

else

msg = "Foram enviados " & n & " e-mails com sucesso"

end if

 

call sucesso(msg)

 

%>

 

 

Espero que alguém possa me ajudar....

Gabriel

Compartilhar este post


Link para o post
Compartilhar em outros sites

Copia o código todo abaixo e testa...<!-- #include file="admin.asp" --><%Server.ScriptTimeOut=99999999Dim strConDim objRecDim objConDim vmailDim vuserDim nvtext = request.form("txt")'vtext = "TESTE GABRIEL"'Response.write vtext'Response.endstrCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\home\fmc1\dados\news.mdb"Set objCon = Server.CreateObject ("ADODB.Connection")set rs = server.createobject("adodb.recordset")sql = "select n_cod,n_mail from emails"rs.open sql,strConn = 0x = 0do while not rs.eof and x < 10'*** enviando os 10 emails vmail = rs("n_mail")vuser = rs("n_cod")n = n + 1style = ""HTML = ""footer = ""top = ""style = "<style type='text/css'><!--"style = style & ".fonte_menor {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #000000}"style = style & ".fonte_menor_bold {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #000000}"style = style & ".fonte_menor_bold_azul {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: bold; font-variant: normal; color: #003399}"style = style & ".fonte_menor_azul { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; color: #003399}"style = style & "A:link { "style = style & "color: #003399; }"style = style & "A:visited {"style = style & "color: #003399; }"style = style & "A:active {"style = style & "color: #003399; }"style = style & "A:hover {"style = style & "color: #003399; }"style = style & "-->"style = style & "</style>"top = "<table width='405' border='0' cellspacing='0' cellpadding='1' height='300' align='center'>"top = top & " <tr> "top = top & " <td><img src='http://www.fmc.org.br/img/newsletter_topo.gif'></td>"top = top & " </tr>"top = top & " <tr> "top = top & " <td bgcolor='#023292'> "HTML = HTML &" <table width='100%' border='0' cellspacing='0' cellpadding='0' height='300' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td width='450' height='276' bgcolor='#FFFFFF' valign='top'> "HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td><div style='font-family:Verdana, Arial, Helvetica, sans-serif;font-size:9pt;'>"HTML = HTML & vtextHTML = HTML & "</div></td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " <tr> "HTML = HTML & " <td width='450' bgcolor='#FFFFFF'> "HTML = HTML & " <div align='right'></div>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & "</table>"HTML = HTML & "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>"HTML = HTML & " <tr bgcolor='#023292'> "HTML = HTML & " <td> "HTML = HTML & " <table width='100%' border='0' cellspacing='0' cellpadding='0'>"HTML = HTML & " <tr valign='middle' align='center'> "HTML = HTML & " <td bgcolor='#FFFFFF'> "HTML = HTML & " <table width='421' border='0' cellspacing='0' cellpadding='0' align='center'>"HTML = HTML & " <tr> "HTML = HTML & " <td> "HTML = HTML & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>"HTML = HTML & " <span class='fonte_menor'><span class='fonte_menor_azul'><b><font size='1'>© Federação Mineira de Ciclismo 2003 - Todos os direitos reservados</font></b></span></span><font size='1'><b><span class='fonte_menor'><span class='fonte_menor_azul'>"HTML = HTML & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'><br>"HTML = HTML & " <font size='1' color='#003399'>Av: Olegário Maciel, 311 SL 109 Centro - Cep: 30180.110<br>"HTML = HTML & " Belo Horizonte - MG / Brasil - Tel: 31 3201 3610 </font></span></span>"HTML = HTML & " </span></font></p>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & " </table>"HTML = HTML & " </td>"HTML = HTML & " </tr>"HTML = HTML & "</table>"footer = "<table width='470' border='0' cellspacing='2' cellpadding='1' align='center'>"footer = footer & "<tr bgcolor='#023292'>"footer = footer & " <td> "footer = footer & " <table width='100%' border='0' cellspacing=0' cellpadding='0'>"footer = footer & " <tr valign='middle' align='center'>" footer = footer & " <td bgcolor='#FFFFFF'> "footer = footer & " <table width='435' border='0' cellspacing='0' cellpadding='0' align='center'>"footer = footer & " <tr> "footer = footer & " <td>" footer = footer & " <p><font face='Arial, Helvetica, sans-serif' size='2'><span class='fonte_menor_bold_azul'>"footer = footer & " <span class='fonte_menor'><span class='fonte_menor_azul'><b>Este e-mail não é um SPAM.<br></b></span></span><b><span class='fonte_menor'><span class='fonte_menor_azul'> "footer = footer & " </span></span></b><span class='fonte_menor_azul'><span class='fonte_menor'>"footer = footer & " <font size='1' color='#003399'>Você recebeu este e-mail porque está cadastrado no site <a href='http://www.fmc.org.br'>www.fmc.org.br</a><br>"footer = footer & " Se não deseja receber mais este e-mail, <a href='http://www.fmc.org.br/newsletter/newsletter_apaga.asp?n_cod="& vuser &"'>clique aqui.</a></font></span></span> </span></font></p>"footer = footer & " </span></font></p>"footer = footer & " </td>"footer = footer & " </tr>"footer = footer & " </table>"footer = footer & "</table></table>"Set objMail = Server.CreateObject("CDONTS.NewMail")objMail.To = vmailobjMail.From = "newsletter@fmc.org.br"objMail.Subject = request.form("assunto_do_email")objMail.BodyFormat = 0 objMail.MailFormat = 0 objMail.Body = style & top & HTML & footerif objMail.send = true thenfoi = foi+1elsenfoi = nfoi+1end ifset objMail = nothing'fim do código do email ***********x=x+1if x=10 thenx=0response.write "E-mail's enviados: "& foi &"<br>"response.write "E-mail's não enviados: "& nfoiend ifrs.movenextlooprs.closeset rs = nothingIf n = 1 thenmsg = "Foi enviado " & n & " e-mail com sucesso"elsemsg = "Foram enviados " & n & " e-mails com sucesso"end ifcall sucesso(msg)%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

gamefe, faça isso:cont = 0While (not Rs.EOF) and (not cont = 10)if mail.send then cont = cont + 1wendachu ki deu pra pegá a lógica, né!? :rolleyes:

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.