Content Selection Framework - AutoGenerateTextBody=False does not generate any output

This is Interesting: Free IT Magazines  
Home > Archive > Content Selection Framework > June 2005 > AutoGenerateTextBody=False does not generate any output





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author AutoGenerateTextBody=False does not generate any output
Angel Anichin

2005-05-25, 5:59 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have Scriptor component just before ComposeDMLMessage.
The MSCSExecute looks like this:

'-------------------------------------------------------------------
function MSCSExecute(config, orderform, context, flags)
~ ' Add from address
~ context.default_url = context.default_url & "&from_email=" &
orderform.from_field

orderform.rcp_formatting = context.default_formatting

' Use full Url to images instead of inline images
context("cdo_CreateMHTMLBodyFlags") = 31

' Do not create plain text part in order to produce smaller emails
context.cdo_message.AutoGenerateTextBody = False

'Dump debug information to a text file
call DumpPipe(config, orderform, context, flags)

MSCSExecute = 1
end function
'-------------------------------------------------------------------

If I use

context.cdo_message.AutoGenerateTextBody = False

The email message is not generated. If I comment this line of code
the message has plain text part and HTML part. The
context.default_formatting=3.

My intention is to generate MHTML email with plain text part skipped in
order email message to be smaller and hopefully faster generated.

Any ideas what I am doing wrong ?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFClJHpjuKv2Eop8VMRAmbJAKCo/aRTOC939QgkVkG+WbRC3qXNsACffusk
z4+MBCJn5Fq6+Gf1f4bYRz4=
=/6I+
-----END PGP SIGNATURE-----
David Messner [MSFT]

2005-06-09, 5:52 pm

Hi Angel,

Just a guess but try setting .MimeFormatted = false as well.

Another thought is to add another scriptor after ComposeDMLMessage that
clears out the TextBody. From MSDN:
After you call the CreateMHTMLBody method, you can add or modify body
parts, set the TextBody property, and modify the HTMLBody property.

Good luck!
-djm
--------------------
Date: Wed, 25 May 2005 17:55:38 +0300
From: Angel Anichin <"anichin[at]vip[dot]REMOVE_THIScom">
Subject: AutoGenerateTextBody=False does not generate any output

I have Scriptor component just before ComposeDMLMessage.
The MSCSExecute looks like this:

'-------------------------------------------------------------------
function MSCSExecute(config, orderform, context, flags)
~ ' Add from address
~ context.default_url = context.default_url & "&from_email=" &
orderform.from_field

orderform.rcp_formatting = context.default_formatting

' Use full Url to images instead of inline images
context("cdo_CreateMHTMLBodyFlags") = 31

' Do not create plain text part in order to produce smaller emails
context.cdo_message.AutoGenerateTextBody = False

'Dump debug information to a text file
call DumpPipe(config, orderform, context, flags)

MSCSExecute = 1
end function
'-------------------------------------------------------------------

If I use

context.cdo_message.AutoGenerateTextBody = False

The email message is not generated. If I comment this line of code
the message has plain text part and HTML part. The
context.default_formatting=3.

My intention is to generate MHTML email with plain text part skipped in
order email message to be smaller and hopefully faster generated.

Any ideas what I am doing wrong ?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2005 Microsoft Corporation. All rights
reserved.
Angel Anichin

2005-06-17, 5:51 pm

Hi David,

Your first suggestion (.MimeFormatted = false) did not work for me.
The Direct Mailer did not produce any output.

Then I added a new scriptor after ComposeDMLMessage. I put the following
line inside MSCSExecute function:

context.cdo_message.TextBody = ""

Again no luck. No emails were produces. Then I put some text:

context.cdo_message.TextBody = "Some text"

The email was succesfully produces and the plain text part of the email
was set to "Some text".

At the end I ended up with this:

context.cdo_message.TextBody = chr(160) ' No-break space

The email was produces and text part was limited to one invisible
character. The solution is good enough for me.

Thanks once again for your help.


Angel

> Hi Angel,
>
> Just a guess but try setting .MimeFormatted = false as well.
>
> Another thought is to add another scriptor after ComposeDMLMessage that
> clears out the TextBody. From MSDN:
> After you call the CreateMHTMLBody method, you can add or modify body
> parts, set the TextBody property, and modify the HTMLBody property.
>
> Good luck!
> -djm
> --------------------
> Date: Wed, 25 May 2005 17:55:38 +0300
> From: Angel Anichin <"anichin[at]vip[dot]REMOVE_THIScom">
> Subject: AutoGenerateTextBody=False does not generate any output
>
> I have Scriptor component just before ComposeDMLMessage.
> The MSCSExecute looks like this:
>
> '-------------------------------------------------------------------
> function MSCSExecute(config, orderform, context, flags)
> ~ ' Add from address
> ~ context.default_url = context.default_url & "&from_email=" &
> orderform.from_field
>
> orderform.rcp_formatting = context.default_formatting
>
> ' Use full Url to images instead of inline images
> context("cdo_CreateMHTMLBodyFlags") = 31
>
> ' Do not create plain text part in order to produce smaller emails
> context.cdo_message.AutoGenerateTextBody = False
>
> 'Dump debug information to a text file
> call DumpPipe(config, orderform, context, flags)
>
> MSCSExecute = 1
> end function
> '-------------------------------------------------------------------
>
> If I use
>
> context.cdo_message.AutoGenerateTextBody = False
>
> The email message is not generated. If I comment this line of code
> the message has plain text part and HTML part. The
> context.default_formatting=3.
>
> My intention is to generate MHTML email with plain text part skipped in
> order email message to be smaller and hopefully faster generated.
>
> Any ideas what I am doing wrong ?
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com