Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
eugene  
#1 Posted : Monday, March 27, 2023 9:06:00 AM(UTC)
eugene

Rank: Newbie

Groups: Registered
Joined: 4/23/2019(UTC)
Posts: 3
Kenya
Location: Nairobi

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  
#2 Posted : Monday, March 27, 2023 11:55:04 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,153

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Originally Posted by: eugene Go to Quoted Post
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.


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)

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.062 seconds.

EXPLORE TUTORIALS

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