generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDefaultSendGridConfigurationProvider.cs
42 lines (33 loc) · 1.35 KB
/
DefaultSendGridConfigurationProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using CMS;
using CMS.Core;
using Kentico.Xperience.Twilio.SendGrid.Services;
using SendGrid.Helpers.Mail;
[assembly: RegisterImplementation(typeof(ISendGridConfigurationProvider), typeof(DefaultSendGridConfigurationProvider), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.SystemDefault)]
namespace Kentico.Xperience.Twilio.SendGrid.Services
{
/// <summary>
/// Default implementation of <see cref="ISendGridConfigurationProvider"/> which doesn't set any custom mail
/// or tracking settings.
/// </summary>
public class DefaultSendGridConfigurationProvider : ISendGridConfigurationProvider
{
/// <summary>
/// Initializes a new instance of the <see cref="DefaultSendGridConfigurationProvider"/> class.
/// </summary>
public DefaultSendGridConfigurationProvider()
{
}
public void SetIpPoolName(string siteName, SendGridMessage sendGridMessage)
{
// Don't set IP Pool name by default
}
public void SetMailSettings(string siteName, SendGridMessage sendGridMessage)
{
sendGridMessage.MailSettings = new MailSettings();
}
public void SetTrackingSettings(string siteName, SendGridMessage sendGridMessage)
{
sendGridMessage.TrackingSettings = new TrackingSettings();
}
}
}