Email

Send personal or bulk emails to your clients. Schedule them, plan to send by client time zone, and have different languages over each message you deliver.

Transactional Emails

Transactional emails are messages sent to customers or users responding to a specific action or event. These emails are triggered automatically based on a user's interactions with an online service or application, and they typically contain information that is relevant to the user's experience with the service. Some examples of transactional emails include confirmation emails, receipts, account updates, password reset instructions, and shipping notifications. These emails are often considered critical for maintaining good customer relationships and providing a high-quality user experience, as they provide essential information and keep users informed about the status of their transactions.

CodeMash Email Notifications service is accessible through the dashboard. You can also send emails through API or using CodeMash CLI.

To start using the Email service and its API methods, you first need to enable the email service in your CodeMash dashboard.

Features included in email service:

  1. Emails - sending emails to your users.

Using SDK

If you decide to use one of our provided SDK, the following code shows how to initialize email service.

var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
var apiKey = "{YOUR_SECRET_KEY}";

var client = new CodeMashClient(apiKey, projectId);
var emailService = new CodeMashEmailService(client);

Example

The following are examples of email notifications SDK using different languages and frameworks.

using System;
using CodeMash.Client;
using CodeMash.Notifications.Email.Services;
using Isidos.CodeMash.ServiceContracts;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            // 1. Get your Project ID and Secret Key
            var projectId = Guid.Parse("{YOUR_PROJECT_ID}");
            var apiKey = "{YOUR_SECRET_KEY}";

            // 2. Create a general client for API calls
            var client = new CodeMashClient(apiKey, projectId);
            
            // 3. Create a service object
            var emailService = new CodeMashEmailService(client);

            // 4. Call an API method
            var response = emailService.SendEmail(new SendEmailRequest
            {
                TemplateId = Guid.Parse("{TEMPLATE_ID}"),
                Emails = new [] { "test@email.com" }
            });
        }
    }
}

Working with Email Service

The following links explore the usage of email service:

Emails

Last updated