1
0
forked from migadu/mailex
This commit is contained in:
Dejan Strbac
2015-11-25 19:58:56 +01:00
parent 8ed977aa02
commit 6a6bd3c984
2 changed files with 3 additions and 352 deletions

View File

@ -11,7 +11,7 @@ defmodule Mailex do
]
def deliver(email, config \\ []) do
config = Keyword.merge(@config_defaults, config)
config = Keyword.merge(@config_defaults, config || [])
message = email |> Mailex.Render.render
from = email.from |> Mailex.Address.envelope_format
@ -24,9 +24,8 @@ defmodule Mailex do
msg -> { :ok, msg }
end
else
IO.puts "\n\n[[[ Mailex ]]]\n\nFROM: #{from}\nTO: #{to}\n"
IO.puts "RAW START -------\n#{message}\nRAW END -------"
{:ok, "dumped to console"}
IO.puts "\n\n[[[ Mailex ]]]\n\nFROM: #{from}\nTO: #{to}\n\nRAW START -------------\n#{message}\nRAW END -------------\n\n"
{:ok, "message dumped to console"}
end
end