From: Giorgio on 7 Dec 2006 13:29 Hi, I'm using ASP 3 and I send mail with CDONTS.NewMail or CDO.Message. If my mail contains some html code with images like <img src="URL">, OE blocks image's visualization. If i want to avoid this, when i send my mail from OE i flag "send images with message" option. How can i realize this when i send the mail with ASP? Thanks
From: Giorgio on 7 Dec 2006 14:26 I'm looking AttachURL method. objMail.AttachURL Source, ContentLocation But it seems not to work if i put in Source a path like http://www.google.it/intl/it_it/images/logo.gif
From: eddyger on 8 Dec 2006 04:24 Hi, view below (i have tested it successfuly ): messageHTML = "<BODY><CENTER><IMG src=" + IMAGEFILE + " />" messageHTML = ..... sendMailHtml("from(a)me.com" ,"to(a)you.com" , "TEST" , messageHTML) Sub sendMailHtml(emetteur, destinataire, sujet, message) Dim objMAIL Dim cheminImage Dim objShell set objShell = CreateObject("WScript.Shell") cheminImage = objShell.CurrentDirectory + "\" + IMAGEFILE set objMAIL = CreateObject("CDO.Message") objMAIL.From = emetteur objMAIL.To = destinataire objMAIL.Subject = sujet objMAIL.HTMLBody = message objMAIL.AddRelatedBodyPart cheminImage , IMAGEFILE , CDOCdoReferenceTypecdoRefTypeId objMAIL.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMAIL.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtphost" objMAIL.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMAIL.Configuration.Fields.Update On Error Resume Next objMAIL.Send If Err.Number <> 0 Then 'Wscript.echo "Erreur : " + Cstr(Err.Number) + " ," + Err.Description On error goto 0 End if End Sub
From: Giorgio on 10 Dec 2006 06:24 > set objMAIL = CreateObject("CDO.Message") Thanks, but it works only on IIS.. Is it possible to use CDONTS and use a web path like this http://www.google.it/intl/it_it/images/logo.gif to attach an image?
From: Anthony Jones on 10 Dec 2006 11:00 "Giorgio" <dac(a)sa.it> wrote in message news:457bee0c$0$22382$4fafbaef(a)reader2.news.tin.it... > > set objMAIL = CreateObject("CDO.Message") > > Thanks, but it works only on IIS.. What do you want it to work 'on'? > Is it possible to use CDONTS and use a web path like this > http://www.google.it/intl/it_it/images/logo.gif to attach an image? > CDONTS is deprecated, why is using CDOSYS a problem?
|
Next
|
Last
Pages: 1 2 Prev: How To Retrieve ADO Recordset from Oracle Function Through ASP?+ Next: Classic asp and IIS 6.0 |