FeedC# TutorialArchiveAbout

Send and Receive Emails in ASP.NET with C#

Send and Receive Emails in ASP.NET with C#

You’ve got along ASP.NET project ahead. You’re trying to wrap your head around all tasks at hand - infrastructure, business logic, admin panel, integrations. On top of that, there’s a long list of ‘could have’ type of features that the team would like to implement if time and resources allow.

One of them is adding the ability to send email in ASP.NET C# that you’ve been postponing for a while. After all, it’s such an obvious feature that might as well be left for the very end, when almost everything is up and running. Before your project goes live, you will need to validate your email workflows anyway and probably you don’t want to stay extra hours just before the launch to do so.

While sending emails with C# is not rocket science, we strongly recommend thinking about it sooner rather than later. To make it easier to start, we’ve covered the first steps with the various code samples. Let’s start!

Contents

Strategy Pattern C#

Strategy Pattern C#

Contents

What Is Strategy Pattern C# ?

The Strategy pattern in C# lets the algorithm vary independently from clients that use it.

There may be different algorithms (strategies) that apply to a given problem. If the algorithms are all kept in the client, messy code with lots of conditional statements will result.

Strategy pattern defines a family of algorithms, encapsulate each one, and make them interchangeable.

The Strategy pattern enables a client to choose which algorithm to use from a family of algorithms and gives it a simple way to access it.

Mediator Pattern C#

Mediator Pattern C#

Contents

What Is Mediator Pattern?

The Mediator pattern in C# enables objects to communicate, without knowing each other’s identities. It also encapsulates a protocol that objects can follow.

You can think of a Mediator object as a kind of a coordinator; that handles traffic between appropriate parties based on its own logic.

Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.