From 782c24f5613d7b8813b266ca1fc276a8582ea855 Mon Sep 17 00:00:00 2001 From: Alan Norton Date: Tue, 23 Feb 2021 08:07:04 -0500 Subject: [PATCH] format_email_address/2 can return a single address or a list --- lib/bamboo/formatter.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bamboo/formatter.ex b/lib/bamboo/formatter.ex index 04b68f83..0c6e0aed 100644 --- a/lib/bamboo/formatter.ex +++ b/lib/bamboo/formatter.ex @@ -56,7 +56,7 @@ defprotocol Bamboo.Formatter do """ @doc ~S""" - Receives data and opts and returns a string or a two item tuple `{name, address}` + Receives data and opts and returns a string, a two item tuple `{name, address}`, or a list of either. opts is a map with the key `:type` and a value of `:from`, `:to`, `:cc` or `:bcc`. You can pattern match on this to customize @@ -65,7 +65,7 @@ defprotocol Bamboo.Formatter do @type opts :: %{optional(:type) => :from | :to | :cc | :bcc} - @spec format_email_address(any, opts) :: Bamboo.Email.address() + @spec format_email_address(any, opts) :: Bamboo.Email.address_list() def format_email_address(data, opts) end