enough_mail 2.1.0
enough_mail: ^2.1.0 copied to clipboard
IMAP, POP3 and SMTP for email developers. Choose between a low level and a high level API for mailing. Parse and generate MIME messages. Discover email settings.
2.1.0 #
- The
MailClient.deleteMessages()/undoDeleteMessages()as well as themoveMessages()andundoMoveMessages()calls will now update the givenmessagesUIDs automatically, when they have been specified. - Simplify building a
multipart/alternativemessage or message part by adding the optionplainTextandhtmlTextparameters inMessageBuilder.prepareMultipartAlternativeMessage()andaddMultipartAlternative(). - Fixed documentation for generating a mime message with an attachment (thanks lqmminh!).
2.0.1 #
- Thanks to yarsort resolved various POP3 bugs.
- Interpret mime messages with an (invalid) 2-digit year as coming from the current millennium.
2.0.0 #
Improvements and fixes:
- Thanks to matthiasn the date parsing/generation on west of greenwich timezones now works properly.
- Improve automatic re-connecting when using the high-level MailClient API.
- Support timeouts for IMAP, SMTP and POP calls.
MimeMessage:- Get an alternative mime part easier with
MimePart? getAlternativePart(MediaSubtype subtype). - Retrieve all recipients via the
List<MailAddress> get recipientsgetter. - Support decoding
binarytransfer-encoding for text message parts. - Introduce
guid/ global unique IDs which are set automatically when using the high-levelMailClient. - Correctly unwrap header values before decoding them.
- Accept headers that have no space after the colon-separator.
- Get an alternative mime part easier with
- Improve high level API support for OAUTH:
- You can now define
refreshandonConfigChangedcallback methods when connecting to a mail service usingMailClient.
- You can now define
- Support expunging messages when deleting them in
MailClientwithFuture<DeleteResult> deleteMessages( MessageSequence sequence, {bool expunge = false}). OauthAuthentication now contains a complete OauthToken. main MessageBuilder: Access also text-attachments in theattachmentsgetter.- Only use
STARTTLSwhen the IMAP service supports it. - Simplify search API.
Breaking changes:
- Package structure is simplified, so that imports of specific classes are not possible anymore. Instead either
import 'package:enough_mail/enough_mail.dart';or one of the specializes sub-packagescodecs.dart,discover.dart,highlevel.dart,imap.dart,mime.dart,pop.dartorsmtp.dart. Authentication.passwordCleartextis renamed toAuthentication.passwordClearTextMailboxAPI has changed specifically when creating mailboxes yourself.
Other:
- Improved code style, enforcing linting rules.
- Improve API documentation.
- Improve package structure
- Many further small-scale improvements.
1.3.6 #
- Fix generating messages with several recipients in
MessageBuilder. Previously semicolons were used that were not accepted by all mail providers.
1.3.5 #
- Add
bool Function(X509Certificate)? onBadCertificatecallback to handle invalid certificates #167 - Stop polling when disconnecting high level
MailClient - Ignore subsequent
IDLErequests when already in idle mode inImapClient - Improve documentation
1.3.4 #
- Fix some IMAP mailbox commands when there is no mailbox selected: #160 #164 #165
1.3.3 #
- Add easier method to setup a
MailAccountwith manual settings by callingMailAccount.fromManualSettings()orMailAccount.fromManualSettingsWithAuth(). This is useful when settings cannot or should not be auto-discovered, for example.
1.3.2 #
- Fix login for IMAP servers that do not define capabilities in their
AUTH/LOGINresponse #159
1.3.1 #
- Always quote user name and password in IMAP login, #158
- Thanks to fttx2020 we have these great improvements:
- Fix for POP3 UID LIST command
- Fix parsing of POP3 responses
- Handle more Chinese character encodings
- Handle some base64 text variations better
SmtpExceptions now contain the full error description
1.3.0 #
- Support read receipts #149
- Check if a message contains a read receipt request with
MimeMessage.isReadReceiptRequested - Generate a read request response with
MessageBuilder.buildReadReceipt()
- Check if a message contains a read receipt request with
- Support Windows-1256 encoding
- Add another message as an attachment with
MessageBuilder.addMessagePart()#153 - Easily retrieve all leaf parts after loading
BODYSTRUCTUREwithMimeMessage.body.allLeafParts - Fix for responses with a line break spread around 2 chunks #140
- Improve identification of message parts with their
fetchId#141 #143 - Thanks to A.Zulli again! - Messages are now send with
utf-8rather thanutf8to reduce problems #144 - Thanks to gmalakov - Fix for responses with a literal
{0}response #145 - Better detection of plain text messages thanks to castaway
1.2.2 #
- Assume
8bitencoding when nocontent-transfer-encodingis specified in a MIME message. - Exclude empty address-lists when building a message with
MessageBuilder. - Retrieve a MIME part wit the fetchId
1correctly. ImapClient.idleStart()throws an error when no mailbox is selected.MailClient.fetchMessageContents()allows you to specify which media types you want to include with theincludedInlineTypesparameter, e.g.final mime = await mailClient.fetchMessageContents(envelopeMime, includedInlineTypes: [MediaToptype.image]);.- Convenience improvements:
- Select a mailbox just by it's flag like
MailboxFlag.sentwithMailClient.selectMailboxByFlag(MailboxFlag)method. - Check if an email address contains a personal name with
MailAddress.hasPersonalNamegetter.
- Select a mailbox just by it's flag like
1.2.1 #
- Handle raw data in parameter values of IMAP
FETCHresponses.
1.2.0 #
- Thanks to KevinBLT mime messages will now always have a valid date header.
- The high level search API has been extended and access simplified
- The high level thread API has been simplified
1.1.0 #
- Thanks to A.Zulli the
UNSELECTIMAP command of rfc3691 is now supported withImapClient.unselectMailbox(). - Support THREAD IMAP Extension with
ImapClient.threadMessages()anduidThreadMessage()as well as the high level APIMailClient.fetchThreads()andfetchThreadData(), the latter can set theMimeMessage.threadSequenceautomatically. #44 - Access embedded
message/rfc822messages usingmimePart.decodeContentMessage(). #138 - Added
SearchQueryType.toOrFromto easily search for recipients or senders of a message. - All Mailbox commands now return the mailbox in question, not the currently selected mailbox.
- Improve automatic reconnects in high level
MailClientAPI. - Added high level OAuth login option and
MailAccount.fromDiscoveredSettingsWithAuth()for easy setup. #137 - Appending a message will now return the new UID of that message.
- Continue editing a draft easily by calling
MessageBuilder prepareFromDraft(MimeMessage draft). - You now easier load the next page of of search using
MailClient.searchMessagesNextPage(MailSearchResult). - Improve null-safety.
- Breaking API changes:
- To align with Dart APIs,
MessageSequence.isEmptyandisNotEmptyare now getters and not methods anymore. So instead ofif (sequence.isEmpty())please now useif (sequence.isEmpty), etc. - Date headers are always decoded to local time. Instead of
mimeMessage.decodeDate().toLocal()now just callmimeMessage.decodeDate(). - High level API
MailSearchResulthas been refactored to usePagedMessageSequence.
- To align with Dart APIs,
1.0.0 #
enough_mailis now null safe #127- Support
zulutimezone in date decoding #132 - When the
MailClientloses a connection or reconnects, it will now fire correspondingMailConnectionLostandMailConnectionReEstablishedevents. - When the
MailClientreconnects, it will fetch new messages automatically and notify about them usingMailLoadEvent. - Breaking changes to
v0.3:MessageBuilder.encodingis renamed toMessageBuilder.transferEncodingand theenumpreviously calledMessageEncodingis now calledTransferEncoding. All optional parameters previously calledencodingare now also namedtransferEncoding.MetaDataEntry.entryhas been renamed toMetaDataEntry.name.ImapClient.setQuota()andgetQuota()methods use named parameters.- Due to null safety, a lots of functions that previously (wrongly) accepted
nullparameters do not acceptnullas input anymore. - Some fields changed to
finalto ensure consistency.
0.3.1 #
- Fix for handling
PARTIALIMAP responses - thanks to A.Zulli - Fix for handling
FETCHIMAP responses that are spread across several response lines for a single message - #131
0.3.0 #
- KevinBLT contributed the following improvements and features:
- Check out the experimental DKIM signing of messages.
- Enjoy the improved the performance of
QuotedPrintableencoding. - BCC header is now stripped from messages before sending them via SMTP
- A.Zulli contributed major IMAP features in this release:
- Sort messages with
ImapClient.sortMessages(...)SORT - and also use the extended sort mechanism with specifyingreturnOptionson servers with ESORT. ImapClient.searchMessages(...)now acceptsList<ReturnOption>parameter for extending the search according to the ESEARCH standard.- Support
PARTIALresponses according to the CONTEXT IMAP extension. - Use the LIST extensions:
- Sort messages with
- Alexander Sotnikov fixed
POP3so that you can now use thePopClientas intended. - SMTP improvements:
- You can now send messages via the SMTP
BDATcommand usingSmtpClient.sendChunkedMessage()/sendChunkedMessageData()/sendChunkedMessageText(). - You don't require a
MimeMessageto send any more when you send messages either viaSmtpClient.sendMessageData()orSmtpClient.sendMessageText().
- You can now send messages via the SMTP
- MessageBuilder / MIME generation improvements:
- Attachments are now also added when forrwarding a message without quoting in
MessageBuilder.prepareForwardMessage(). - You can now also prepend parts by setting
inserttotruewhen callingaddPart().
- Attachments are now also added when forrwarding a message without quoting in
- Other improvements and bugfixes:
- Remove some dependencies and relax constraints on some so that we all get quicker through the
null-safetychallenge. - Fixed decoding of 8bit messages that use a different charset than UTF8
- Fixed header decoding in some edge cases
- Some fixes in parsing personal names in email addresses
- Support Chinese encodings
GBKandGB-2312 - Improve reconnecting when using the high level API
- Only download the
ENVELOPEinformation when a new mail is detected in high level API
- Remove some dependencies and relax constraints on some so that we all get quicker through the
- Breaking changes:
MessageBuilder.replyToMessageis renamed toMessageBuilder.originalMessage
0.2.1 #
- Allow to specify
connectionTimeoutfor all low level clients - Support non-ASCII IMAP searches when supported by server
- Fix reconnection issue for
ImapClient - Fix decoding of sequentiell encoded words in edge cases
- Do a
noopwhen resumingMailClientwhen server does not supportIDLE
0.2.0 #
- ImapClient now processes tasks sequentially, removing the dreaded
StreamSink is bound to a streamexception when accessing ImapClient from several threads. - Highlevel API for adding mail messages with
MailClient.appendMessage(...)/.appendMessageToFlag(...)andMailClient.saveDraftMessage(...) - Searching for messages is now easier than ever with
MailClient.search(MailSearch)andSearchQueryBuilder- #109 - Sent messages are now appended automatically when using the high level
MailClient.sentMessage(...)call unless setting theappendToSentparameter tofalse. - Create IMAP search criteria with
SearchQueryBuilderand conduct common searches withMailClient.search(MailSearch) - Fixed detection of audio media types
- Added
CRAM-MD5authentication support for SMTP - #108 - Added
XOAUTH2authentication support for SMTP - #107 - Create MessageSequence from list of mime messages with
MessageSequence.fromMessages(List<MimeMessage>) - You can now check with the highlevel API if you can send 8bit messages with
MailClient.supports8BitEncoding()and set the preferred encoding withMailClient.buildMimeMessageWithRecommendedTextEncoding(MessageBuilder). MessageBuildernow can recommend text encodings withMessageBuilder.setRecommendedTextEncoding(bool supports8Bit)and sets content types automatically depending on attachments.- Access attachment information easier using the
MessageBuilder.attachmentsfield and theAttachmentInfoclass. - You can send a
MessageBuilderinstance instead of aMimeMessagewithMailClient.sendMessageBuilder(...). - Breaking API changes:
SmtpClient.login()is deprecated, please use the better namedSmtpClient.authenticate()instead, e.g.:await smtpClient.authenticate(userName, password, AuthMechanism.login)BodyPart.idis renamed toBodyPart.cidto make the meaning clearer.
0.1.0 #
- Moving from response based to exceptions, compare the migration guide for details compare the migration guide in Readme.md and #101 for details - specicial thanks to Tienisto
- Improved performance when downloading large data significantly
- High Level API now checks for SMTP START TLS support before switching to a secure connection when connected via plan sockets
- Low level SMTP API now exposes all found server capabilities
- Fix decoding bug for UTF8 8 bit encoded text
ImapClient.search(...)now returns aMessageSequenceinstead just a list of integers- High level API now supports moving messages with
MailClient.moveMessages(...)andMailClient.undoMoveMessages()methods - High level API now supports deleting messages with
MailClient.deleteMessages(...)andMailClient.undoDeleteMessages()methods
0.0.36 #
- Remove spaces between two encoded words in headers
- High level API support for deleting messages and undoing it:
Future<MailResponse<DeleteResult>> deleteMessages(MessageSequence sequence, Mailbox trashMailbox)Future<MailResponse<DeleteResult>> deleteAllMessages(Mailbox mailbox,{bool expunge})
- Deleted messages are now preferably moved to
\Trashfolder, when possible. - Optionally mark a message as seen by setting
markAsSeenparameter totruewhen fetching messages or message contents using the high level API, e.g.MailClient.fetchMessageContents(message, markAsSeen: true);
0.0.35 #
- Ignoring malformed UT8 when logging thanks to Tienisto.
- Use
enough_convertpackage for previously missing character encodings. - Add
MimeMessage.parseFromText(String text)helper method. - Add Open PGP mime types like
MediaSubtype.applicationPgpSignatureto known media types.
0.0.34 #
- Fix handling of
VANISHED (EARLIER)responses in edge cases thanks to Andrea. - Find a mime message part by its content-ID with the
MimeMessage.getPartWithContentId(String cid)helper method. - List all parts of a mime message sequentially using the
MimeMessage.allPartsFlatgetter. - Fix problems with
UTF88-bit decoded answers. - Use the enough_serialization for JSON (de)serialization support.
- Improve discovery of mail settings.
- Allow to limit the download size of messages:
MailClient.fetchMessageContents(MimeMessage message, {int maxSize})fetches all parts apart from attachments when the message size is bigger than the one specified in bytes inmaxSize. - Improve documentation, also thanks to TheOneWithTheBraid.
0.0.33 #
- Support IMAP QUOTA Extension thanks to azulli.
- Throw exceptions that might occur while sending a message thanks to hpoul.
- Retrieve currently selected mailbox in highlevel API with
MailClient.selectedMailbox. - Specify
fetchPreferencein highlevel API when fetching messages, for example to only fetchENVELOPEs first. - Create a message builder based on a mailto link with
MessageBuilder.prepareMailtoBasedMessage(). - Mail events now contain the originating ImapClient, SmtpClient or MailClient instance to match the event when having several active accounts at the same time.
- Support the SMTP
AUTH LOGINauthentication by specying theauthMechanismparameter inSmtpClient.login(). - Ease flagging of messages with
MailClient.flagMessage(). - Highlevel API now udates flags of a message correctly when they have changed remotely.
0.0.32 #
- easier to retrieve and set common message flags such as
\Seen,\Answeredand$Forwarded - use
MimeMessage.isSeen,.isAnswered,.isForwardedto query the corresponding flags - use
MimeMessage.hasAttachments()orMimeMessage.hasAttachmentsOrInlineNonTextualParts()to determine if the message contains attachment parts. - Q-Encoding is used for encoding/decoding corresponding MIME message headers now, compare #77 for details
0.0.31 #
- Mime: List all message parts with a specfic Content-Disposition with
MimeMessage.findContentInfo(ContenDisposition disposition). - Mime: Retrieve an individual message part with
MimeMessage.getPart(String fetchId) - Bugfix: fetch individual message parts via IMAP with
BODY[1.2]now works. - MailClient: Download individual message parts with
MailClient.fetchMessagePart(MimeMessage message, String fetchId). - MailClient: events now provide reference to used
MailClientinstance, so that apps can differentiate between accounts. - MessageBuilder: allow to specify user aliases and to handle + aliases and to differentiate between reply and reply-all in
MessageBuilder.prepareReplyToMessage() - ImapClient: Ensure that every Inbox has a
MailboxFlag.inbox.
0.0.30 #
- Thanks to hpoul the XML library now works with both beta and stable flutter channels.
- Thanks to hydeparkk encoded mailbox paths are now used in copy, move, status and append/
- Fix decoding message date headers
- Fix handling mailboxes with a space in their path
- Allow to easly serialize and deserialize MailAccount to/from JSON.
- Extended high level MailClient API:
- Allow to select mailbox by path
- Disconnect to close connections
- Include fetching message flags when fetching messages
- Allow to store message flags, e.g. mark as read
- Provide access to low level API from within the high level API
0.0.29 #
- Add
discconect()method to high levelMailClientAPI - Encode and decode mailbox names using Modified UTF7 encoding
- Add IMAP support for UTF-8
0.0.28 #
- High level
MailClientAPI supports IMAP IDLE, POP and SMTP.
0.0.27 #
- Downgraded crypto dependency to be compatible with flutter_test ons stable flutter channel again
0.0.26 #
- Added high level
MailClientAPI - Downgraded XML dependency to be compatible with flutter_test again
- Fixed
ImapClient'seventBusregistration when this is specified outside of ImapClient.
0.0.25 #
- Add support to discover email settings using the
Discoverclass.
0.0.24 #
- Improve parsing of IMAP
BODYSTRUCTUREresponses to FETCH commands. - Add message media types.
0.0.22 #
- Breaking API change: use FETCH IMAP methods now return
FetchImapResultinstead ofList<MimeMessage> - Breaking API change:
ImapFetchEventnow contains a fullMimeMessageinstead of just the sequence ID and flags - Added
ImapVanishedEventthat is called instead ofImapExpungeEventwhen QRESYNC has been enabled - Added support for QRESYNC extension
- Added support for ENABLE extension
- Fix handling STATUS responses (issue #56)
0.0.21 #
- Added support for ISO 8859-15 / latin9 encoding - based on UTF-8
0.0.20 #
- Breaking change: use
MessageSequencefor defining message ID or UID ranges instead of integer-based IDs
0.0.19 #
- Fix for fetching recent messages when the chunksize is larger than the existing messages - thanks to studiozocaro!
0.0.18 #
- Breaking API changes:
MimeMessage.bodyAPI, get and set text/plain and text/html parts in MimeMessage - Support nested BODY and BODYSTRUCTURE responeses when fetching message data
- Support CONDSTORE IMAP extension
- Support MOVE IMAP extension
- Support UIDPLUS IMAP extension
0.0.17 #
- Supports parsing BODYSTRUCTURE responses when fetching message data
- Also eased API for accessing BODY and BODYSTRUCTURE response data
0.0.16 #
- Adding 'name' parameter with quotes to 'Content-Type' header when adding a file
0.0.15 #
- Adding 'name' parameter to 'Content-Type' header when adding a file
0.0.14 #
- Save messages to the server with
ImapClient.appendMessage(). - Store message flags using the
ImapClient.store()method or use one of the mark-methods likemarkFlagged()ormarkSeen(). - Copy message(s) using
ImapClient.copy(). - Copy, fetch, store or search message with UIDs using
ImapClient.uidCopy(),uidStore(), etc. - Remove messages marked with the \Deleted flag using
ImapClient.expunge() - Authenticate via OAUTH 2.0 using
ImapClient.authenticateWithOAuth2()(AUTH=XOAUTH2) orauthenticateWithOAuthBearer()(AUTH=OAUTHBEARER). - You can now switch to TLS using
ImapClient.startTls(). - Query the capabilities using the
ImapClient.capability()call. - Let the server do some housekeeping using the
ImapClient.check()method.
0.0.13 #
- Forward complex messages with
MessageBuilder.prepareForwardMessage(), too (issue #24)
0.0.12 #
- Forward messages with
MessageBuilder.prepareForwardMessage()
0.0.11 #
- Adding simple reply generation with
MessageBuilder.prepareReplyToMessage()(issue #25) - Improvement for adding larger files (issue #28)
0.0.10 #
- Fix for message sending via SMTP (issue #27)
0.0.9 #
- Introducing MessageBuilder for easy mime message creation
- Adapted example
0.0.8 #
- Ease access to text contents of a mime message
- Adapted example
0.0.7 #
- Parse MIME messages using MimeMessage.parse()
- Handle content encodings more reliably
0.0.6 #
- Supporting ASCII character character encodings and padding BASE64 headers if required
0.0.5 #
- Addressed health and syntax recommendations
0.0.4 #
- Support IMAP METADATA Extension
0.0.3 #
- Always end lines with
\r\nwhen communicating either with SMTP or IMAP server, parse iso-8859-1 encoded headers
0.0.2 #
- Cleaning architecture, adding support for
BODY[HEADER.FIELDS]messages
0.0.1 #
- Initial alpha version