Welcome to WebmasterWorld Guest from 3.227.3.146

Forum Moderators: ocean10000

Message Too Old, No Replies

Sending HTML email with CDONTS

Need solution for a dot eating problem while sending HTML email with ASP

     
3:46 pm on Dec 19, 2002 (gmt 0)

New User

10+ Year Member

joined:Dec 19, 2002
posts:4
votes: 0


Sometimes when I send html email with cdonts the dot in the picture name disappears. picturename.gif becomes picturenamegif - it totaly messes up the look of the page and I can't find any reason why this is happening. It only happens on some of the picture names and only sometimes. Does anybody know what causes it?
Thanks for any suggestions.
Les
5:17 pm on Dec 19, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Welcome [webmasterworld.com] to WebmasterWorld, Xntec_Les!

Could you maybe post a small snippet of your code where your ASP is writing the code of the <img> tag? It may help us to find the root of the problem.

Are you setting the body format to HTML:
MailObj.Mailformat = 0
MailObj.Bodyformat = 0
This sets the MIME type to html rather than plain-text. In plain text dot's need to be escaped using "\.".

Also MailObj.Value("Content-Transfer-Encoding") = "8bit" may also help. SMTP uses "." as one of it's commands (eg: "new line dot new line" means end of data part transmission).

6:23 pm on Dec 19, 2002 (gmt 0)

New User

10+ Year Member

joined:Dec 19, 2002
posts:4
votes: 0


Thanks for the suggestion. I tried it but it is still doing it. The name of the picture that is beeing changed is leftofbuttons.gif (changes to leftofbuttonsgif).
Below is the code I use to send the emails.
<code>
dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.To =email
objCDO.From =strFrom
objCDO.Subject =strSubject
objCDO.BodyFormat =0 ' HTML
objCDO.MailFormat = 0 ' MIME
objCDO.Value("Content-Transfer-Encoding") = "8bit"
objCDO.Body = strBody
objCDO.Send
Set objCDO = Nothing
</code>
11:44 am on Dec 20, 2002 (gmt 0)

Full Member

10+ Year Member

joined:Dec 9, 2002
posts:325
votes: 0


Hi,

Just as a debugging aid - have you tried writing the strBody value to screen before you send out the email?

You could run the script a good few times, and then compare the output on screen to what you receive in the email.

As far as I know there are no errors in the CDONTS component - but you never know.

HTH,
JP

3:11 pm on Dec 20, 2002 (gmt 0)

New User

10+ Year Member

joined:Dec 19, 2002
posts:4
votes: 0


Thanks for your suggestion. I did that and since I write strBody to the SQL database I also queried it with Query Analizer. The results were OK in these two cases. This allows me to assume that there is an issue with CDONTS or SMTP.
Thanks again
Les
3:50 pm on Dec 20, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 25, 2002
posts:3185
votes: 0


Did you try escaping the "."? It could be an SMTP thing, although I can't say that I've ever seen it before.
4:02 pm on Dec 20, 2002 (gmt 0)

New User

10+ Year Member

joined:Dec 19, 2002
posts:4
votes: 0


"&#46;" works!
Thanks a lot - you guys are great.
Les