# Installing & Configuring Sparkpost for Mautic 5.1

**URL:** <https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [June 19, 2024, 12:25pm UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434 "2024-06-19T12:25:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gathh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gathh/32/6515_2.png) [@gathh](https://forum.mautic.org/u/gathh)\
**Post date:** [June 19, 2024, 12:25pm UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/1 "2024-06-19T12:25:43Z")

</div>

**Your software**  
My Mautic version is: 5.1  
My PHP version is: 8.2  
My Database type and version is: 10.6.18-MariaDB

Could someone please guide me on how to install Sparkpost plugin for Mautic 5.1? We have used Mautic 4.x before and it worked flawlessley. Unfortunately, native support for Sparkpost was removed from Mautic 5.1 and now we have a problem. I cannot really find any documentation how to do this other than [GitHub - ts-navghane/sparkpost-plugin: Sparkpost Mailer Plugin for Mautic](https://github.com/ts-navghane/sparkpost-plugin)  
However, I am not a developer and need some guidance on how to install this.  
Do I just need to run the command composer require ts-navghane/sparkpost-plugin in the console or what else? Thank you.

These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![gathh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gathh/32/6515_2.png) [@gathh](https://forum.mautic.org/u/gathh)\
**Post date:** [June 21, 2024, 9:58am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/3 "2024-06-21T09:58:56Z")

</div>

So, I have finally been able to install Sparkpost in console using this command:

`composer require ts-navghane/sparkpost-plugin`

When I go to the Plugins in Mautic, I get this:

 ![Screenshot 2024-06-21 165655](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5f1f49d6d252d86fe4f17ffcd8fe9de1496063a6.png)  
Is this correct? Is there anything I would have to configure here on this screen?

As of now, only 1 email is sent each time as per the warning. This is why I MUST get Sparkpost to work on our Mautic installation:

 ![Screenshot 2024-06-21 165754](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/021af91e120b0e04f0301fb200f7afe9d2506011.png)  
Any help is greatly appreciated. Thank you very much.

---

<div class="post-metadata">

**Author:** ![gathh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gathh/32/6515_2.png) [@gathh](https://forum.mautic.org/u/gathh)\
**Post date:** [June 21, 2024, 11:05am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/4 "2024-06-21T11:05:31Z")

</div>

In addition to the above, I have also set the following. Again, only 1-2 emails are sent, even though Mautic said that 20 emails were sent. What am I missing?

 ![Screenshot 2024-06-21 180316](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/25ff0fc6313836391a2dd1170e570922cf63c48d.png)

 ![Screenshot 2024-06-21 180327](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4277df8947a64c5cf6c103fe36d7b3ed255e171d.png)

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 21, 2024, 11:11am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/5 "2024-06-21T11:11:53Z")

</div>

Thats interesting. Is it even configurable to have one mail per request in an API call?

@gathh its important to check the features that the sparkpost plugin provides. If you can sent through this plugin, the limitation may not be valid. Did you set it up as described in the readme: [GitHub - ts-navghane/sparkpost-plugin: Sparkpost Mailer Plugin for Mautic](https://github.com/ts-navghane/sparkpost-plugin) ?

Pay attention to the Mailer DSN, it might be different, when using the plugin versus core.

---

<div class="post-metadata">

**Author:** ![gathh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gathh/32/6515_2.png) [@gathh](https://forum.mautic.org/u/gathh)\
**Post date:** [June 22, 2024, 1:50am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/6 "2024-06-22T01:50:03Z")

</div>

@dirk_s Thank you for your inputs. I am not sure if it even configurable to have one mail per request in an API call. I just follow what was written in the Mautic 5.0 documentation on this: [Mautic configuration settings — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/configuration/settings.html#example-api-transport-installation)

You mentioned to check the features that the sparkpost plugin provides. There is not a whole lot to check/see. The readme is ultra limited unfortunately.  
Yes, I followed the readme file and set it up as such.

I saw others using doctrine when sending via Sparkpost API, so I am using doctrine also. Should I try something else?

Email sending via Sparkpost API works. All campaigns (ongoing emails that are sent in the background) are sending fine and email broadcasts send fine too, but only send to 1-2 emails instead of all 200 emails (for example) as proclaimed by Mautic’s sent report.

I am actually SO close to getting this all running smoothly, but yet have to overcome this final step of why only 1-2 emails are sent instead of all.

---

<div class="post-metadata">

**Author:** ![gathh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gathh/32/6515_2.png) [@gathh](https://forum.mautic.org/u/gathh)\
**Post date:** [June 23, 2024, 4:18am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/7 "2024-06-23T04:18:36Z")

</div>

We have now reverted back to Mautic v4.4.10 as we require batch sending. Sending one-by-one is out of the question for us with a DB of over 200k. Its a shame that batch sending is not supported/explained well in Mautic 5.x. Batch sending in my opinion is one of the fundamental features of any mass-mail software.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 27, 2024, 7:44am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/8 "2024-06-27T07:44:35Z")

</div>

Hi @gathh,  
indeed… loooks like core is very much limited. Thats why people started to create plugins e.g. for Amazon AWS. Not sure about the state of Sparkpost Plugins yet, but will need to investigate for a client anyways soon. I keep you posted, once I find out about it.

---

<div class="post-metadata">

**Author:** ![okdnet](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/okdnet/32/275_2.png) [@okdnet](https://forum.mautic.org/u/okdnet)\
**Post date:** [July 16, 2024, 8:25pm UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/9 "2024-07-16T20:25:35Z")

</div>

> [@dirk\_s](#):
>
> ays soon. I keep you

Related question(s) I hope someone can help with. I HAD Mautic working with Sparkpost.  
Now I successfully upgraded self-hosted Mautic from 4.X to 5.X only to discover (after-the-fact) the Mailer changes and that it breaks my setup.

Do I NEED Composer to use this plugin?

FYI, I did the Mautic upgrade using Command line Console (I used to use the GUI, but switched several upgrades ago after it was “recommended”). I DO NOT HAVE (yet?) Composer setup, and honestly I’m basically a bit scared to do the change to Composer (both the change itself and then using Composer due to not knowing Composer yet).

I even considered changing from Sparkpost to Mailjet, or Brevo, or…? thinking I might find an “easier” path (after reading about the existing the Symfony Mailer library support), but after looking a bit… maybe not. They all seem to provide features I don;t need (I will use Mautic for these purposes), I mainly want transactional and Marketing email deliverability). FYI I also use PrestaShop, and it’s using Sparkpost no-problem.

So back to getting Sparkpost working…

Is this Mautic Plugin (for Sparkpost integration) my best and easiest route?  
Can I install in my Mautic WITHOUT changing to composer?  
Is it really time for me to change to Composer (and should I either not be afraid or just get over it… maybe my fear is all unfounded).

Expert feedback / Suggestions are appreciated.

---

<div class="post-metadata">

**Author:** ![okdnet](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/okdnet/32/275_2.png) [@okdnet](https://forum.mautic.org/u/okdnet)\
**Post date:** [July 17, 2024, 12:17pm UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/10 "2024-07-17T12:17:26Z")

</div>

Never mind… with some awesome help from my hosting companies support, I’ve changed to Composer setup. I’ll start a new thread

---

<div class="post-metadata">

**Author:** ![xabi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xabi/32/12787_2.png) [@xabi](https://forum.mautic.org/u/xabi)\
**Post date:** [October 10, 2024, 7:52am UTC](https://forum.mautic.org/t/installing-configuring-sparkpost-for-mautic-5-1/32434/11 "2024-10-10T07:52:05Z")

</div>

Hi @gathh, I have the same problem, only one mail was sent. I found the problem and the nasty fix.

See this issue [Sending emails to segments using SparkPost with bach \> 1 sends just first email from the batch · Issue #13548 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/13548)

If you apply this fix [API Email Transport fix by escopecz · Pull Request #13998 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/13998) works well, all mails are sent, but warning because **[escopecz](https://github.com/escopecz)** says that this **will enable a nasty issue in the one-click unsubscribe header**.

Maybe it helps you in something.
