GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — FluentEmail/src/Senders/FluentEmail.Mailgun at master · hdl217/FluentEmail

Expand file tree

/

FluentEmail.Mailgun

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

FluentEmail.Mailgun

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
HttpHelpers
HttpHelpers
 
 
FluentEmail.Mailgun.csproj
FluentEmail.Mailgun.csproj
 
 
FluentEmailMailgunBuilderExtensions.cs
FluentEmailMailgunBuilderExtensions.cs
 
 
MailGunRegion.cs
MailGunRegion.cs
 
 
MailgunResponse.cs
MailgunResponse.cs
 
 
MailgunSender.cs
MailgunSender.cs
 
 
README.md
README.md
 
 

README.md

Outline

Fluent Email - MailGun

Send email via the MailGun REST API.

Packages

FluentEmail.Mailgun

Usage

Create a new instance of your sender and add it as the default Fluent Email sender.

var sender = new MailgunSender(
	"sandboxcf5f41bbf2f84f15a386c60e253b5fe9.mailgun.org", // Mailgun Domain
	"key-8d32c046d7f14ada8d5ba8253e3e30de" // Mailgun API Key
);
Email.DefaultSender = sender;

/*
	You can optionally set the sender per instance like so:
	
	email.Sender = new MailgunSender(...);
*/

Send the email in the usual Fluent Email way.

var email = Email
    .From(fromEmail)
    .To(toEmail)
    .Subject(subject)
    .Body(body);

var response = await email.SendAsync();

Further Information

Don't forget you can use Razor templating using the FluentEmail.Razor package as well.

If you'd like to create your own sender for another service, check out the source code. All you need to do is implement the ISender interface :)

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.