Ir para conteúdo

POWERED BY:

Arquivado

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

shumi

E mail

Recommended Posts

Galera me da uma ajuda aqui!!!

 

Estou mandando um e-mail com um convite em jpg pra um pessoal esse codigo abaixo esta funcionando perfeitamente!!!!

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><%server.scriptTimeout = 3600Dim MailDim STR_HTMLDim filename, contentfilename = request.querystring("nf") lang = Request.QueryString("lang")Set fs=Server.CreateObject("Scripting.FileSystemObject")'open the fileSet f=fs.OpenTextFile(Server.MapPath(filename), 1)i=0do while f.AtEndOfStream = false	line = f.ReadLine	myarray = Split(line, ";")		id_panelist = trim(myarray(0))	name_panelist = trim(myarray(1))	email_panelist = trim(myarray(2))	'sex_panelist = trim(myarray(3))			id_survey =108	lang="PT"	fk_country=31	url_survey="http://www.ecglobalpanel.com/ecsurvey/takesurvey.asp?lang=PT&sv="&id_survey&"&ct="&fk_country&"&ps_id="&id_panelist&""	url_optout="http://www.ecglobalpanel.com/ecsurvey/remove_panel.asp?lang="& lang &"&id="& id_panelist	url_rules="http://www.ecglobalpanel.com/ecsurvey/104/rules.asp"			txt_url_optout ="Se você não desejar mais receber e-mails desta lista por favor clique <a href="& url_optout &">aqui</a>."			subject_line =" Conveção de Vendas Tim"	response.write id_panelist & ";" & email_panelist &"<br>"	STR_HTML = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /><title>Convenção de Vendas TIM 2005</title></head><body style='margin:0px;'><div align='center'><table border='0' cellpadding='0' cellspacing='0'><tr><td height='55' style='font-family:Arial, Helvetica, sans-serif; font-size:11px; padding-top:5px;'>Caso não esteja visualizando o e-mail abaixo  por favor <a style='color:#004BF4;' href='http://www.newstyle1.com'>clique aqui</a></td></tr><tr><td align='center'><a href='http://www.newstyle1.com'><img src='http://www.newstyle1.com/imagens/cliqueaqui_email.jpg' alt='Clique aqui.' width='295' height='230' border='0'></a></td></tr></table></div></body></html>"'ASPMail	'Set Mail = Server.CreateObject("Persits.MailSender") 	'Mail.Host = "127.0.0.1" 	'Mail.From = "survey@ecglobalpanel.com"	'Mail.FromName = "eCGlobalPanel"	'Mail.AddAddress email_panelist	'Mail.Subject =  subject_line 	'Mail.Body = STR_HTML	'Mail.IsHTML = True 	'On Error Resume Next	'	Mail.Send	'CDONTS	Set objMail = Server.CreateObject("CDONTS.Newmail") 	objMail.To = email_panelist	objMail.From = "newstyle@newstyle.com.br"	objMail.Subject = subject_line	objMail.Bodyformat = 0	objMail.MailFormat = 0	objMail.Body = STR_HTML	objMail.Send	'Response.Write("<br><strong>Subject: "& subject_line &"</strong><br>"& STR_HTML)	Set objMail = Nothing		id_panelist = ""	name_panelist = ""	email_panelist = ""	'sex_panelist = ""	'fk_country = ""	'birth_year_panelist = ""		'if i=10 then	'	response.end	'end if	i=i+1Loopresponse.write "<br>Total of emails sent:"& i%>
Só que algumas pessoas q estava fazendo teste a imagem não esta abrindo, pois essa imagem esta hospedada na minha FTP e tinha tag em HTML busta ela: <a href='http://www.newstyle1.com'><img src='http://www.newstyle1.com/imagens/cliqueaqui_email.jpg' alt='Clique aqui.' width='295' height='230' border='0'></a>

 

O ideal seria mandar a imagem em anexo e fazer essa mensagem abrir o convite na url www.newstyle1.com.

mas não sei como faço isso!!!!!!

 

por favor se alguem souber me ajude, pois tenho que mandar esses convites URGENTE!!!!!

 

Valeu

ShUmI

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara a imagem tem que ficar numa url mesmo num da pra anexa ela e exibi ela no corpo da mensagem! deve ser problema no email do cara.. tenta criar emails em algumas contas tipo, uol, terra, bol, ig e etc e testa... um email que eu sei que não carrega imagem é o GMAIL então para esse email eskece..

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara a imagem tem que ficar numa url mesmo num da pra anexa ela e exibi ela no corpo da mensagem! deve ser problema no email do cara.. tenta criar emails em algumas contas tipo, uol, terra, bol, ig e etc e testa... um email que eu sei que não carrega imagem é o GMAIL então para esse email eskece..

Cara eu consegui anexar....sabe akele outro arquivo q você tinha me ensinado?entao eu juntei os dois tentei algumas coisas quando deram erro e consegui!!!!!!!!!!mas valeu muito pela ajuda q vcs estao me dando!!!!!! se liga como ficou o codigo
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><%server.scriptTimeout = 3600Dim MailDim STR_HTMLDim filename, contentfilename = request.querystring("nf") lang = Request.QueryString("lang")Set fs=Server.CreateObject("Scripting.FileSystemObject")'open the fileSet f=fs.OpenTextFile(Server.MapPath(filename), 1)i=0do while f.AtEndOfStream = false	line = f.ReadLine	myarray = Split(line, ";")		id_panelist = trim(myarray(0))	name_panelist = trim(myarray(1))	email_panelist = trim(myarray(2))	'sex_panelist = trim(myarray(3))			id_survey =108	lang="PT"	fk_country=31	url_survey="http://www.ecglobalpanel.com/ecsurvey/takesurvey.asp?lang=PT&sv="&id_survey&"&ct="&fk_country&"&ps_id="&id_panelist&""	url_optout="http://www.ecglobalpanel.com/ecsurvey/remove_panel.asp?lang="& lang &"&id="& id_panelist	url_rules="http://www.ecglobalpanel.com/ecsurvey/104/rules.asp"			txt_url_optout ="Se você não desejar mais receber e-mails desta lista por favor clique <a href="& url_optout &">aqui</a>."			subject_line =" Convenção de Vendas TIM"	response.write id_panelist & ";" & email_panelist &"<br>"	STR_HTML = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' /><title>Convenção de Vendas TIM 2005</title></head><body style='margin:0px;'><div align='center'><table border='0' cellpadding='0' cellspacing='0'><tr><td height='55' style='font-family:Arial, Helvetica, sans-serif; font-size:11px; padding-top:5px;'>Caso não esteja visualizando o e-mail abaixo  por favor <a style='color:#004BF4;' href='http://www.newstyle1.com'>clique aqui</a></td></tr><tr><td align='center'><a href='http://www.newstyle1.com'>'<img src='cliqueaqui_email.jpg'>'</a></td></tr></table></div></body></html>"'ASPMail	'Set Mail = Server.CreateObject("Persits.MailSender") 	'Mail.Host = "127.0.0.1" 	'Mail.From = "survey@ecglobalpanel.com"	'Mail.FromName = "eCGlobalPanel"	'Mail.AddAddress email_panelist	'Mail.Subject =  subject_line 	'Mail.Body = STR_HTML	'Mail.IsHTML = True 	'On Error Resume Next	'	Mail.Send	'CDONTS			Set objMail = Server.CreateObject("CDONTS.Newmail") 	ObjMail.AttachURL Server.MapPath("cliqueaqui_email.jpg"),"cliqueaqui_email.jpg"	objMail.To = email_panelist	objMail.From = "TIM Nordeste <timnordeste@newstyle.com.br>"	objMail.Subject = subject_line	objMail.Bodyformat = 0	objMail.MailFormat = 0	objMail.Body = STR_HTML	objMail.Send	'Response.Write("<br><strong>Subject: "& subject_line &"</strong><br>"& STR_HTML)	Set objMail = Nothing		id_panelist = ""	name_panelist = ""	email_panelist = ""	'sex_panelist = ""	'fk_country = ""	'birth_year_panelist = ""		'if i=10 then	'	response.end	'end if	i=i+1Loopresponse.write "<br>Total of emails sent:"& i%>
Valeu novamenteShUmI

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.