• Resolved florianfls

    (@florianfls)


    Hello,

    I have a multisite installation of wordpress.
    On the main blog, WP Mail SMTP is not enabled. On the sub blogs, it is enabled with different configurations.

    I have a webhooks system, received on the main blog. Depending on datas i wan’t to send e-mails with the sub blogs configuration, so i use switch_to_blog function just before sending e-mails via wp_mail. My problem is that doing this, the WP Mail SMTP configuration of the sub blog (Mailgun) is not used, my e-mails are sent using the main blog configuration (sendmail).

    Am i doing something wrong ? Or what i am trying to do is not possible ?

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @florianfls,

    Thanks for reaching out and sharing the details. While I’m not super familiar with ‘switch_to_blog’, it sounds possible to achieve what you’re trying to do. Could you please share how are you using Sendmail in the main blog and try without any SMTP set up in the main blog?

    Regards,

    Thread Starter florianfls

    (@florianfls)

    Hi @sanzeeb3 and thank you for you reply.

    In the main blog, WP Mail SMTP was not activated, so it was the default WordPress behaviour. I just tried to activate it on the main blog too and to configure it using no mailer (Default). It is now working when i manually switch blogs.

    Thank you !

    Hi @florianfls,

    That’s great. Thank you for the update!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sending e-mails on multisite’ is closed to new replies.