Data overflow while sending mail using lcfield

Hi

I am trying to send a mail of around 8000 characters using following code. If I send few character then it sends the contents properly but if it exceeds the length then gives the error data overflow.

IF I run this code from the backend it does not give me any error but if I run it from webbrowser it gives me data overflow error.

The code which gives data overflow error:

Sub SendMailProc(P_Sender As String,P_Recipients As String,P_Subject As String,P_Message As Variant,P_ContentType As String)

On Error Goto ErrorHasOccurred		

' Set the stored procedure owner and stored procedure name.

glbDbConnection.Procedure = "LSIMAIL.SendMail"

Dim input_fieldlist As New LCFieldList

Dim in_field_text As New LCField (1, LCTYPE_TEXT)



Set in_field_text = input_fieldlist.Append ("P_Sender", LCTYPE_TEXT)

in_field_text.Text = P_Sender

Set in_field_text = input_fieldlist.Append ("P_Recipients", LCTYPE_TEXT)

in_field_text.Text = P_Recipients



Set in_field_text = input_fieldlist.Append ("P_Subject", LCTYPE_TEXT)

in_field_text.Text = P_Subject

’ Following 2 lines give me dataoverflow error.

Set in_field_text = input_fieldlist.Append ("P_Message", LCTYPE_TEXT)

in_field_text.Text = P_Message

When I use following code it does not give any error but I do not get anything in contents.

It is really urgent. Can somebody help me in this matter.

Sub SendMailProc(P_Sender As String,P_Recipients As String,P_Subject As String,P_Message As Variant,P_ContentType As String)

On Error Goto ErrorHasOccurred		

' Set the stored procedure owner and stored procedure name.

glbDbConnection.Procedure = "LSIMAIL.SendMail"

Dim input_fieldlist As New LCFieldList

Dim in_field_text As New LCField (1, LCTYPE_TEXT)



Set in_field_text = input_fieldlist.Append ("P_Sender", LCTYPE_TEXT)

in_field_text.Text = P_Sender

Set in_field_text = input_fieldlist.Append ("P_Recipients", LCTYPE_TEXT)

in_field_text.Text = P_Recipients



Set in_field_text = input_fieldlist.Append ("P_Subject", LCTYPE_TEXT)

in_field_text.Text = P_Subject

Set in_field_text = input_fieldlist.Append ("P_Message", LCTYPE_BINARY)

’ Following 2 lines are different than the code mentioned above for data overflow

in_field_text.Text = P_Message

Call in_field_text.SetFormatStream (,10000, )





Set in_field_text = input_fieldlist.Append ("P_Priority", LCTYPE_INT)

Subject: Data overflow while sending mail using lcfield

Does it work if you make Line Breaks every 200 (?) characters?