BPM HTML EMail question [9.05.701]

Thanks for the info, that makes a lot of sense! I have a 'Body' stringvar that is, in some cases, very long. I'll split it up.
Hello,

I have a question about a BPM I am writing. This BPM is sending an email and I'm using the HTML type:

RUN SendEmail IN hEmailEx(false,CUR-COMP,vFrom,vTo,vCC,vSubject,vBody,"type=text/html:charset=us-ascii:filetype=ascii":U).


What appears to be happening is that after X amount of characters there is a space inserted and then the rest of the code goes through. What this does in some cases is put a space in the middle of a word which looks weird, but what really is an issue is that sometimes the space will appear in the middle of some HTML code, this breaks whatever that code was doing (line breaks or table columns). Has anyone ran into this before? Is there a way to get rid of this mystery space?

I can post the BPM code if needed.


Ah yes….. Your HTML code is too long. There is a maximum length a string can be before it starts doing that crap to you. What you need to do is break the string off and concat it to another. What I did in the end was HTML formatting and that took care of the issue. I think the max length is 1000 chars.  Here is an example of what I did that kept it from doing that to me. It’s much prettier in Visual studio lol http://snag.gy/5RJx5.jpg

 

                           "<p>" +

                                  cConName + "<br /><br />"+

                                  "Your order shipped on " + STRING(ShipHead.ShipDate) + ". Below, you'll find a recap of the shipped item(s):<br /><br />" +

                           "</p><br />" + lf +

                           "<table style='border: none;'>" +

                                  "<tr>" +

                                         /* Left hand column */

                                         "<td style='border: none; vertical-align: top;'>" +

                                                "<table>" +

                                                       "<tr>" +

                                                              "<td colspan='8'>" +

                                                                     /* Build sold to and ship to info */

                                                                     "<table style='width: 100%; border: none;'>" +

                                                                           "<tr>" +

                                                                                  "<td style='width: 50%; border: none;'><h2>SOLD TO:</h2></td>" +

                                                                                  "<td style='border: none;'><h2>SHIP TO:</h2></td>" +

                                                                           "</tr>" + lf +

                                                                           "<tr>" +

                                                                                  "<td style='width: 50%; border: none;'>" + Customer.Name + "<br />" + Customer.Address1 + "<br />" + Customer.Address2 + "<br />" + Customer.City + ", " + Customer.State + " " + Customer.ZIP + "</td>" +

                                                                                  "<td style='border: none;'>" + ShipTo.Name + "<br />" + ShipTo.Address1  + "<br />" + ShipTo.Address2 + "<br />" + ShipTo.City + ", " + ShipTo.State + " " + ShipTo.ZIP + "</td>" +

                                                                           "</tr>" +

                                                                     "</table>" + lf +

                                                              "</td>" +

                                                       "</tr>" +

Joshua Giese

CIO

 

Direct:     920.593.8299

IT Dept:   920.437.6400 Ext. 337

Site ID:    27450-E905702A-SQL64

Wisconsin Converting, Inc.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, February 6, 2015 2:18 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM HTML EMail question [9.05.701]

 

 

Hello,

 

I have a question about a BPM I am writing. This BPM is sending an email and I'm using the HTML type:

 

RUN SendEmail IN hEmailEx(false,CUR-COMP,vFrom,vTo,vCC,vSubject,vBody,"type=text/html:charset=us-ascii:filetype=ascii":U).

 

 

What appears to be happening is that after X amount of characters there is a space inserted and then the rest of the code goes through. What this does in some cases is put a space in the middle of a word which looks weird, but what really is an issue is that sometimes the space will appear in the middle of some HTML code, this breaks whatever that code was doing (line breaks or table columns). Has anyone ran into this before? Is there a way to get rid of this mystery space?

 

I can post the BPM code if needed.