diff options
Diffstat (limited to 'internal/imap/cmds.go')
-rw-r--r-- | internal/imap/cmds.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/imap/cmds.go b/internal/imap/cmds.go index d978d80..7c99fc3 100644 --- a/internal/imap/cmds.go +++ b/internal/imap/cmds.go @@ -24,3 +24,19 @@ func (cmd addCommando) execute(conn *connection) error { func (client *Client) PutMessages(folder Folder, messages []string) error { return client.commander.execute(addCommando{folder, messages}) } + +type replaceCommando struct { + folder Folder + header string + value string + newContent string + force bool +} + +func (cmd replaceCommando) execute(conn *connection) error { + return conn.replace(cmd.folder, cmd.header, cmd.value, cmd.newContent, cmd.force) +} + +func (client *Client) Replace(folder Folder, header, value, newContent string, force bool) error { + return client.commander.execute(replaceCommando{folder, header, value, newContent, force}) +} |