Giter VIP home page Giter VIP logo

Comments (15)

barisbalic avatar barisbalic commented on September 28, 2024

Hi @monicao thanks for raising this issue. From what you have said, that sounds correct, although from your example I can't see what's wrong and I can't reproduce it. Would you be up for recreating the issue in a public repo?

from swoosh.

monicao avatar monicao commented on September 28, 2024

Sure, I can give that a shot tomorrow.

from swoosh.

barisbalic avatar barisbalic commented on September 28, 2024

That is hugely appreciated @monicao

from swoosh.

monicao avatar monicao commented on September 28, 2024

I realized that in order to reproduce the issue I would have to set up the deployment environment (digital ocean droplet, install erlang, etc.). That will be very time consuming and there is no guarantee that it will work.

The email is being sent successfully in development, it's just not sending in production.

I'd be happy to do a quick screen sharing session to debug this on the server I already have. We can set that up over email.

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

Hi @monicao, I've done some digging on that issue and it looks like it's caused by the domain config being nil.

I'm trying to build a release now to check if I can reproduce the bug in that case.

from swoosh.

justinbkay avatar justinbkay commented on September 28, 2024

I saw that error as well, it was because of how my config was being done.
Ended up just putting the key/domain in the same spot as my production
database info. Was trying to load via App.get_env

On Fri, May 13, 2016 at 3:52 PM, Steve Domin [email protected]
wrote:

Hi @monicao https://github.com/monicao, I've done some digging on that
issue and it looks like it's caused by the domain config being nil.

I'm trying to build a release now to check if I can reproduce the bug in
that case.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#76 (comment)

Sites:
http://jbkayconstruction.com
https://twitter.com/justinbkay
http://justinbkay.tumblr.com

It always takes longer than you expect, even when you take into account
Hofstadter’s Law.

  • Hofstadter’s Law

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

You can load config via environment variable by using a {:system, "ENV_VAR"} tuple. It's described in the Swoosh.Mailer docs (https://hexdocs.pm/swoosh/Swoosh.Mailer.html).

I'm sorry this is hard to find, you need to make it clearer that this is possible.

from swoosh.

barisbalic avatar barisbalic commented on September 28, 2024

Haha, I think @stevedomin meant. "we" need to make it clearer, not you!

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

Yep, definitely, sorry :)

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

@monicao I've tried extensively to reproduce that issue using releases but I haven't managed to.

I've put together an example application here: https://github.com/swoosh/phoenix_swoosh_example

Can you try using environment variables like it's done in this application and let us know if you are still seeing the same error. That would be very helpful, thanks!

Also, it would be great to see your code, it doesn't need to be on a server, just getting access to a repo would be enough. Let us know if that's possible, otherwise I'll drop you an email and we'll schedule that screen sharing session.

Thanks again, and sorry everything is not working as expected.

from swoosh.

monicao avatar monicao commented on September 28, 2024

@stevedomin I am working on closed source app, so unfortunately I can't share the code directly.

I will try using environment variables to see if that changes things.

from swoosh.

monicao avatar monicao commented on September 28, 2024

I ended up forking swoosh and inspecting the config variable that was passed into deliver.

The issue was that both the :domain and the :api_key were missing from config. It would be helpful if the adapter raised an exception if either of these two config values are missing.

I could do a quick PR for this if you think it's worth it.

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

Out of interest, do you know why they were missing?

from swoosh.

monicao avatar monicao commented on September 28, 2024

I am using edeliver to deploy and I added the mailgun settings in my sys.config that was copied over using the steps described here. It turns out I also needed to add the entries in my production.secret.exs file as described here.

I didn't have time to investigate why this is happening, but with the duplicated config settings this works now. Might have something to do with the fact that one of these config files is read at compile time and one of them is available at runtime.

from swoosh.

stevedomin avatar stevedomin commented on September 28, 2024

@monicao since this is resolved I'm going to close that issue, if you feel like there's more to say please feel free to reopen.

from swoosh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.