Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Sending Picture in an Email using CDONTS
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sending Picture in an Email using CDONTS

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Sending Picture in an Email using CDONTS
    Posted: 15 February 2004 at 4:50pm

I am having some problems with my code. You can see it below. Please look at the line that is red. The results don't show up in the body of the email. It shows True instead. Can someone please help me with this?

dim MyMail

 

  Set MyMail = Server.CreateObject("CDO.Message")

 

      EmailBody = Message

      EmailBody = EmailBody = EmailBody & vbCrLf & vbCrLf & "<p><a href=""http://www.brightideaweb.com" & "/ViewFormResults.asp?ID=" & EmailID & """> <img src=logo.gif"> "</a>"

    

      

     

        with MyMail          

      .From = Sender & "<" & SenderEmail & ">"

        .To = Name & "<" & Email & ">" 

        .Subject = Subject

        .HTMLBody = EmailBody

        '.TextBody = EmailBody

        .Send()

End With

 

 



Edited by Misty
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 8:26pm

  EmailBody = EmailBody = EmailBody & vbCrLf & vbCrLf & "<p><a href=""http://www.brightideaweb.com" & "/ViewFormResults.asp?ID=" & EmailID & """><img src=""logo.gif""></a>"

i fixed some of the quotes... plus with emails, the image source has to be a full name, not just logo.gif...

i.e. http://www.illgetit.info/_images/myimage.gif NOT just myimage.gif

Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 9:14pm

Thank you for the help on the code! I didn't get any error messages on the web page that sent the email itself. I received the email. But the body of the email shows False. It doesn't show the actual message or the picture. I don't know what's wrong. Does anyone know what is wrong?

Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 9:53pm

Try this

 

      EmailBody = Message

      EmailBody = EmailBody & vbCrLf & vbCrLf & "<p><a href=""http://www.brightideaweb.com" & "/ViewFormResults.asp?ID=" & EmailID & """> <img src=logo.gif"> "</a>"

Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 9:57pm

Phat,

It is still not working. The body of the email shows True now. I don't understand why this is happening.

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.