Home Search Member List Faq Register Login  
UltimateEmail
Re: New Line from a multiline text box

Thread Starter: jdorsey9   Started: 03-03-2009 2:17 PM   Replies: 2
 Karamasoft Support Forums » General Discussions » UltimateEmail » Re: New Line from a multiline text box
 Printable Version    « Previous Thread   Next Thread »
  03 Mar 2009, 2:17 PM
jdorsey9 is not online. Last active: 3/1/2018 2:18:49 PM jdorsey9

Top 10 Posts
Joined on 10-15-2008
Posts 12
New Line from a multiline text box
I am using Mail Merge to send a mass email.  The Body property of the mail merge object is being set to the text of a multiline textbox which the user will use to type the message.  When the message is sent any new lines from the text box are ignored.  Even if I use vbcrlf (VB) to append static text to the body I see no new lines in the resulting email. 
  
  03 Mar 2009, 8:59 PM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: New Line from a multiline text box
We tested with one of the provided samples (Load Array sample) and it worked properly. We drag-and-dropped a TextBox control, and set its TextMode property to MultiLine to turn it into a text area.

Then we updated the code to add the following line in blue:

            UltimateEmailMerge1.DataSource = toAddressArray;
            UltimateEmailMerge1.BodyTemplate = TextBox1.Text;
            UltimateEmailMerge1.SendMailMerge();

We verified that it replaces the newlines with "\r\n" during our debugging. Then we received the email properly, and when we opened in both Outlook and Outlook Express, newlines were in place.

Please make sure you set the IsBodyHtml property of the UltimateEmailMerge control to False if you're sending the content of a textbox as it doesn't have HTML in it.

  
  04 Mar 2009, 6:35 AM
jdorsey9 is not online. Last active: 3/1/2018 2:18:49 PM jdorsey9

Top 10 Posts
Joined on 10-15-2008
Posts 12
Re: New Line from a multiline text box

yep.  I didn't have IsBodyHTML set to false.  Embarrassed

Works great.  Thanks for the reply.


  
 Page 1 of 1 (3 items)
Karamasoft Support Forums » General Discussions » UltimateEmail » Re: New Line from a multiline text box

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.