eugene
  • eugene
  • 52.25% (Neutral)
  • Newbie Topic Starter
2 years ago
Dear Members,

I have been using the components for some years now without any problem in my legacy VB60 program. Can Somebody assist me how i can add line breaks in my email body please. I have tried the following code but the email is sent with the very last value i assign to oSmtp.BodyText "****end****

oSmtp.BodyText = "Dear " & AcName & "," 'Rem: Line 1
oSmtp.BodyText = "Please find attached account statement for period between " & v_STATDT & "-" & v_ENDDT & " as requested." 'Rem: Line 2
oSmtp.BodyText = "Thank you for being a loyal Member." 'Rem: Line 3
oSmtp.BodyText = v_RegName 'Rem: Line 4
oSmtp.BodyText = "*****end**********" 'Rem: Line 5

How can i edit the above code to allow my email to be delivered with only the four lines as bolded.

Regards.
ivan
  • ivan
  • 100% (Exalted)
  • Administration
2 years ago

Dear Members,

I have been using the components for some years now without any problem in my legacy VB60 program. Can Somebody assist me how i can add line breaks in my email body please. I have tried the following code but the email is sent with the very last value i assign to oSmtp.BodyText "****end****

oSmtp.BodyText = "Dear " & AcName & "," 'Rem: Line 1
oSmtp.BodyText = "Please find attached account statement for period between " & v_STATDT & "-" & v_ENDDT & " as requested." 'Rem: Line 2
oSmtp.BodyText = "Thank you for being a loyal Member." 'Rem: Line 3
oSmtp.BodyText = v_RegName 'Rem: Line 4
oSmtp.BodyText = "*****end**********" 'Rem: Line 5

How can i edit the above code to allow my email to be delivered with only the four lines as bolded.

Regards.

Originally Posted by: eugene 



Hi, you can use & Chr(13) & Chr(10) as line break in the text body.

oSmtp.BodyText = "Dear " & AcName & "," & Chr(13) & Chr(10)
oSmtp.BodyText = "Please find attached account statement for period between " & v_STATDT & "-" & v_ENDDT & " as requested." & Chr(13) & Chr(10)

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.