Print Page | Close Window

Sending Picture in an Email using CDONTS

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9841
Printed Date: 31 March 2026 at 6:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Sending Picture in an Email using CDONTS
Posted By: Misty
Subject: Sending Picture in an Email using CDONTS
Date 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

 

 




Replies:
Posted By: pmormr
Date Posted: 15 February 2004 at 8:26pm

  EmailBody = EmailBody = EmailBody & vbCrLf & vbCrLf & "<p><a href="" http://www.brightideaweb.com - 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 - http://www.illgetit.info/_images/myimage.gif  NOT just myimage.gif



-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: Misty
Date 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?



Posted By: Phat
Date 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>"



Posted By: Misty
Date 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.

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net