Commit graph

123 commits

Author SHA1 Message Date
48b4dc6b6c
Fix #85: Client.Send() failing for all messages if one is broken
`Client.Send()` provides the possibility to send multiple `*Msg` in one go. If one of the `*Msg` caused an error with the sending mail server, we were returning completely, while not processing any `*Msg` that came after the failing message.

This PR fixes this behaviour by processing each message first and then return a accumulated error in case any of the `*Msg` processing failed

Additionally, this PR separates the `Client.Send()` method into two different versions. One that makes use of the new `errors.Join()` functionality that is introduced with Go 1.20 and one that handles it the old way for any supported version lower than Go 1.20
2022-12-10 13:41:00 +01:00
d200e982bf
Make golangci-lint errorlint happy 2022-10-17 18:16:00 +02:00
94ad8af58a
Make golangci-lint gofumpt happy 2022-10-17 18:13:00 +02:00
f53579fcf9
Closes #54
- Adds `DialAndSendWithContext()` and makes `DialAndSend()` use the new method
2022-09-26 10:40:57 +02:00
7b030473a6
Final set of unit tests for DSN 2022-09-12 09:31:42 +02:00
c52a437f7f
More tests 2022-09-11 22:05:43 +02:00
aed71397c0
Implemented DSNs as described in RFC 1891
- Added test coverage for the WithDSN* methods
- Updated README.md accordingly
2022-09-11 21:07:15 +02:00
31001e87b2
#24: Add SPDX license IDs for REUSE compliance
# SUMMARY

* Bad licenses:
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses:
* Unused licenses:
* Used licenses: CC0-1.0, MIT
* Read errors: 0
* Files with copyright information: 45 / 45
* Files with license information: 45 / 45

Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)
2022-06-17 15:05:54 +02:00
4b99a9e830
More tests for client.go 2022-03-21 12:18:08 +01:00
db496f61cb
More tests for client.go. +80% coverage is probably the most we can get 2022-03-21 10:38:22 +01:00
f15d3ca25e
Add actual mail sending test to client_test.go 2022-03-21 10:17:48 +01:00
e909bd5499
More tests. 50% overall coverage now 2022-03-18 15:05:33 +01:00
b00116c892
More tests. 100% header.go coverage 2022-03-18 10:15:02 +01:00
fcd1bb8d12
Starting with client testing 2022-03-16 21:32:51 +01:00
1c699da955
More tests. Also testing GH's behaviour on ENV variables for testing 2022-03-16 21:02:31 +01:00
ec162e7836
More tests for client.go 2022-03-16 14:09:50 +01:00
a0ebc5bd78
More and better tests for client.go 2022-03-15 22:37:55 +01:00
ecfb966de6
Test fixed 2022-03-15 21:50:25 +01:00
fe3925c1e6
More tests coverage for client.go 2022-03-15 21:48:36 +01:00
2e1b27aec6
Adding more tests... coverage for client.go is now 30% 2022-03-15 21:10:29 +01:00
6285b5fb4f
More progress... calling it a day. 2022-03-09 16:52:23 +01:00
b3554a9578
Slow progress 2022-03-07 16:24:49 +01:00
2fcc0f59cd
Adding first tests 2022-03-06 15:15:42 +01:00