Comments (15)
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.
Sure, I can give that a shot tomorrow.
from swoosh.
That is hugely appreciated @monicao
from swoosh.
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.
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.
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.
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.
Haha, I think @stevedomin meant. "we" need to make it clearer, not you!
from swoosh.
Yep, definitely, sorry :)
from swoosh.
@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.
@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.
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.
Out of interest, do you know why they were missing?
from swoosh.
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.
@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)
- Does swoosh support connection pooling? HOT 2
- Support AmazonSES v2 API in the SES adapter. HOT 4
- Multiple reply_to addresses for Mailgun HOT 3
- SMTP2GO: Reply-To field is ignored HOT 1
- `assert_no_email_sent` and `refute_email_sent` do not work with `deliver_many`
- Return failure list when using /email/send API in SMTP2GO Adapter HOT 1
- alternative SMTP adapter HOT 2
- Mailgun provider is not compatible with Finch API client HOT 2
- Mailgun adapter error on Multipart HOT 7
- Error on send email with attachment HOT 10
- `refute_email_sent/1` raises an exception but `assert_email_sent/1` does not with pinned emails HOT 3
- Support sending with multiple Postmark servers HOT 2
- Mua adapter and inline attachments HOT 2
- Finish experimental assertions module HOT 4
- Ensure no more emails than tested are sent in the whole test suite HOT 1
- The AWS SES region can't be overriden using the ExAwsSES adapter HOT 3
- Dialyzer reports unknown function HOT 2
- SMTP2GO Bad Certificate error using Swoosh.ApiClient.Req HOT 2
- Compilation error HOT 2
- Missing documentation of deliver!/2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swoosh.