I'm trying to do is send a temp password to the user email. It works fine but I just want to add images inside the message seems like it showing n/a image. My directory are correct, I even try using a URL image but still wont work. Please help here.

Set cdoConfig = CreateObject("CDO.Configuration")  

    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = 2  
        .Item(cdoSMTPServer) = "******" 
        .Item(cdoSMTPServerPort) = "25" 
        .Item(cdoSMTPConnectiontimeout) = "10"
        ''.Item(cdoSMTPAuthenticate) = 1  
       '' .Item(cdoSendUsername) = "<enter_username_here>"  
       '' .Item(cdoSendPassword) = "<enter_password_here>"  
        .Update  
    End With 

    Set cdoMessage = CreateObject("CDO.Message")  

    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "support@mysystem.com" 
        .To =  html
        .Subject = "Forgotten Password"

.HTMLBody = "<img src='myimage.asp'><br><br>Dear Valued Client; <p>Thank you for selecting us as your system. <br>Your Temporary password for th. </b>  Your Temporary password is: <b>'"& RanPassword &"'</b><br> Please log in with the link below using the temporary passsword. Once you log in with your temporary password, you will be asked to reset your temporary password to a permanent password. <br><br><br>Please contact us if you have any quests at (000)-000-0000 Extension 00. <br><br><br>Best Regards, <br>The Application Support Team<br><br><img src='/images/MyLogo.gif'>" 
Member Avatar for havok

Yeah it looks good to me to, you got a url for those images so I can mess around with the code and see if I can get it to work?

Thanks.

I just google a random image see if it works first. Try it

Member Avatar for havok

Hey Man, try this out, I edited the code in my syntax editor that shows errors, you should notice that at least the images are no showing...

Let me know if it looks any different with this below:

Set cdoConfig = CreateObject("CDO.Configuration")  
    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = 2  
        .Item(cdoSMTPServer) = "******" 
        .Item(cdoSMTPServerPort) = "25" 
        .Item(cdoSMTPConnectiontimeout) = "10"
        ''.Item(cdoSMTPAuthenticate) = 1  
       '' .Item(cdoSendUsername) = "<enter_username_here>"  
       '' .Item(cdoSendPassword) = "<enter_password_here>"  
        .Update  
    End With 
    Set cdoMessage = CreateObject("CDO.Message")  
    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "support@mysystem.com" 
        .To =  html
        .Subject = "Forgotten Password"
.HTMLBody = <img src="http://upload.wikimedia.org/wikipedia/commons/2/22/Turkish_Van_Cat.jpg"><br><br>Dear Valued Client; <p>Thank you for selecting us as your system. <br>Your Temporary password for th. </b>  Your Temporary password is: <b>"& RanPassword &"</b><br> Please log in with the link below using the temporary passsword. Once you log in with your temporary password, you will be asked to reset your temporary password to a permanent password. <br><br><br>Please contact us if you have any quests at (000)-000-0000 Extension 00. <br><br><br>Best Regards, <br>The Application Support Team<br><br><img src="http://upload.wikimedia.org/wikipedia/commons/2/22/Turkish_Van_Cat.jpg">
Member Avatar for havok

Judging from the way your code looked and the way mine looks, I think it may work for you... But that's just judging from the syntax highlighting here on DaniWeb and in my Sublime Text editor.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.