mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-20 02:57:05 +00:00
Message list is now loaded by AJAX and can be refreshed.
Added a message delete button.
This commit is contained in:
@@ -239,6 +239,15 @@ func (m *Message) Close() error {
|
||||
return m.createGob()
|
||||
}
|
||||
|
||||
// Delete this Message from disk by removing both the gob and raw files
|
||||
func (m *Message) Delete() error {
|
||||
err := os.Remove(m.gobPath())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Remove(m.rawPath())
|
||||
}
|
||||
|
||||
// createGob reads the .raw file to grab the From and Subject header entries,
|
||||
// then creates the .gob file.
|
||||
func (m *Message) createGob() error {
|
||||
|
||||
Reference in New Issue
Block a user