Carriage Return and Line Feed in Email

jwilder
Member Posts: 263
In the past (Classic Client) when sending emails via SMTP I used code something like this to set a carriage return and line feed in an email body:
CRLF[1] := 13;
CRLF[2] := 10;
EmailBody := 'This is the first line' + CRLF;
EmailBody += 'This is the second line' + CRLF;
I have similar code in NAV 2016 but the email has not carriage return or line feed in it. Should this work the same in NAV 2016 as Classic Client?
CRLF[1] := 13;
CRLF[2] := 10;
EmailBody := 'This is the first line' + CRLF;
EmailBody += 'This is the second line' + CRLF;
I have similar code in NAV 2016 but the email has not carriage return or line feed in it. Should this work the same in NAV 2016 as Classic Client?
Jason Wilder
jwilder@stonewallkitchen.com
jwilder@stonewallkitchen.com
0
Best Answer
-
<br> totally works great for html formatted emails. For text emails (whihc is what I now realize I was inteedning to do) you need to use CRLF. The last paramter in SMTP.CreateMessage is html formatted which I had accidentally set to true. Once changed to False (meaning a text only email), CRLF works now.Jason Wilder
jwilder@stonewallkitchen.com5
Answers
-
Hi,
Try to write HTML.
Instead of CRLF write '<br/>'
Regards,
parm0 -
hi,
Follow the approach in article below -
http://saurav-nav.blogspot.in/2013/08/email-from-nav.html
It still work with NAV 2016.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
<br> totally works great for html formatted emails. For text emails (whihc is what I now realize I was inteedning to do) you need to use CRLF. The last paramter in SMTP.CreateMessage is html formatted which I had accidentally set to true. Once changed to False (meaning a text only email), CRLF works now.Jason Wilder
jwilder@stonewallkitchen.com5
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions