Sample code for 30+ languages & platforms
Dart

Load MIME Object from Email Object

See more Email Object Examples

Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  final email = CkEmail();
  email.loadEml('qa_data/eml/sample.eml');

  // Write the full MIME of the email to a StringBuilder.
  final sbMime = CkStringBuilder();
  email.getMimeSb(sbMime);

  // Load the MIME object from the StringBuilder
  final mime = CkMime();
  mime.loadMimeSb(sbMime);

  print(mime.getMime());
}