MCPcopy
hub / github.com/pocketbase/pocketbase / LastMessage

Method LastMessage

tests/mailer.go:70–81  ·  view source on GitHub ↗

LastMessage returns a shallow copy of the last sent message. Returns an empty mailer.Message struct if there are no sent messages.

()

Source from the content-addressed store, hash-verified

68//
69// Returns an empty mailer.Message struct if there are no sent messages.
70func (tm *TestMailer) LastMessage() mailer.Message {
71 tm.mux.Lock()
72 defer tm.mux.Unlock()
73
74 var m mailer.Message
75
76 if len(tm.messages) > 0 {
77 return *tm.messages[len(tm.messages)-1]
78 }
79
80 return m
81}

Calls

no outgoing calls