storj/private
Márton Elek 2ae78db660 satellite/email: add delimiter to close the last part of Multipart emails
The existing implementation doesn't send proper rfc1341 compatible mails
according to https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html as
the closing `--boundary_id--` is missing from our mails. (see 7.2.1 from
the standard).

Mailservers which are not very flexible, deny the mails.

Example mail log: (see the
missing boundary delimiter at the end).

```
Subject: Activate your email
From: "Storj DCS - EU1" <noreply@eu1.storj.io>
To: "..." <...>
...

--26d7220f6f1c9f6fb47b535319eb15dce513bb6e1d941a0efddf25e96712
Content-Type: text/html; charset=UTF-8

....

</body>
</html>
.
smtp: DATA error	{"msg_id":"6d82c9e3","reason":"unexpected EOF"}
smtp: 554 5.0.0 Internal server error (msg ID = 6d82c9e3)
```

This patch moves all the Multipart writing to a function to make sure
that the `wr.Close()` (which writes out the last part) is executed
BEFORE `body.Bytes()` (defer added it AFTER `body.Bytes()` was calculated)

Change-Id: I8f18fc81b1857b646470eab32e73d6cbdc50d2ad
2022-02-01 09:55:29 +00:00
..
apigen private/apigen: initial typings and methods 2022-01-26 14:39:22 +00:00
compensation multinode/console: storage usage and total storage usage 2021-06-10 16:01:41 +00:00
crashreportpb crashcollect: process for receiving panics 2021-04-27 18:57:47 +03:00
cui all: golangci-lint v1.33.0 fixes (#3985) 2020-12-05 17:01:42 +01:00
currency private/currency: add strictcsv support to microunit 2020-03-31 14:57:04 -06:00
date Fix monthly earning estimation (#4282) 2021-11-17 18:26:21 -05:00
debugging all: fix dots 2020-07-16 14:58:28 +00:00
lifecycle private/lifecycle: monitor unexpected shutdowns 2021-06-25 19:26:23 +03:00
migrate all: fix error naming 2021-04-29 15:38:21 +03:00
multinodeauth multinode/console: list node infos 2021-01-05 14:49:11 +00:00
multinodepb multinode/reputation: add vetted at timestamp 2021-07-07 18:11:54 +03:00
nodeoperator all: fix error naming 2021-04-29 15:38:21 +03:00
post satellite/email: add delimiter to close the last part of Multipart emails 2022-02-01 09:55:29 +00:00
prompt private/prompt: remove dependency to go-prompt 2020-02-25 13:09:41 +02:00
revocation all: fix error naming 2021-04-29 15:38:21 +03:00
server storagenode: check if QUIC is properly configured 2022-01-20 12:04:04 +00:00
testblobs satellite/audit,storage: increase sleep delay in TestMaxVerifyCount 2021-09-10 15:30:37 +00:00
testmonkit private/testmonkit: move monkit test helper 2021-10-12 14:00:01 +03:00
testplanet private/testplanet: expose NewLogger for other tests 2022-01-27 13:56:27 +02:00
testredis ci: fix lint errors 2021-05-17 13:37:31 +00:00
testrevocation pkg/,private/: merge with private package 2021-04-23 16:37:28 +03:00
teststorj all: fix dots 2020-07-16 14:58:28 +00:00
testuplink mod: bump uplink 2021-05-06 14:48:36 +00:00
version all: fix error naming 2021-04-29 15:38:21 +03:00
web satellite/console,private/web: Rate limit coupon code application 2021-08-23 17:00:31 +00:00