You need to host the image on a publicly accessible web server and
provide the full url in the src attribute:
<img src=""
http://www.domain.pt/images/image.gif"">
Incidentally, all that string concatentation is terribly wasteful.
Each time you write strBody = strBody &, the ASP engine has to recreate
the string from scratch, as well as hold the current value of strBody
in memory. When I design an html email, I create it in Dreamweaver (or
some other WYSIWYG editor) then take the resulting html source, pop it
into word and run a tiny macro I created to double up on double quotes
and remove paragraphs. That gives me one long unbroken string.
Or you can use the underscore character:
strBody = "some text" & _
"some more text" & _
"even more text"
--
Mike Brind
Manuel wrote:
James,
I´m pasting the code that I have now. I hope you bypass the portuguese
language issue.
As you can see, this is a confirmation message of the record insertion in
SQL2000 Server database. I hope this will help you better in your guidance.
Everything works just fine except for the image part as I´ve described in
the previous post.
Thanks again for your pacience.
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Iterartis_Web_STRING
Recordset1.Source = "SELECT ID, Nome, Cidade, Pais, Email, Telefone,
Telemovel, Nome_Contacto, Data_Prevista, Cidade_Origem, Cidade_Destino,
Descricao_Conteudos FROM dbo.contacto_tbl ORDER BY ID DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 1
Dim strNome, strCidade, strPais, strEmail, strTelefone, strTelemovel,
strContacto, strDataPrevista, strCidadeOrigem, strCidadeDestino,
strDescricao, strImage
Dim strBody
strNome = Recordset1("Nome")
strCidade = Recordset1("Cidade")
strPais = Recordset1("Pais")
strEmail = Recordset1("Email")
strTelefone = Recordset1("Telefone")
strTelemovel = Recordset1("Telemovel")
strContacto = Recordset1("Nome_Contacto")
strDataPrevista = Recordset1("Data_Prevista")
strCidadeOrigem = Recordset1("Cidade_Origem")
strCidadeDestino = Recordset1("Cidade_Destino")
strDescricao = Recordset1("Descricao_Conteudos")
strBody = strBody & "<img src=""/images/Logo.gif""/>" & "<br>" & "<br>"
[snipped]
Dim ObjSendMail
Set ObjSendMail = CreateObject("CDO.Message")
ObjSendMail.To = strEmail
ObjSendMail.Bcc = "(e-mail address removed)"
ObjSendMail.Subject = "Confirmação de Pedido de Orçamento"
ObjSendMail.From = "(e-mail address removed)"
' we are sending a html email.. simply switch the comments around to send a
text email instead
ObjSendMail.HTMLBody = strBody
'ObjSendMail.TextBody = strBody
ObjSendMail.Send
Set ObjSendMail = Nothing
%>
--
Manuel
:
well since u kno how to embed HTML, just use the the img tag
connName.HTMLBody = "<img src=""URL TO IMAGE"" height=""XX"" width=""XX"">
change the connName to ur connection name.
change URL TO IMAGE to the link to ur images u wanna embed.
change height and width as needed. if ur not gonna mess with these
attributes, then just remove them.
note that i have used 2 sets of quoation marks on each side of the value.
"URL TO IMAGE"
will throw you an error, and will not send ur message.
""URL TO IMAGE""
is the correct format.
Hope this helps
Jay
Is it possible to embed an image, like a company logo in a CDOSYS
generated
message?
If yes, I´ll apreciate some code sample. I´ve been able to format messages
in html the way I like, but I can't figure out how to embed an image.
Thanks for your time.