Archived Forum Post

Index of archived forum posts


blank email body using mht sql server

Dec 12 '16 at 09:33


I have copied pasted text from

But I get a blank email..

Please help!


It's likely the string returned by the mht.GetEml method is longer than 4000 chars.

    DECLARE @emlStr nvarchar(4000)
    EXEC sp_OAMethod @mht, 'GetEML', @emlStr OUT, ''

See if you can declare the nvarchar larger. If not, then Chilkat is making a note to add alternative methods to return the string in a Chilkat.StringBuilder object instead. This will eliminate the issues with long strings in SQL. The new version that includes this new method will be out in a few weeks. I can provide a pre-release with sample prior to that, but not immediately because of other unrelated work that needs to be finished first..

(It is also possible to get string results in a temp table..)


Thanks for your answer.

I tried varchar(8000) and infact the same page http// did not work.

Now I am loading it as EML and then sending it.