I.T. Discussion Community!
-Collapse +Expand
Prestwood IT
Search Group:

Advanced
-Collapse +Expand Prestwood IT Store

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBPrestwood I.T.Prestwood Pr...psSendMail DLL   Print This    All Groups  
  From the January 2016 Issue of Prestwood eMag
 
Prestwood IT psSendMail DLL:
psSendMain v2 - What Happened to My Line Breaks?
 
Posted 11 years ago on 1/11/2008
Take Away: Now that psSendMain supports both HTML and plain text message bodies, as a developer, you must use the HTML parameter properly. If you create the body of your message as you would plain text, but set the HTML parameter to True, the receiving email program will do exactly what web browsers do: It will treat your CR and LF characters as white space, not line breaks. So be sure the HTML parameter is set to False before sending plain text messages.
 A flashcard from our Prestwood IT Flashcards Library
 A tip from our Prestwood IT Tips Page

KB100775

Now that psSendMai supports both HTML, and plain text message bodies, as a developer, you must use the HTML parameter correctly.

If you create the body of your message as you would plain text, but set the HTML parameter to True, the receiving email program will do exactly what web browsers do: It will treat your CR and LF characters as white space, not line breaks.

So be sure the HTML parameter is set to False before sending plain text messages.

Conversely, if you want your message formatted as HTML, it is up to you to build your message body with all the appropriate HTML tags, including <br> for line breaks, and set the HTML parameter to True.

Tip: psSendMail is a DLL. It does not offer a WYSIWYG HTML editor!

Since the release of psSendMail v2, we've had a few customers ask why the line breaks they intended to appear in the messages are gone.

No, psSendMail is not "stripping" away any characters in your message body. They are all going through, exactly as you specified them.

The problem arises over a slight misunderstanding about psSendMail's new ability to send HTML message bodies.

The full article explain what's happening, and the very simple way to avoid this problem.


Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1142A1
Enter key:
Tip Contributed By Wes Peterson:

Wes Peterson is a Senior Programmer Analyst with Prestwood IT Solutions where he develops custom Windows software and custom websites using .Net and Delphi. When Wes is not coding for clients, he participates in this online community. Prior to his 10-year love-affair with Delphi, he worked with several other tools and databases. Currently he specializes in VS.Net using C# and VB.Net. To Wes, the .NET revolution is as exciting as the birth of Delphi.

Visit Profile

 KB Article #100775 Counter
11085
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech