Mail Body Content

RS8RS8 Member Posts: 121
Hi,

In Nav4 while sending mail i want to insert multiple line in Body content, i am using below syntax. how can i able to insert lines as shown, can any one suggest me.

{ MailSent := cSendmail.NewMessage
(ToName,CCName,Subject,Body,AttachFileName,OpenDialog) }

{ Mail Body
MR,

Greetings from ABC..

Thank you....
}

Answers

  • MBergerMBerger Member Posts: 413
    Try this : add 2 char type variables, called CR and LF.
    CR := 13 ;
    LF := 10 ;
    
    MailBody := 'Mr. ' + CR + LF + 
                CR + LF + 
                'Greetings from ABC....' + CR + LF + 
                CR + LF + 
                'Thank you...' ;
    

    note that you don't need to use the linebreaks like i did in the sample code; It just makes it a bit easier to read
  • RS8RS8 Member Posts: 121
    Variable MailBody is Text, so it gives error....
  • MBergerMBerger Member Posts: 413
    oh, sorry.....i tend to forget that one thing..
    Make a new text variable (length 2) called CRLF.
    CRLF := format(CR) + format(LF) ;
    
    replace all the CR + LF in my previous code with CRLF
Sign In or Register to comment.