- Sending emails with attachments or embedded image using Amazon's AWS SES API & .NET.
To send an email with AWS services, there are two options, either connecting directly to the AWS SMTP server with SMTP protocols, but then you have to open SMTP ports (587 or 25 usually). Otherwise you can use the AWS API which are bunch of REST API services that you can call them over HTTPS.
AWS SES API has two options to send emails as described in the documentation:
Send simple formatted email:
which will make your life easy, but you are limited to send only text messages.
Send raw email in order to send an embedded image or more complicated content.
In order to send raw email with embedded images, you can just find some code on stackoverflow, but I will try in this post to describe what is going on, and how raw email works, so you can understand the process in details.
read more ...Everything you need to know about Date-Time in Asp.NET & JSON.
Date-Time data type is a complex issue. Complex enough to make you confuse overtime you are writing code that return dates from the web server to the browser.
ASP.NET MVC 5 and Web API 2 serialize dates differently, which might create more confusion for developers who are using both serializations in one web application.
I am trying to cover everything you need to know about Date and Date serialization to JSON, in ASP.NET, and what issues are related to them.
read more ...The advantages of IHttpActionResult in Web API 2.
Web API 2 introduced the new interface IHttpActionResult to return back REST responses, where Web API 1 was using the class HttpResponseMessage to represent HTTP response, and HTTPResponseException to represent HTTP response error.
IHttpActionResult allows developers to enhance their Web API 1 code to be :
- More testable.
- More reusable.
- Cleaner, and more elegant.
We are going to unleash the potential of this interface and see some creative ideas on how to use it.
read more ...Consuming a HttpClient from a web pageCall WCF Post REST Service from FiddlerLet's try to call a post REST WCF service from Fiddler. Starting from the WCF Service definition
read more ...