Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bamboo.Mua configuration fix for some mailing servers #4249

Open
2 tasks done
Striffly opened this issue Jun 19, 2024 · 7 comments · May be fixed by #4262
Open
2 tasks done

Bamboo.Mua configuration fix for some mailing servers #4249

Striffly opened this issue Jun 19, 2024 · 7 comments · May be fixed by #4262
Assignees
Labels
self-hosting Anything self-hosted

Comments

@Striffly
Copy link

Striffly commented Jun 19, 2024

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

Hello,

I recently migrated Plausible from version 2.0.0 to 2.1.0 (and now 2.1.1), and thus switched to Bamboo.Mua.

Since then, I have been encountering problems with receiving Plausible emails, which have become impossible.

To debug the issue, here are the commands I executed:

email = Bamboo.Email.new_email(from: PlausibleWeb.Email.mailer_email_from(), to: "[email protected]", subject: "test html_body", html_body: "test html_body")
Plausible.Mailer.deliver_now(email)

email = Bamboo.Email.new_email(from: PlausibleWeb.Email.mailer_email_from(), to: "[email protected]", subject: "test text_body", text_body: "test text_body")
Plausible.Mailer.deliver_now(email)

email = Bamboo.Email.new_email(from: PlausibleWeb.Email.mailer_email_from(), to: "[email protected]", subject: "test text_body html_body", text_body: "test text_body html_body", html_body: "test text_body html_body")
Plausible.Mailer.deliver_now(email)

To be sure of my results, I performed these commands each time with two different destination emails.
In all cases :

  • The logs returned by the console do not indicate any errors and return a table of this type :
{:ok,
 %Bamboo.Email{
   from: {"xxx", "[email protected]"},
   to: [nil: "[email protected]"],
   cc: [],
   bcc: [],
   subject: "test text_body html_body",            <==== depending of command
   html_body: "test text_body html_body",       <==== depending of command
   text_body: "test text_body html_body",        <==== depending of command
   headers: %{},
   attachments: [],
   assigns: %{},
   private: %{},
   blocked: false
 }}

  • Only emails sent with both the text_body and html_body parameters (and not just one or the other) are correctly delivered.
    I deduce that on the Plausible side, one of the two parameters is not defined at the time of sending.

I discussed this issue on this link: #4125 (comment)
However, I do not have the technical skills to correctly modify and debug the file https://github.com/plausible/analytics/blob/v2.1.0/lib/plausible_web/email.ex

As a mail server, I am using the SMTP from OVHcloud (https://www.ovhcloud.com/), which is the leading French hosting solutions provider. Therefore, a significant player in the web ecosystem.

Would it be possible to make this modification?

Expected behavior

Receive emails

Screenshots

No response

Environment

- OS: Debian 12
- Plausible environment: Docker
- Browser: Chromium
- Browser Version: 126.0.6478.61
@Striffly Striffly changed the title Bamboo.MUA configuration fix for some mailing servers Bamboo.Mua configuration fix for some mailing servers Jun 19, 2024
@ruslandoga
Copy link
Contributor

ruslandoga commented Jun 20, 2024

👋 @Striffly

If {:ok, %Bamboo.Email{}} is returned, it means that Bamboo.Mua successfully sent the message and received a delivery receipt from the SMTP server. I couldn't reproduce the issue with Gmail #4125 (reply in thread) so I still think it's a problem on your SMTP relay or hotmail.fr side, probably some spam filtering or similar.

@ruslandoga ruslandoga self-assigned this Jun 20, 2024
@Striffly
Copy link
Author

Striffly commented Jun 20, 2024

At the level of email reception, I am experiencing this issue with two different addresses (hotmail and OVH). Nothing is spam, I've check it like 50 times lol
I believe the problem is likely with the SMTP relay. However, the relay I am using comes from a major hosting service, at least in Europe: https://en.wikipedia.org/wiki/OVHcloud. Without it, I can't use custom domain name for my noreply email.

Would it be possible to implement the modification I mentioned to resolve this issue?

@ruslandoga
Copy link
Contributor

ruslandoga commented Jun 20, 2024

The problem seems to be similar to https://community.ovh.com/t/ovh-smtp-server-issue-any-possible-explanation-welcome/42068/2 as the SMTP transaction is successful but the email is not delivered. Would you be able to reach out to OVH support to file a ticket or start a discussion to investigate it? Solving the root cause would help more people.

@ruslandoga
Copy link
Contributor

Meanwhile I'll open a PR to add text_body to all emails.

@Striffly
Copy link
Author

The problem seems to be similar to https://community.ovh.com/t/ovh-smtp-server-issue-any-possible-explanation-welcome/42068/2 as the SMTP transaction is successful but the email is not delivered. Would you be able to reach out to OVH support to file a ticket to investigate it? Solving the root cause would help more people.

Great idea, I'll submit a ticket to bring attention to this issue and have them take a look at it

Meanwhile I'll open a PR to add text_body to all emails.

Thanks !

@ruslandoga ruslandoga added the self-hosting Anything self-hosted label Jun 22, 2024
@ruslandoga ruslandoga linked a pull request Jun 23, 2024 that will close this issue
4 tasks
@ruslandoga
Copy link
Contributor

ruslandoga commented Jun 23, 2024

👋 @Striffly

I built a new image with #4262 (my build PR: ruslandoga#315), would you be able to try it out and see if it fixes email delivery?

plausible:
  image: ghcr.io/ruslandoga/plausible:add-text-body-to-all-emails-my-build-223533c

@Striffly
Copy link
Author

@ruslandoga, it works like a charm 🎉
I've tested password reset & people invite, and on two email addresses, I received the two emails.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
self-hosting Anything self-hosted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants