{"id":18937476,"url":"https://github.com/verifytests/verify.mailmessage","last_synced_at":"2025-10-13T09:13:37.069Z","repository":{"id":149314657,"uuid":"621584178","full_name":"VerifyTests/Verify.MailMessage","owner":"VerifyTests","description":"Extends Verify to allow verification of MailMessage and related types.","archived":false,"fork":false,"pushed_at":"2025-10-07T08:47:00.000Z","size":388,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-07T09:37:23.968Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","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/VerifyTests.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":"code_of_conduct.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"VerifyTests"}},"created_at":"2023-03-31T00:53:12.000Z","updated_at":"2025-10-07T08:47:04.000Z","dependencies_parsed_at":"2023-12-18T07:31:14.937Z","dependency_job_id":"6813972f-c881-46f5-861c-aa9c24ffa28f","html_url":"https://github.com/VerifyTests/Verify.MailMessage","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/VerifyTests/Verify.MailMessage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.MailMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.MailMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.MailMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.MailMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerifyTests","download_url":"https://codeload.github.com/VerifyTests/Verify.MailMessage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.MailMessage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010665,"owners_count":26084785,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08T12:11:19.438Z","updated_at":"2025-10-13T09:13:37.063Z","avatar_url":"https://github.com/VerifyTests.png","language":"C#","funding_links":["https://github.com/sponsors/VerifyTests"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"/src/icon.png\" height=\"30px\"\u003e Verify.MailMessage\n\n[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true\u0026label=)](https://github.com/orgs/VerifyTests/discussions)\n[![Build status](https://ci.appveyor.com/api/projects/status/cpmnux3i0euge195?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-mailmessage)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.MailMessage.svg)](https://www.nuget.org/packages/Verify.MailMessage/)\n\nExtends [Verify](https://github.com/VerifyTests/Verify) to allow verification of [MailMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.mail.mailmessage) and related types.\u003c!-- singleLineInclude: intro. path: /docs/intro.include.md --\u003e\n\n**See [Milestones](../../milestones?state=closed) for release notes.**\n\n\n## Sponsors\n\n\n### Entity Framework Extensions\u003c!-- include: zzz. path: /docs/zzz.include.md --\u003e\n\n[Entity Framework Extensions](https://entityframework-extensions.net/?utm_source=simoncropp\u0026utm_medium=Verify.MailMessage) is a major sponsor and is proud to contribute to the development this project.\n\n[![Entity Framework Extensions](https://raw.githubusercontent.com/VerifyTests/Verify.MailMessage/refs/heads/main/docs/zzz.png)](https://entityframework-extensions.net/?utm_source=simoncropp\u0026utm_medium=Verify.MailMessage)\u003c!-- endInclude --\u003e\n\n\n## NuGet\n\n * https://nuget.org/packages/Verify.MailMessage\n\n\n## Usage\n\n\u003c!-- snippet: Enable --\u003e\n\u003ca id='snippet-Enable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void Initialize() =\u003e\n    VerifyMailMessage.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Enable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### ContentDisposition\n\n\u003c!-- snippet: ContentDisposition --\u003e\n\u003ca id='snippet-ContentDisposition'\u003e\u003c/a\u003e\n```cs\n[Fact]\npublic Task ContentDisposition()\n{\n    var content = new ContentDisposition(\"attachment; filename=\\\"filename.jpg\\\"\");\n    return Verify(content);\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L3-L12' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ContentDisposition' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in: \n\n\u003c!-- snippet: Tests.ContentDisposition.verified.txt --\u003e\n\u003ca id='snippet-Tests.ContentDisposition.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  DispositionType: attachment,\n  FileName: filename.jpg\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.ContentDisposition.verified.txt#L1-L4' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.ContentDisposition.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### ContentType\n\n\u003c!-- snippet: ContentType --\u003e\n\u003ca id='snippet-ContentType'\u003e\u003c/a\u003e\n```cs\n[Fact]\npublic Task ContentType()\n{\n    var content = new ContentType(\"text/html; charset=utf-8\")\n    {\n        Name = \"name.txt\"\n    };\n    return Verify(content);\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L36-L48' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ContentType' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in: \n\n\u003c!-- snippet: Tests.ContentType.verified.txt --\u003e\n\u003ca id='snippet-Tests.ContentType.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  MediaType: text/html,\n  Name: name.txt,\n  CharSet: utf-8\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.ContentType.verified.txt#L1-L5' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.ContentType.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Attachment\n\n\u003c!-- snippet: Attachment --\u003e\n\u003ca id='snippet-Attachment'\u003e\u003c/a\u003e\n```cs\n[Fact]\npublic Task Attachment()\n{\n    var attachment = new Attachment(\n        new MemoryStream(\"file content\"u8.ToArray()),\n        new ContentType(\"text/html; charset=utf-8\"))\n    {\n        Name = \"name.txt\"\n    };\n    return Verify(attachment);\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L67-L81' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Attachment' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in: \n\n\u003c!-- snippet: Tests.Attachment.verified.txt --\u003e\n\u003ca id='snippet-Tests.Attachment.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  Name: name.txt,\n  ContentType: {\n    MediaType: text/html,\n    Name: name.txt,\n    CharSet: utf-8\n  },\n  ContentId: Guid_1,\n  ContentDisposition: {\n    DispositionType: attachment\n  }\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.Attachment.verified.txt#L1-L12' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.Attachment.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### MailMessage\n\n\u003c!-- snippet: MailMessage --\u003e\n\u003ca id='snippet-MailMessage'\u003e\u003c/a\u003e\n```cs\n[Fact]\npublic Task MailMessage()\n{\n    var mail = new MailMessage(\n        from: \"from@mail.com\",\n        to: \"to@mail.com\",\n        subject: \"The subject\",\n        body: \"The body\");\n    return Verify(mail);\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L188-L201' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-MailMessage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nResults in: \n\n\u003c!-- snippet: Tests.MailMessage.verified.txt --\u003e\n\u003ca id='snippet-Tests.MailMessage.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  From: from@mail.com,\n  To: to@mail.com,\n  Subject: The subject,\n  IsBodyHtml: false,\n  Body: The body\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.MailMessage.verified.txt#L1-L7' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.MailMessage.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Icon\n\n[Mail](https://thenounproject.com/icon/mail-5633084/)  from [The Noun Project](https://thenounproject.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.mailmessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverifytests%2Fverify.mailmessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.mailmessage/lists"}