Attachment class abstract

Represents a single email attachment.

You may specify a File, a Stream or just a String of data. cid allows you to specify the content id for html inlining.

When location is set to Location.inline The attachment (usually image) can be referenced using: cid:yourCid. For instance: <img src="cid:yourCid" />

cid must contain an @ and be inside < and >. The cid: <myImage@3.141> can then be referenced inside your html as: <img src="cid:myImage@3.141">

Implementers

Constructors

Attachment()

Properties

additionalHeaders Map<String, String>
Additional headers that will be added to the attachment after all of the standard headers are set. This is useful for adding, for example, "X-Attachment-Id" to an attachment, which is used by gmail when referencing an image in <img src="cid:...">.
final
cid String?
getter/setter pair
contentType String
getter/setter pair
fileName String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
location Location
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

asStream() Stream<List<int>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited