Re: CDO Message Problem
- From: elesus@xxxxxxxxx
- Date: 9 Jan 2007 00:21:22 -0800
Addition of the "tester" function alone did not work for me.
However when I modified the script to attach the file with the same
html content I send, everything worked fine.
I added the following code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set testfile= fso.CreateTextFile("main.html", True)
testfile.Write VBody
testfile.Close
objMessage.AddAttachment "C:\MyPath\main.html"
It is at least strange. Fortunately, this work around suits me :)
9ntw9 ra?e:
I used the code to send it to a directory, and checked the files ...
I had set ContentTransferCoding = "quoted-printable" in iBp3 (an
additional body part of my base iBp1), but had never set iBp1, so it
was sending in 7bit.
Hopefully this has fixed my problem!
p.s. to anyone attempting to use the code in the previous msg, I had to
change oConf.Update to oConf.Fields.Update to get it running.
I'll run some tests (with fingers crossed) and let everyone know if
this fixed it.
Thanks!
Anthony Jones wrote:
"9ntw9" <nathaniel.williams@xxxxxxxxx> wrote in message
news:1167944823.401987.233270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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)
Try this:-
Create an empty folder E.g. c:\temp\pickup
Now add this code after creating objMail :-
Dim oConf: Set oConf = objMail.Configuration
oConf.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")= 1
'Use pickup folder
oConf.Fields(http://schemas.microsoft.com/cdo/configuration/smtpserverpickup
directory") = _
"c:\temp\pickup"
oConf.Update
Now when you execute your code you should get an .eml file appear in pickup
folder. You can open this file in outlook express to see if it is mangled
before it's ever passed through a SMTP server. You can also open it in
notepad to see exactly what has been generated.
The header to the HTML body part should look something like this:-
------_=_NextPart_003_01C657E9.493172D2
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
.
- References:
- CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- From: Anthony Jones
- Re: CDO Message Problem
- From: 9ntw9
- Re: CDO Message Problem
- From: Anthony Jones
- Re: CDO Message Problem
- From: 9ntw9
- CDO Message Problem
- Prev by Date: Re: Cannot Create New Instance of COM+ Object After You Repeatedly Restart the COM+ Object
- 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