Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

E-mail message parser

License

NotificationsYou must be signed in to change notification settings

janestreet/email_message

Repository files navigation

email_message is a library that defines types that represent an RFC2822 email.

Parsing an email

You can useEmail.of_string to parse an email (e.g. from a ".eml" file).

Once you have your hands on anEmail.t, you can use various functions in theEmail.Simple andEmail modules to inspect parts of the email. For example:

  • Email.Simple.subject : the subject of the email
  • Email.Simple.from : the From header sender of the email
  • Email.headers : all the email headers
  • Email.Simple.all_attachments the email attachments

Constructing an email

TheEmail.Simple module exposes various functions for constructing an email. For example:

Email.Simple.create~from:(Email_address.of_string"sender@example.com")~to_:[ (Email_address.of_string"recipient@example.com") ]~subject:"Example email"  (Email.Simple.Content.text_utf8"This is an example email.")

About

E-mail message parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp