Giter VIP home page Giter VIP logo

simplemail's Introduction

SimpleMail

.NET Publish

SimpleMail is a C# library designed to simplify sending emails. It provides a convenient and straightforward interface for sending email messages.

Features

  • Easy-to-use API for sending emails and attachments
  • Compatible with .NET 6 and above

Installation

SimpleMail can be easily installed via NuGet:

dotnet add package SimpleMail

Alternatively, you can search for "SimpleMail" in the NuGet Package Manager UI and install it from there.

Getting Started

To use SimpleMail in your project, follow these simple steps:

  1. Add a reference to the SimpleMail namespace in your code file:
    using SimpleMail;
  1. Create an instance of the EmailMessage class:
    // Create a new email
    Email email = new Email
    {
        // Email address to send the email from
        From = "[email protected]",
        // Email address to send the email to
        To = "[email protected]",
        // Subject of the email
        Subject = "Example Subject",
        // Body of the email
        Body = "Example Body",
        // Password of the email account
        Password = "password",
        // Email server to send the email
        Server = "smtp.example.com",
        // Username of the email account
        UserName = "username",
        // Port of the email server (default is 25)
        Port = 587,
        // Use SSL to encrypt the connection
        UseSSL = true,
        // Priority of the email
        Priority = MimeKit.MessagePriority.Urgent
    };
  1. Send the email:
await email.SendAsync().ConfigureAwait(false);

That's it! You have successfully sent an email using SimpleMail.

Compatibility

SimpleMail is compatible with .NET 6 and above.

Contributing

We welcome contributions to SimpleMail! If you encounter any issues, have suggestions for improvements, or would like to contribute new features, please feel free to submit a pull request.

License

SimpleMail is released under the Apache 2 License.

simplemail's People

Contributors

dependabot[bot] avatar jacraig avatar jcwm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

simplemail's Issues

Add Message Formatters

Add the ability to do something like Razor based formatting for emails. Basically a template system.

Add LinkedResources

Like attachments, not sure if you can send them with MailKit. If it is, add it.

Add Attachments

No idea how to do this with MailKit at the moment. But add it if it's in there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.