Forum Academy Marketplace Showcase Pricing Features

Postmark working in Dev, but not in Live

I got my newsletter setup to send through Postmark, and it works great in Development mode, but when trying to get it to work in Live mode it does not.

I’ve used the debugger, and it shows it finds the user(currently have it setup just to send to me), and it looks like it goes through without any issue. I don’t get an email, and checking in Postmark it’s never sent out the email.

What would be causing it to work in Development mode, but not Live? I don’t have any privacy settings I would have thought would have made a difference, but as I said it works fine in Development.

Is there something I’m missing? What would cause it to work in Dev but not live?

I still can’t figure out why this would work in Dev mode, but not in Live-mode. What would cause something like this to do that?
@adamhholmes @Jici

Do you use the postmark plugin or the API connector?

I use the API connector(fixed previous I said pluggin), and I have several setup which all work fine. Normally if I can get it to work in Dev mode it just works in live mode. This is my first experience where this is happening and makes it hard to problem solve.

I’m not very familiar with Postmark but do you have any error in logs when testing it in live?

Hey @eric10,

Are you trying to send the same email in both the dev and live version? Are you sending via a backend workflow?

I’ve basically created an editor for our Newsletter where I can add a main message, and different sections which will then be pulled into the email template. I also have some sections like Events and Meetings which are automatically added based on a search for what events are coming up and published. I was actually impressed with myself to figure out how to get this all to work(in Dev). It was frustrating that it did not work when put into live.

In another thread it sounds like I might not be doing my send to backend incorrectly, but I don’t think that should effect this. I basically have it so when they click the “send newsletter” button it does a search for users with Newsletter option checked. It sends that list to the Backend workflow.

The Backend workflow has the API connector trigger which it runs on the list sent from the previous workflow.

And here is what the API Connector setup looks like.

Hmm… when you execute it on the live version, did you check your server logs to see if it was throwing any errors?

There is a whole bunch of stuff, but I was finding these errors which seemed to pop up often.

Ah, so it looks like you need to escape all quotes that you use. Aka add one backslash () in front of quotes, you can use the :find & replace option to do this

Thank you for your help, but I think my brain broke. haha. Where would I do this?

Is it saying one of the JSON formulas is wrong? I have 3 different ones for Event, Section, and Meeting.

Here is the one for event.

Is it a matter of fixing the formula or adding a :find & replace as you suggested? Would I add that after the “:formate as text”?

I believe if you click “More” (pictured below)

You should be able to find the :find & replace operator. Then you just need to replace " with \".

Won’t that replace all the " in the text to "(It won’t let me write backslash in this. as soon as I hit enter it does not display) and that would make the formal wrong? It works on the Dev side as is, so I’m still confused why it would not work on the live.

Also, why would I not just go through and fix the formula instead of adding the find and replace? Is it because it’s something after the fact which I can’t edit?

You can do this. You just need to escape all the quotes and you escape it by doing \

I used this as a guide, and it did not do that. Any idea why this works in Dev, but it would not work in Live? I would think if the formula was wrong it would not work in either.

image

No idea, but judging off the errors showed in your server logs the issue is with quotes.

OK, I added the Find and replace to the 3 JSON as you suggested. I’ve only done it in the Dev mode, but I’m now no longer getting the email, so it seemed to have broke what was working in Dev mode. It also still sent this error in the logs.

Have you done it for all variables being passed into Postmark?

You mean like the recipient field and Message_title? If so I really think that will break things further as all the documentation does not have me do that.

Also since it was working in Dev mode and since adding the Find&Replace it seems that is not the correct action to take. I can go through all of them and add Find&replace, but will hard to tell if any of that worked, since the last thing we did already broke something which was working.

This is my setup if it helps: