Forum Academy Marketplace Showcase Pricing Features

Strange behaviour from SendGrid

Hi Guys,

I have a two sided marketplace connecting fashion models and clients - - 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.

Any ideas?

I´m getting the same error as well.

Check this topic: Sendgrid plugin by cobubble for sending invoices in PDF by email?

Look like it could be a Bubble bug for this one and not the SendGrid API (which has been working well in a live environment)

I´ve just sent a Bug report to @emmanuel so I´ll let you know as soon as I hear back from him.

Hi @gregjohnkeegan,

So I´ve been testing with @emmanuel and @iamsalar this following app that just sends an email but for me it´s not working and for them it´s working.

Could you test and see what happens, please?

Let me know if you have the issue.


Works for me my man.


So I´ve made a lot of test and I think the problem is that %VAR1 does not accepts line breaks.

Could you try this text in the same app?

This text:


I´m a user.

Let´s make this happen."

I´ll wait.

Thanks a lot.

SendGrid can’t print rich content. As per their documentation, you should do the formatting in the template only.

Glad to see you found the root of this problem. :thumbsup:

Yeah this looks like the solution to my issue as well.

How can we stop users using line breaks in multilineinputs?

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.



Thanks a lot @iamsalar

Your plugin is getting better and better every second.

We look forward to it.


The plugin has been handling over 100 emails per day with my app - so it’s all good.

How are you getting around the line break issue on your end @ryanck

No solution yet.

For the line break, the one that Bubble made but I need attachments so the best one is the on by @iamsalar

1 Like

@ryanck, @gregjohnkeegan and others can utilize Bubble’s :find and replace module to tackle this.


  1. Use :find and replace for multi-line input when setting the variable
  2. Enable Use a regex pattern in the module popup
  3. Set Regex pattern to \n, Replace By to <br>


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>.

Happy sending! (with line breaks) :slight_smile:


Dang! Will try this tomorrow thanks @iamsalar

I was struggling with the same issue for like 3 hours today. This did the trick. Thanks!


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.

Any ideas why?

Hope this helps.

Is this possible to do with two images inside of an html input?

I’m running out of variables and simply need about 30 in total so i’m trying to find ways to consolidate the variables into 1.