package
1.23.1
Repository: https://github.com/axllent/mailpit.git
Documentation: pkg.go.dev

# Functions

AddTempFile adds a file to the slice of files to delete on exit.
AttachmentSummary returns a summary of the attachment without any binary data.
BroadcastMailboxStats broadcasts the total number of messages displayed to the web UI, as well as the total unread messages.
Close will close the database, and delete if temporary.
CountRead returns the number of emails in the database that are read.
CountTotal returns the number of emails in the database.
CountUnread returns the number of emails in the database that are unread.
DbSize returns the size of the SQLite database.
DeleteAllMessages will delete all messages from a mailbox.
DeleteAllMessageTags deleted all tags from a message.
DeleteMessages deletes one or more messages in bulk.
DeleteSearch will delete all messages for search terms.
DeleteTag deleted a tag and removed all references to the tag.
GetAllTags returns all used tags.
GetAllTagsCount returns all used tags with their total messages.
GetAttachmentPart returns an *enmime.Part (attachment or inline) from a message.
GetMessage returns a Message generated from the mailbox_data collection.
GetMessageRaw returns an []byte of the full message.
InitDB will initialise the database.
IsUnread returns whether a message is unread or not.
LatestID returns the latest message ID If a query argument is set in the request the function will return the latest message matching the search.
List returns a subset of messages from the mailbox, sorted latest to oldest.
LoadTagFilters loads tag filters from the config and pre-generates the SQL query.
MarkAllRead will mark all messages as read.
MarkAllUnread will mark all messages as unread.
MarkRead will mark a message as read.
MarkUnread will mark a message as unread.
MessageIDExists checks whether a Message-ID exists in the DB.
Ping the database connection and return an error if unsuccessful.
ReindexAll will regenerate the search text and snippet for a message and update the database.
RenameTag renames a tag.
Search will search a mailbox for search terms.
SetMessageTags will set the tags for a given database ID, removing any not in the array.
SettingGet returns a setting string value, blank is it does not exist.
SettingPut sets a setting string value, inserting if new.
StatsGet returns the total/unread statistics for a mailbox.
Store will save an email to the database tables.

# Variables

StatsDeleted for counting the number of messages deleted.

# Structs

Attachment struct for inline and attachments swagger:model Attachment.
DBMailSummary struct for storing mail summary.
ListUnsubscribe contains a summary of List-Unsubscribe & List-Unsubscribe-Post headers including validation of the link structure.
MailboxStats struct for quick mailbox total/read lookups.
Message data excluding physical attachments swagger:model Message.
MessageSummary struct for frontend messages swagger:model MessageSummary.
TagFilter struct.