Karl Gjertsen

Architect, Developer, Speaker, Bad Golfer,
Raygun brand ambassador and creator of Infiniforms

Unit testing email code with Mail4Net

When it comes to unit testing your code, Mail4Net provides a great way to test your email sending code. In my previous article, I showed sending an email with Mail4Net. If you are new to Mail4Net, then I would suggest you start with this article. Using the fake client The fake client stores emails that have been sent and they…

Sending an email with Mail4Net

Mail4Net is a .NET library for creating, managing and sending emails. Sending an email Typically, you create a MailMessage class, populate it and then send it to a SMTP server, using Microsoft’s System.Net.Mail.SmtpClient class: private void SendEmail() { // Create mail message. var message = new System.Net.Mail.MailMessage(); message.To.Add(“someone@mydomain.com”); message.From = new MailAddress(“me@mydomain.com”); message.Subject = “Hello World”; message.Body = “Here is…

Mail4Net

I have recently been working on Mail4Net, a very interesting piece of software for .NET developers. It includes software to create and manage email templates and a .NET class library for creating email messages from saved templates, populating data into the templates and then sending the populated email. You can also choose to save the email to a folder or…

Entity Framework Error 0019

Having deployed a new website to Microsoft Azure, I got an error: Schema specified is not valid. Errors: SqlDatabase.csdl(3,4) : error 0019: The EntityContainer name must be unique. An EntityContainer with the name ‘xxxxxxxxxxx’ is already defined. After some digging around, I found the error is a result of having multiple edmx files using the same container name. This seems…