knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
15.44k stars 1.41k forks source link

pick an SMTP server per campaign #1703

Open jucajuca opened 10 months ago

jucajuca commented 10 months ago

Is your feature request related to a problem? Please describe. A user can have 2 campaigns and 2 SMTP servers. The user would like to set CAMP1 to use SMTP1 and CAMP2 to use SMTP2.

Describe the solution you'd like The user should be able to pick an SMTP server per campaign.

Related to issue: https://github.com/knadh/listmonk/issues/259 @charlesmudy

charlesmudy commented 9 months ago

Still waiting for this and thought would come with v3

It's quite logical to have the option to choose an SMTP per campaign considering there are multiple SMTP servers already listed.

@knadh

ondrejvrabel commented 9 months ago

This would be useful for us too.

iloveitaly commented 9 months ago

Yeah, this is important for me as well. Using this across a couple of different gmail accounts and want to use the gmail SMTP option, one for each account (even better would be to assign SMTP per list).

Satishglk commented 8 months ago

Looking forward to this feature !

anantanandgupta commented 8 months ago

some illustrations to boost thinking

Settings Screen: image

Campaign Screen: image

here in the above screen if the From address is given then the system should pick the server configuration from the given messenger.

same can be done for the transactional emails. where messenger can be picked from a list of messengers in place of having it hard-coded in the system.

tudor-cel-stan commented 5 months ago

I personally find this feature to be a priority. Barely maintained tools like Sendy are still being used because of their versatility when it comes to sending from multiple addresses, domains and email servers, which makes client management a breeze. Having a separate install for each client is not practical at all, while reconfiguring the app settings before sending a campaign is even less practical.

Please take this into consideration. The templating features that you integrated in the app are insanely powerful. Maybe also take into consideration providing a managed Listmonk service on your servers since that could be a good revenue stream for your amazing product.

vincentmarkcelino commented 1 day ago

is this available on the latest version? we badly need this feature... we use different email for transactional and campaign. T_T

charlesmudy commented 1 day ago

I mean, @knadh has done incredible work with Listmonk so kudos for that but I honestly do not understand why this is hard to implement when people have repeatedly requested for it.

We simply just added a new ID for smtp

Screenshot 2024-11-30 at 14 20 10

Then did this at line 102 inside email.go file

// Choose SMTP
for _, srvs := range e.servers {
    s := srvs
    if s.ID == m.Headers.Get("REGION") { // compare the ID with campaign smtp or whatever your attribute is
        srv = s
        break
    }
}

// if no SMTP selected then default to whatever
if srv == nil {
    srv = e.servers[0]
}