Commit graph

287 commits

Author SHA1 Message Date
6f93e5835e
Introducing MiddlewareType and WriteToSkipMiddleware
For middlewares to be able to access the fully written mail message, we need a way to execute WriteTo without the calling middleware to be handled, otherwise we end up in an infinite loop

Therefore, this PR introduces the MiddlewareType and the corresponding change of the Middleware interface. We now require to return the MiddlewareType when the Type() method on the interface is called

This way we can also introduce the WriteToSkipMiddleware method which takes a MiddlewareType as argument. This will allow us to use a WriteTo call with the initiating Middleware to be skipped
2022-10-25 16:42:18 +02:00
a44383eed2
Update doc.go
Bump version to 0.3.2
2022-10-20 18:46:24 +02:00
c32d2770e9
Merge pull request #68 from wneessen/fix-io-reader
New Reader type
2022-10-20 18:45:16 +02:00
7cbb5a71e3
Fix REUSE header 2022-10-20 18:33:18 +02:00
b6beeb5cae
Finalized the Reader type and removed the broken Read() method 2022-10-20 18:26:51 +02:00
183fb347d6
Fix create header maps in case SetHeader or SetAddrHeader is called on an empty Msg type 2022-10-20 18:06:26 +02:00
5faa6dfbd6
We now return a Reader instead of the io.Reader interface 2022-10-20 18:03:57 +02:00
4a309dc73a
REUSE fix 2022-10-20 15:53:59 +02:00
966615584d
Implement a proper io.Reader interface since the current implementation is flawed 2022-10-20 15:52:53 +02:00
50ee227456
Update sonar-project.properties
Remove gosec
2022-10-18 17:37:34 +02:00
4a1b1ede96
Update sonarqube.yml
Remove gosec and update to Go 1.19
2022-10-18 17:36:13 +02:00
ff6a6a5f85
Merge pull request #67 from wneessen/codecov-versionfix
Fix codecov Go version setup
2022-10-18 16:49:18 +02:00
f36df2fcdb
Fix codecov Go version setup
The different code version usages in the codecov workflow were missing the actual go setup set, which caused all tests to always run with Go 1.17. This PR fixes this
2022-10-18 16:40:03 +02:00
b0dbe19ee1
Updated .gitignore 2022-10-18 15:39:55 +02:00
ebe6fc5e6b
Merge pull request #66 from wneessen/golangci-lint
Introduce golangci-lint
2022-10-17 18:46:19 +02:00
8c6f291b38
Update golangci-lint.yml 2022-10-17 18:35:53 +02:00
b01947117b
Update golangci-lint config 2022-10-17 18:34:05 +02:00
03b5916615
Update golangci-lint config 2022-10-17 18:29:18 +02:00
69a97c7c98
Update golangci-lint config 2022-10-17 18:27:53 +02:00
d89f50ec6b
Update golangci-lint config 2022-10-17 18:26:54 +02:00
9e2fc70ee6
Update golangci-lint.yml 2022-10-17 18:21:28 +02:00
0149003d49
Update golangci-lint.yml 2022-10-17 18:20:37 +02:00
d4ae5fe07c
Fix golangci-lint config SPDX license 2022-10-17 18:19:50 +02:00
872315ed80
Create golangci-lint.yml 2022-10-17 18:18:32 +02:00
d200e982bf
Make golangci-lint errorlint happy 2022-10-17 18:16:00 +02:00
321b512c95
Make golangci-lint gofumpt happy 2022-10-17 18:13:28 +02:00
94ad8af58a
Make golangci-lint gofumpt happy 2022-10-17 18:13:00 +02:00
5bea905ff9
Make golangci-lint gofumpt happy 2022-10-17 18:12:18 +02:00
419469c297
Introduce golangci-lint 2022-10-17 18:10:24 +02:00
da089fc348
Update doc.go
Bump version to 0.3.1
2022-10-12 17:04:24 +02:00
42649231e6
Merge pull request #63 from dhia-gharsallaoui/main
Expose Msg attachments fields
2022-10-12 14:37:40 +02:00
Dhia Gharsallaoui
b94a42ebe8
Expose Msg attachments fields 2022-10-12 13:36:52 +02:00
94924cbba4
Update doc.go
Bump version to 0.3.0
2022-10-11 19:45:55 +02:00
a3a2b0e4b4
Merge pull request #61 from wneessen/60-expose-msg-fields
Expose Msg bodypart fields
2022-10-11 19:44:16 +02:00
15caea0181
Closes #60. Added final test coverage and an additional SetContent method 2022-10-11 19:27:54 +02:00
dbe58745be
#60 Working on Get/Set methods to access the Msg part slice
Still some tests needed
2022-10-11 17:05:44 +02:00
4e0d92d0db
Merge pull request #59 from wneessen/version-bump-029
Bump version to 0.2.9
2022-10-08 13:42:06 +02:00
5b8ceb8317
Bump version to 0.2.9 2022-10-08 13:41:46 +02:00
15a92f10cb
Updated README.md to introduce middlewares 2022-10-02 13:03:51 +02:00
10575c03e2
Merge pull request #57 from wneessen/getgenheader
Add GetGenHeader to Msg
2022-10-02 12:40:34 +02:00
da130c0222
Added test for Msg.GetGenHeader 2022-10-02 12:30:08 +02:00
cd2ee86846
Added GetGenHeader to the Msg to grant read access to set generic headers (e g. to use in Middlewares) 2022-10-02 12:25:49 +02:00
664aca5e90
Merge pull request #55 from wneessen/54-context
Closes #54
2022-09-26 10:47:41 +02:00
f53579fcf9
Closes #54
- Adds `DialAndSendWithContext()` and makes `DialAndSend()` use the new method
2022-09-26 10:40:57 +02:00
ce257e1a01
Merge pull request #53 from wneessen/readme-update-contributors
Update README.md
2022-09-23 11:26:53 +02:00
7a68262a80
Update README.md
Add Dhia Gharsallaoui to contributors list
2022-09-23 11:19:35 +02:00
3a5f6393f3
Merge pull request #50 from dhia-gharsallaoui/main
Implement middleware concept and their tests
2022-09-23 11:17:57 +02:00
dhia gharsallaoui
a4733f0618 Implement middleware concept and their test 2022-09-22 18:05:47 +02:00
69db3b74b0
Merge pull request #52 from wneessen/readme-add-discord
Update README.md
2022-09-22 16:56:21 +02:00
e36a5ca1f9
Update README.md
Added Discord badge.
2022-09-22 16:54:38 +02:00