ChrisRAoW / mautic-rss-to-email-bundle

Mautic plugin to send emails from RSS
103 stars 23 forks source link

Output feed based on url from token? #44

Closed iparker closed 3 years ago

iparker commented 3 years ago

Hello,

I want to specify the feed-url via an email token when I send emails with the rest api (see at https://developer.mautic.org/#extending-emails).

So I define the output of the feed like this:

{feed url="{token_feed}"} {feeditems count="3"}

But with this I get an error in the email like this:

Error: URL (https://ipm-promotion.de/feed/) empty or not valid

There is the output of my feed-url but it could not be processed.

If I use the feed directly not with the token everything works fine. But the usage of the token is very important for me.

Do you have any ideas how to get this working?

Best regards,

Timo

ChrisRAoW commented 3 years ago

@iparker Interesting use case. Will try to reproduce and think of a fix.

iparker commented 3 years ago

Great - thank a lot for your quick feedback! That would be great if you could implement the possiblity to handle a feed url from the token!

ChrisRAoW commented 3 years ago

Can you send me an e-mail at chris[at]raow[dot]nl

ChrisRAoW commented 3 years ago

@iparker The "token_feed" token, where is it coming from in your example? Do you use the api to send out an e-mail? (https://developer.mautic.org/#send-email-to-contact)

iparker commented 3 years ago

Yes, the token comes from the api when sending an email to a single contact.

ChrisRAoW commented 3 years ago

@iparker Do you know what php version you're on?

iparker commented 3 years ago

Yes, php version 7.3.27 and mautic version 3.3.3.

ChrisRAoW commented 3 years ago

@iparker I just commited a change to the master branche that should make this possible. Can you check it out?

iparker commented 3 years ago

Hi Chris,

thanks a lot for your update! We updated your bundle and now the feed items are displayed when I add the feed url via token in send api. Thanks a lot!

Now we will test it with some real use cases.