View Source Glific.Mails.MailLog (Glific v5.1.6)
The mail log object
Link to this section Summary
Functions
Standard changeset pattern we use for all data types
Return the count of mail_logs, using the same filter as list_mail_logs
Create a Mail Log
Returns the list of mail logs. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the mail logs itself.
Check if we have sent the mail in given time
Update a Mail Log
Link to this section Types
@type t() :: %Glific.Mails.MailLog{ __meta__: Ecto.Schema.Metadata.t(), category: String.t() | nil, content: map() | nil, error: term(), id: non_neg_integer() | nil, inserted_at: :utc_datetime | nil, organization: Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil, organization_id: non_neg_integer() | nil, status: String.t() | nil, updated_at: :utc_datetime | nil }
Link to this section Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Standard changeset pattern we use for all data types
Return the count of mail_logs, using the same filter as list_mail_logs
@spec create_mail_log(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Create a Mail Log
Returns the list of mail logs. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the mail logs itself.
@spec mail_sent_in_past_time?(String.t(), DateTime.t(), non_neg_integer()) :: boolean()
Check if we have sent the mail in given time
@spec update_mail_log(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
Update a Mail Log