Re: CDO Message Problem
- From: "9ntw9" <nathaniel.williams@xxxxxxxxx>
- Date: 5 Jan 2007 06:11:55 -0800
I've tried another approach now:
function tester (sBody)
Dim iMsg
Dim iBp1
Dim iBp3
Dim Stm
Set iMsg = CreateObject("CDO.Message")
With iMsg
.From = sFrom
.To = sTo
.Subject = sSubject
End With
Set iBp1 = iMsg.BodyPart
iBp1.ContentMediaType = "multipart/mixed"
Set iBp3 = iBp1.AddBodyPart
With iBp3
.ContentMediaType = "text/html"
.ContentTransferEncoding = "quoted-printable"
Set Stm = .GetDecodedContentStream
Stm.WriteText sBody
Stm.Flush
End With
Stm.Close
Set Stm = Nothing
iMsg.Send
end function
---------
i then wrote iMsg.GetStream.ReadText to the screen and got this:
thread-index: AccwS7JFFUXwh40fTiWWguVEYVtupw== Thread-Topic: A html and
text message with attachment. From: To: Subject: A html and text
message with attachment. MIME-Version: 1.0 Content-Type: text/html
Content-Transfer-Encoding: 7bit Content-Class:
urn:content-classes:message Importance: normal Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757
followed by an output of the actual message.
Is there anything in this header info that stands out as being the
problem to anyone?
I've implemented this new mail function and I'm waiting to here back
from my client (as I've enver been able to reproduce the error myself).
Thanks again everyone!
elesus@xxxxxxxxx wrote:
I was searching the web for quite some time trying to solve pretty same
problem.
My script is the same as yours Nathaniel. Since last month or so I
started to get wrapped html mails, before that everything was just
fine. May it be some ms update to the cdosys component?
In my case I get html mails where some characters disappear or spaces
are added, so it breaks the html structure.
Have not found solution yet. Will post here if found.
Alex
9ntw9 raše:
Just to add, I recently added the 1st function on this page to my mail:
http://www.motobit.com/tips/detpg_quoted-printable-encode/
so now the line reads : objMail.HTMLBody =
QuotedPrintableEncode(sTextBody, "") instead of objMail.HTMLBody =
sTextBody
I am not sure if this is what you were referring to originally, but
after a quick look at the results I've found that it does a pretty good
job of destroying the formatting of the html (squishes it), and it
renders images a small black squares.
9ntw9 wrote:
Thanks for your time,
Here is the code being used to send the mail:
Set objMail = Server.CreateObject("CDO.Message")
objMail.MIMEFormatted=true
objMail.From = sFrom
objMail.To = sTo
objMail.Subject= sSubject
objMail.HTMLBody = sTextBody
objMail.Send
I set the MIMEFormatted = True after reading an article that suggested
it would fix the problem, but no luck. (There was no apparent change)
sTextBody (the contents being afftected by the issue) is derived from a
chunk of code that pulls various items out of a db and builds them into
an html table for viewing (6 cols wide, N cols long) ... the html being
written is standard, and there's nothing too fancy going on. The
contents of sTextBody are not being prepped for email (do they need to
be, if so, in what fashion?), the html inside sTextBody are written as
though for a standard webpage (although without opening html tags,
basically written to be dropped into the body section of a website).
Thanks again,
Nathaniel
Anthony Jones wrote:
"9ntw9" <nathaniel.williams@xxxxxxxxx> wrote in message
news:1167834352.020953.260230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm having trouble with an html formatted email that is being delivered
to a client. Every 80 characters there is a forced space being added
to the emails (by the server? by cdo Message?) and it's causing the
html tags to be broken. The unusual thing is that I cannot replicate
the error locally in Outlook, or @ gmail or @ hotmail. Only the client
is having the issue (Using Outlook Express).
Is this an issue that most mail clients have resolved, or is this
something that I will have to take care of from my side?
Sounds like the body is not being formatted as quoted-printable. Can you
show some code you are using to create the email?
Can you change the configuration object to use a temporary folder as a
pickup folder instead of port 25? you can then examine the exact EML file
being created.
Thanks!
.
- Follow-Ups:
- Re: CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- References:
- CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- From: Anthony Jones
- Re: CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- From: elesus
- CDO Message Problem
- Prev by Date: Re: CDO Message Problem
- Next by Date: Re: CDO Message Problem
- Previous by thread: Re: CDO Message Problem
- Next by thread: Re: CDO Message Problem
- Index(es):
Relevant Pages
|
Loading