Mailbody > 250 ?

Hello, I have following code to sent an Email via Automation: CLEAR(application); CREATE(application); mailitem := application.CreateItem(0); mailitem.Recipients.Add := Email; mailitem.Body := txtBody mailitem.Subject := Betreff; mailitem.Display; CLEAR(application); txtBody is a text variable 250 (size) But who can i put more the 250 charakters to the Mailbody ??? ------------ Best regards Alejandro Schubert schubert@dolphinct.de

I have not actually modified the subject of an email before, but how about creating an array of txtbody? Regards

god idea ! Thanks ! ------------ Best regards Alejandro Schubert schubert@dolphinct.de

I tried to use a text-array but that didn’t work. In an earlier post someone mentioned a method how it should work (I cannot confirm that as I didn’t try). The idea is to leave the body text blank and attach ONE Text-file. While sending, Outlook places the contents of the attached Text-file into the body. If you want to know how to attach a file (myFile.txt) proceed as follows: mailitem.AttachmentIndex := mapimsgs.AttachmentCount; mailitem.AttachmentType := 0; mailitem.AttachmentPathName := myfile.txt; mailitem.AttachmentPosition(STRLEN(Body)); Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch

Maybe the next thing will do it: You’ll have to splitt up your Body: mailitem.Body := txtBody1+txtBody2+txtBody3 You can also use an array, but then you’ll have to do it like this: mailitem.Body:=txtBody[1]+txtBody[2] …etc.

Hi, It looks like you cant have mail body more than 250 characters. Valentin Gvozdev BMI Inc.

Anybody tried to use a variable of type Binary for mailbody? What happens when you copy your text character for character as bytes into a binary? Binaries can be 2000 bytes long… Just a wild thought, which I cannot test myself at the moment. John

Hi, We have also suffered with this problem. The fact is that even the body of a mail can obtain more than 250 characters, but when you use it in Navision via automation, you’re automatically restricted to the maximum length. To bypass this restriction we’ve develloped an OCX which uses the Message automation variable. With a parameter we send our body in pieces of 250 characters to this OCX, which builds the body itself. By not using the variable of the body inside Navision, you’re not restricted to the maximum length… May the source be with you

Hi John, >>Anybody tried to use a variable of type Binary for mailbody? << Good idea. I had tried this one as well when I made my first e-mail application last year. But unfortunately it doesn’t work. Looks like I’m not the only one who would wish for pointers being implemented in C/SIDE. Finally I ended up with the same solution as Fozzie. Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch