diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-03 00:41:36 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-03 00:41:36 +0200 |
commit | 168cce8a935de864eef95f423f128a7bf49aafda (patch) | |
tree | 9cc240dd479b1e85fbb55e1cda4a14d3a938d50e /internal/imap/cmds.go | |
parent | fec3ecd257c34fba37703b2999ab5ea902314657 (diff) | |
download | feed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.tar.gz feed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.tar.bz2 feed2imap-go-168cce8a935de864eef95f423f128a7bf49aafda.zip |
Update support for IMAP
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}) +} |