I try to send a mail from navision and i want to add a text, however this code which is a stripped version from the method used by notification management from commerce portal, places all texts after another, i cannot display
Dear Customer,
This is an Order.
It wil always do Dear CustomerThis is an Order.
Does anybody know how to create an enter.
IF ISCLEAR(OApplication) THEN
CREATE(OApplication);
IF (NOT OApplication.Logon(TRUE,'','',FALSE,FALSE)) THEN BEGIN
OApplication.Logoff;
EXIT
END;
IF ISCLEAR(OSendMail) THEN
CREATE(OSendMail);
OSendMail."To" :=
'Kees.meuzelaar@wanadoo.nl';
OSendMail.BCC :=
'kees@meuzelaar.com';
IF ISCLEAR(BSTRConverterBody) THEN
CREATE(BSTRConverterBody);
Body := 'TEST';
BSTRConverterBody.AppendNextStringPortion(Body);
BSTRConverterBody.AppendNextStringPortion(Body);
OSendMail.Body := BSTRConverterBody;
OSendMail.Subject := 'testmail';
IF ISCLEAR(BSTRConverterAttachFileName) THEN
CREATE(BSTRConverterAttachFileName);
AttachFileName := 'pipo.txt';
BSTRConverterAttachFileName.ResetBSTR;
BSTRConverterAttachFileName.AppendNextStringPortion(AttachFileName);
OAttachments := OSendMail.Attachments;
OAttachment := OAttachments.Add(BSTRConverterAttachFileName);
OSendMail.BodyFormat := 1;
OSendMail.OpenDialog := TRUE;
OSendMail.Send;
ErrorNo := OSendMail.ErrorStatus;
OApplication.Logoff;
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
This body has to be a text you cannot use a character.
I already tried to use 13 in the text, the solution was to use the following code
Char := 13
Body := Text + FORMAT(Char) + Text