473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

CDO email an image

347 100+
HI i am trying to add a company logo to a cdo email sent from our website.

the code i am using at the moment is

Expand|Select|Wrap|Line Numbers
  1. <%
  2. 'Sends an email
  3. Dim mail
  4. Set mail=Server.CreateObject("CDO.Message")
  5. mail.To=Request.Form("To")
  6. mail.From="jake@yaketyyak.co.uk"
  7. mail.Bcc=Request.Form("Bcc1")
  8. mail.Subject=Request.Form("Subject")
  9. mail.HTMLBody=Request.form("body2") & Request.Form("Body") & vbNewline & "<img src=http://www.yaketyyak.co.uk/images/makeup/letterheadsmall.jpg>" & vbNewline & Request.Form("Bodyfooter")
  10. mail.Send()
  11. Response.Write("")
  12. 'Destroy the mail object!
  13. Set mail = nothing
  14. %>
this sends the email perfectly but the image comes up with a red cross and no image, this i think is down to the missing " in the img src

The image source line in the email reads as follows

Expand|Select|Wrap|Line Numbers
  1. <img src=http://www.yaketyyak.co.uk/images/makeup/letterheadsmall.jpg>
I have tried various ways to code this line but cant get the inverted commas to appear
Jul 14 '09 #1
2 2752
jhardman
3,406 Expert 2GB
try this
Expand|Select|Wrap|Line Numbers
  1. '...
  2. dim q
  3. q = chr(34)
  4. mail.HTMLBody=Request.form("body2") & Request.Form("Body") & vbNewline & "<img src=" & q & "http://www.yaketyyak.co.uk/images/makeup/letterheadsmall.jpg" & q & ">" & vbNewline & Request.Form("Bodyfooter")
  5. '...
that should solve the quote mark issue, I'm not sure it will resolve the issue of the img showing up.

Jared
Jul 14 '09 #2
colinod
347 100+
Hi Jared

I just added some inverted commas as the following and it worked

Expand|Select|Wrap|Line Numbers
  1. mail.HTMLBody=Request.form("body2") & Request.Form("Body") & vbNewline & "<img src=""http://www.yaketyyak.co.uk/images/makeup/letterheadsmall.jpg"">" & vbNewline & Request.Form("Bodyfooter")
Jul 15 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dont bother | last post by:
Hey, I have been trying to parse emails: But I could not find any examples or snippets of parsing emails in python from the documentation. Google did not help me much too. I am trying to...
1
by: Simon Wigzell | last post by:
I send HTML formatted emails with links and images in them generated by my asp driven website. Occasionally the image will not appear and the link will not work. By looking at the email at the...
4
by: web_design | last post by:
I put this together from some other scripts I am using on a site. I'm trying to make a better email hiding script. It isn't working. Also, it causes Internet Explorer 6 SP2 to block the script...
3
by: jason | last post by:
Hello. This one is kinda out there. I have asp.net code that will email my yahoo account a <img> like with image on the server. When I open it in yahoo I get the full image on screen. works...
2
by: Fabio Negri Cicotti [MCP] | last post by:
Hi all. How do I do to display a picture on e-mail's body when visualized using Outlook Express? I've set the properties bellow but till now I've got the image shown as that box with a red...
1
by: frekster | last post by:
Hi. Looking for some feedback on how to prevent a specific spam attack. I have a form for a person to subscribe to a mailing list and they can type in their email and click submit to...
2
by: hurricane_number_one | last post by:
I have a php script which basically spits out an image. I want to send this image in an email but don't want the image to be an attachment, embedded in the email or cached. I'm able to do this...
4
by: Ahmd | last post by:
Pls help I want send one image and some text inside the image as mail. Pls how can i do it in asp. thanks in advance
3
by: nicjones | last post by:
Apologies if these have already been posted, had a quick search but couldn't find anything. Being a bit of a novice to web design I have 2 quick questions if you'd be so kind guys:- ...
1
by: E11esar | last post by:
Hi there. I am developing a mobile device application which has an OpenFileDialog control which copies an image into a PictureBox, code as follows: try { OpenFileDialog open = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.