I have a two sided marketplace connecting fashion models and clients - https://anotherstorymodels.com - all is going swimmingly so far, aside from an annoying bug with emails.
I’m using Sendgrid to send transactional emails between models and clients. I have also set up a messaging tool to connect to the users personal email inboxes using Sendgrid as the email processor. Long story, but this a temp solution.
Some users are expressing problems sending emails. For most it works, for some it doesn’t. Email addresses have been checked. Both my live and test accounts work perfectly. Here’s an example of an error message and log displaying a problem connecting to Sendgrid.
You can possibly pass the value of a multiline input into an input field prior to sending it off. :find and replace might also aid in normalizing as well. @ryanck made a good point that Bubble allows rich text when using their default integration; it would be a matter of seeing how that’s done. We’ll keep exploring on our end.
@ryanck, @gregjohnkeegan and others can utilize Bubble’s :find and replace module to tackle this.
Guide
Use :find and replace for multi-line input when setting the variable
Enable Use a regex pattern in the module popup
Set Regex pattern to \n, Replace By to <br>
Explanation
Since we need to find all the new lines in the value, we’ll take advantage of regular expressions. In regular expressions, \n matches any line-feed character which is also known more commonly as ‘new-line’ or sometimes ‘line breaks’. By setting the regex pattern to \n (and only that), all the matches denoting line breaks are returned. SendGrid can be instructed to take content as plain text or HTML. The SendGrid plugin supports substitution tag content to be interpreted as HTML by SendGrid. Consequently, we’ll take those line break matches and replace them with the HTML equivalent of a line break, <br>.
Im having issues with this after following every instruction here. The strage thing is that on development it works fine, but in production it gives me that error.