Simple mailer, shown below gets the following error when called. Works fine is test mode but trying to send an actual email fails. This is with Elixir 1.1.0 and Erlang 18.1.
** (FunctionClauseError) no function clause matching in IO.chardata_to_string/1
(elixir) lib/io.ex:333: IO.chardata_to_string(nil)
(elixir) lib/path.ex:467: Path.join/2
(elixir) lib/path.ex:449: Path.join/1
lib/client.ex:44: Mailgun.Client.send_without_attachments/2
defmodule BrochureSite.Mailer do
use Mailgun.Client, domain: Application.get_env(:my_app, :mailgun_domain),
key: Application.get_env(:my_app, :mailgun_key)
@from "support@oil-law.com"
@to_sales "paul@oil-law.com"
def send_contact_me_email do
send_email to: @to_sales,
from: @from,
subject: "Sales Lead",
text: "There's a customer that wants to know more."
end
end
Simple mailer, shown below gets the following error when called. Works fine is test mode but trying to send an actual email fails. This is with Elixir 1.1.0 and Erlang 18.1.
I'm on heroku so config looks like: