Swoosh.Adapters.Local.Storage.Memory.pop
You're seeing just the function
pop
, go back to Swoosh.Adapters.Local.Storage.Memory module for more information.
Pop the last email from the mailbox.
Examples
iex> email = new |> from("tony.stark@example.com")
%Swoosh.Email{from: {"", "tony.stark@example.com"}, [...]}
iex> Memory.push(email)
%Swoosh.Email{from: {"", "tony.stark@example.com"}, headers: %{"Message-ID": "a1b2c3"}, [...]}
iex> Memory.all() |> Enum.count()
1
iex> Memory.pop()
%Swoosh.Email{from: {"", "tony.stark@example.com"}, headers: %{"Message-ID": "a1b2c3"}, [...]}
iex> Memory.all() |> Enun.count()
0