{"id":20258801,"url":"https://github.com/skymethod/mimetext","last_synced_at":"2026-06-07T17:32:49.783Z","repository":{"id":221442173,"uuid":"754386255","full_name":"skymethod/mimetext","owner":"skymethod","description":"Raw email generator, port of https://github.com/muratgozel/MIMEText","archived":false,"fork":false,"pushed_at":"2024-02-08T01:35:19.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T04:09:51.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skymethod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-07T23:58:41.000Z","updated_at":"2024-02-08T00:29:34.000Z","dependencies_parsed_at":"2024-02-08T01:29:59.612Z","dependency_job_id":"7a818632-a9b1-4bd1-ad85-b079c806d2ff","html_url":"https://github.com/skymethod/mimetext","commit_stats":null,"previous_names":["skymethod/mimetext"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skymethod%2Fmimetext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skymethod%2Fmimetext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skymethod%2Fmimetext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skymethod%2Fmimetext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skymethod","download_url":"https://codeload.github.com/skymethod/mimetext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241718168,"owners_count":20008520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T11:11:41.927Z","updated_at":"2025-03-03T18:32:17.119Z","avatar_url":"https://github.com/skymethod.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mimetext\nRaw email generator, port of https://github.com/muratgozel/MIMEText\n\nUseful when working with [Amazon SES](https://aws.amazon.com/ses/), [Google Gmail](https://developers.google.com/gmail/api/guides) or [Cloudflare Email Workers](https://developers.cloudflare.com/email-routing/email-workers/send-email-workers/).\n\n### Usage\n\n```ts\nimport { createMimeMessage } from 'jsr:@skymethod/mimetext';\n\nconst msg = createMimeMessage();\nmsg.setSender({ name: 'Example Sender', addr: 'from@example.com' });\nmsg.setRecipient('to@example.com');\nmsg.setSubject('🚀 Hello world!');\nmsg.addMessage({ contentType: 'text/plain', data: `Hi,\\nThis is a simple text message.` });\n\nconst raw = msg.asRaw();\n```\n\n### Usage (more complex)\n\n```ts\nimport { createMimeMessage } from 'jsr:@skymethod/mimetext';\n\nconst msg = createMimeMessage();\nmsg.setSender('from@example.com');\nmsg.setRecipient('Firstname Lastname \u003cfirst@example.com\u003e'); // 'To' field by default\nmsg.setRecipient('Firstname Lastname \u003csecond@example.com\u003e', { type: 'Cc' }); // To, Cc, Bcc\nmsg.setRecipient({ addr: 'third@example.com', name: 'Firstname Lastname', type: 'Bcc' });\nmsg.setSubject('Testing 🐬 (Text/HTML/Mixed attachments)');\n\n// support both plain-text and html\nmsg.addMessage({\n    contentType: 'text/plain',\n    data: 'Hello there,\\n\\nThis is a the text part!',\n});\nmsg.addMessage({\n    contentType: 'text/html',\n    data: 'Hello there,\u003cbr\u003e\u003cbr\u003e' +\n        'This is the \u003cb\u003ehtml part\u003c/b\u003e.\u003cbr\u003e\u003cbr\u003e' +\n        'The term \\'html part\\' above should be bold.\u003cbr\u003e\u003cbr\u003e' +\n        'Below, there should be a small image:\u003cbr\u003e\u003cbr\u003e' +\n        '\u003cimg src=\"cid:dots123456\"\u003e', // specify inline attachment's content id (declared below)\n});\n\n// attachments\nmsg.addAttachment({\n    filename: 'sample.jpg',\n    contentType: 'image/jpg',\n    data: '...base64 encoded data...',\n});\nmsg.addAttachment({\n    filename: 'sample.txt',\n    contentType: 'text/plain',\n    data: '...base64 encoded data...',\n});\nmsg.addAttachment({\n    inline: true, // this is inline attachment!\n    filename: 'dots.jpg',\n    contentType: 'image/jpg',\n    data: '...base64 encoded data...',\n    headers: { 'Content-ID': 'dots123456' }, // referenced in html part\n});\n\nconst raw = msg.asRaw();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskymethod%2Fmimetext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskymethod%2Fmimetext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskymethod%2Fmimetext/lists"}