Comments (1)
搞定了,不懂的兄弟也可以看看场景是否跟我一样。
之前的问题出现的场景是别人给我发的邮件中,带着图文和附件之类的,附件和图文里面的内容不是同一个获取方式,需要根据cid去一一匹配才能下载。 那么在回复消息的时候就很尴尬了,之前能想到的是直接根据下载好的文件转成base64数据贴到原文中img:cid:***。但这种方式很不好,一旦涉及到原文的转发给别人,数据量会很大。 后面我看了一下这个框架中已经close的问题找到了一个差不多的,自己生成cid然后发送。那么问题就简单了,直接复制代码,如下↓:
PartBuilder partBuilder = await builder.addFile(file, mediaType, disposition: ContentDispositionHeader.from(ContentDisposition.inline)); partBuilder.addHeader('Content-Id', cid);
直接把先前原文中的cid带过去就好,不需要自己生成,里面的头信息需要稍微改一下,不然会默认为附件形式。
from enough_mail.
Related Issues (20)
- Enough Mail with 2FA Accounts HOT 1
- need
- TLS Certificates for connections to IMAP + SMTP
- Unknown feature REQUESTED_WITH_HEADER_CONTROLE HOT 1
- limited number of text in message? HOT 1
- Please, can you update INTL version in Pub.dev? HOT 1
- Decoding header error
- Error: A value of type 'List<int>' can't be assigned to a variable of type 'Uint8List'. HOT 5
- MailClient.listMailboxesAsTree() with a non default pathSeparator HOT 1
- cannot delete message with high level API HOT 11
- BUG: in serialization of ServerConfig.fromJson() HOT 1
- continuation not handled:
- Getting an app to production
- Error: A value of type 'List<int>' can't be assigned to a variable of type 'Uint8List'. HOT 1
- statusMailbox is always returns messagesUnseen = 0 HOT 1
- On search with "before" param: BAD Command Argument Error. 11
- paginate message fetching in `fetchRecentMessages`
- Question: Why is the UIDSEARCH only allowed if the server supports UIDPLUS capability?
- Why can't I idle and make requests at the same time?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enough_mail.