Multiple SMTP settings for different mailing segments

I don’t use tracking, but this can be easily implemented.

Do you use images in emails?

No I use Mautic for my cold outreach and never use images or attachments etc… I do b2b outreach and my emails look like b2b plain text emails. I have been thinking of using a headshot in my signature, but haven’t done it yet.

Oh I see.
I found Mailwizz to be a lot more scalable them Mailwizz for this purpose. If you don’t use tracking anyway, then Mailwizz can do multi SMTP as a default. It’s a lot more scalable then Mautic for cold outreach since it’s more streamlined for that purpose.

I really like Mautic and now I got it working exactly the way I want it.

Yeah, sounds great.
Would you share your solution, is it open source?

No, but I am open to partner with someone that wants to open source it or build a service on top of this. I’m in cold outreach, but this is also very useful for email blasting.

Sorry to update this old post but Im looking for a solution where each owner will send with their own SMTP.

Is this viable ATM with some plugin? Or someone can point me with similar plugins as examples on how to extend it so my team starts the Dev?

I do not see any reason why this would not be possible, just have to make some modifications to transport and of course ability to somehow save the necessary details for sending for eah owner.

I believe if you check my plugin for Multi mailgun domain you can get the idea what directions should the implementation go.

Wait, by using Mautic and something like Postal can this offer unlimited cold email sends? I’m new to Mautic and open source projects in general. I’ve been messing around with Gmail for some mass mail but seems to have some pretty crappy limitations

Hi, this was already answered in the other post.

You can send out as many emails as you want.

Unlimited.

For free.

But if you don’t know how to maintain and grow reputatoin with Postal, then it doesn’t matter how many emails you are sending, you’ll end up sending only 500 emails, and the rest goes to spam from that day on.

Forever.

So you will end up not sending email emails at all.

Please don’t beleive these clickbaity videos, that make empty promises.

There is no such a thing as free unlimited email.

1 Like

Actually if you could modify the code, it’s quite easy to have this feature .

The easiest way to create a new plugin.

  1. In the services.php you should define an alternative transport (or more)
   $services->set('mailer.alternative_transport', \Symfony\Component\Mailer\Transport\TransportInterface::class)        
        ->factory([\Mautic\EmailBundle\Mailer\Transport\TransportFactory::class, 'fromString'])
        ->args([getenv('MY_ALTERNATIVE_EMAIL_DSN')])
        ->alias(\Symfony\Component\Mailer\Transport\TransportInterface::class, 'mailer.alternative_transport');
  1. You need a new event subscriber which subscribes to the EmailEvents::EMAIL_ON_SEND event.
return [           
            EmailEvents::EMAIL_ON_SEND    => [ ['setTransport', 0],
            ],            
        ];

In the event handler function you can reach all the Email and the Lead related parameters. (email category, email tag, lead email, lead email domain, lead company, etc.) So based on your needs, you can say for example:

public function setTransport(EmailSendEvent $event): void
{
    if (strtolower($event->getEmail()->getCategory()->getAlias()) === 'important_category') {
        putenv('USE_ALTERNATIVE_TRANSPORT=mailer.alternative_transport');
    }
}
  1. You have to modify the /app/bundles/EmailBundle/Helper/MailHelper.php class`s send function.

Before anything you have to use this code:

    if (false !== getenv('USE_ALTERNATIVE_TRANSPORT') && false === empty(getenv('USE_ALTERNATIVE_TRANSPORT'))) {
        // Use the alternative transport
        $this->transport = $this->factory->get(getenv('USE_ALTERNATIVE_TRANSPORT'));
        // Reinitialize the mailer with the selected transport
        $class = get_class($this->mailer);
        $this->mailer = new $class($this->transport);
        // reset the environmental variable
        putenv('USE_ALTERNATIVE_TRANSPORT=');
    }

I didn’ want to modify the MailHelper, but this is the fastest way I could use multiple DSNs.