0

I'm facing a strange problem with sp_send_cdosysmail OLE Automation. I have a store procedure that will convert a temp table into html table and send them as mail body to distribution list.

Problem is when the no of lines are more than 100 (x 13 columns) several blank spaces are inserted in between my html table. Inserting spaces between tags and causing alignment issues with table.

for example tag </td> changing to </t d> thus resulting the cell value to [cell value]</t d><td style="background-color:blue;">[next cell value].

For debugging i have created a string of 10000 characters aaaaaaaaaa....aaaaaaaa and i seen that every 990 characters there was a blank space inserted. when they fall between the html tags it creating issues.

Mail Body Screenshot

Those spaces not inserted when i'm creating my html table. select @MsgBody returns the html string that has no spaces in between. but when i receive mail every 990 character one space inserted.

OLE Automation DLL odsole70.dll

Please let me know is there any way this can be avoided?

aduguid
  • 3,099
  • 6
  • 18
  • 37
nagarajannd
  • 715
  • 5
  • 11

0 Answers0