-
Notifications
You must be signed in to change notification settings - Fork 13
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
create named sessions without mailgun #3
Comments
fwiw - As I understand this -- this is not related to mailgun. the error
The root cause of this error: the sessions directory /tmp/tmate/sessions is mounted and shared between two containers |
Hi, diff --git a/config/prod.exs b/config/prod.exs
index 4566092..b029444 100644
--- a/config/prod.exs
+++ b/config/prod.exs
@@ -76,6 +76,8 @@ config :tmate, Tmate.Scheduler,
]
config :tmate, Tmate.Mailer,
- adapter: Bamboo.MailgunAdapter,
- api_key: System.get_env("MAILGUN_API_KEY"),
- domain: System.get_env("MAILGUN_DOMAIN")
+ adapter: Bamboo.SMTPAdapter,
+ server: System.get_env("SMTP_HOST"),
+ port: System.get_env("SMTP_PORT"),
+ hostname: System.get_env("SMTP_DOMAIN"),
+ from: System.get_env("EMAIL_FROM")
diff --git a/lib/tmate_web/emails/email.ex b/lib/tmate_web/emails/email.ex
index fd89786..1dd9a5c 100644
--- a/lib/tmate_web/emails/email.ex
+++ b/lib/tmate_web/emails/email.ex
@@ -12,7 +12,7 @@ defmodule Tmate.Email do
defp base_email do
new_email()
- |> from("tmate <[email protected]>")
+ |> from(Application.fetch_env!(:tmate, Tmate.Mailer)[:from])
|> put_html_layout({TmateWeb.LayoutView, "email.html"})
end
end
diff --git a/mix.exs b/mix.exs
index e829b21..77f4789 100644
--- a/mix.exs
+++ b/mix.exs
@@ -54,6 +54,7 @@ defmodule Tmate.MixProject do
{:timex, "~> 3.0"},
{:httpoison, ">= 0.0.0"},
{:bamboo, "~> 1.3"},
+ {:bamboo_smtp, "~> 3.0.0"},
]
end
|
Hey,
I am trying to host my own tmate server.
Everything expect named sessions is working fine.
When I register for an API key I get an error that my mailgun API key is not working. This is right because I do not own a mailgun API key.
When I look in postgres a user has been created with an API key.
When I try to use this
api_key
to create a named session usingtmate -k tmk-JpeKMdFDH21ogA5ekHbfWwN6Jn -n session-name
I get this error message:tmate-websocket/lib/tmate/session.ex
Line 183 in 628cd91
Is this related to the mailgun API error? Maybe the user was not full created?
Thank you for your help
The text was updated successfully, but these errors were encountered: