1 // tawesoft.co.uk/go/email 2 // 3 // Copyright © 2020 - 2021 Tawesoft Ltd <open-source@tawesoft.co.uk> 4 // Copyright © 2020 - 2021 Ben Golightly <ben@tawesoft.co.uk> 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in all 14 // copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 // SOFTWARE. 23 24 // Package email implements the formatting of multipart MIME e-mail messages, 25 // including Unicode headers, attachments, HTML email, and plain text. 26 // 27 // File attachments are lazy, and read from disk only at the time the e-mail is 28 // sent. 29 // 30 // (Optionally) supports encoding very long headers using folding whitespace. 31 // 32 // Examples 33 // 34 // Format an email message and print it, as well as its JSON serialisation, to 35 // a Writer (here, stdout). 36 // 37 // https://www.tawesoft.co.uk/go/doc/email/examples/stdout/ 38 // 39 // 40 // Package Information 41 // 42 // License: MIT (see LICENSE.txt) 43 // 44 // Stable: candidate 45 // 46 // For more information, documentation, source code, examples, support, links, 47 // etc. please see https://www.tawesoft.co.uk/go and 48 // https://www.tawesoft.co.uk/go/email 49 // 50 // 2021-03-13 51 // 52 // * The envelope From field has been renamed ReturnPath. It was intended for 53 // this change to make part of the 2021-03-07 changes - apologies for its 54 // late inclusion. This should be the last breaking API change. 55 // 56 // 2021-03-12 57 // 58 // * Add JSON (de)serialisation 59 // 60 // * Add missing error case 61 // 62 // 2021-03-07 63 // 64 // * Breaking changes to this email package, as previously warned, bump the 65 // monorepo tagged version to v0.2.0 and upgrade the email package stability 66 // rating from "unstable" to "candidate". For previous behavior, point your 67 // imports to `tawesoft.co.uk/go/legacy/email`. 68 // 69 // * Attachments are now read/written more efficiently. 70 // 71 // * Attachments are now closed properly! 72 // 73 // * Attachment Reader method is now required to return something satisfying 74 // the io.ReadCloser interface. If no Close is required, wrap the return 75 // value in an `io.NopCloser`. 76 // 77 // * The Envelope struct no longer has a message field - instead, use 78 // an (Envelope, Message) 2-tuple where you need both of these items. 79 // 80 // * An email's Message-ID header is no longer implicitly generated for an 81 // email. This is left to the mail submission agent. 82 // 83 // * If you ARE implementing a mail submission agent, an email's Message-ID 84 // header can be specified by the new ID field on the Message struct type. 85 // 86 // * A cryptographically unique Message ID can be generated from the newly 87 // exposed function, NewMessageID. 88 // 89 // * The Print method on Message is renamed Write. 90 // 91 // * Email message lines longer than 998 characters are now supported in 92 // headers using folding white space. Note that some parsers, such as Go's 93 // `net.mail`, do not understand this syntax (even though it is allowed). 94 // 95 // * The new method WriteCompat on Message won't use folding white space to 96 // support long headers and will instead generate an error. Use this method 97 // in preference to Write if you are expecting the consumer of your email 98 // message (e.g. a Go implementation) will be unable to handle folding white 99 // space. 100 // 101 // 102 package email // import "tawesoft.co.uk/go/email" 103 104 // Code generated by internal. DO NOT EDIT. 105 // Instead, edit DESC.txt and run mkdocs.sh.