Email sender profiles

The profiles in the Notification service contain the specific configuration for the sending channel. Each profile must have a name and a type that is/are defined by the ISenderProfile interface. In the case of SMTP profile type, each profile contains the settings for the SMTP server.

SmtpSenderProfileProxy implements ISenderProfile interface and can be used as a parameter, where the interface is specified.

Create a new SMTP sender profile that you can use later during the messaging

One way to create a sender profile is to use the API and create it from code. You can do this using the following code sample:

Another way to create a sender profile is to register the new profile directly in the configuration file, using the following code:

Specify the profile used when creating a message job

The following sample demonstrates how to specify the default smtp profile when creating a message job:
For more information, see For developers: Email message jobs.

Get a sender profile using the NotificationService API.

The example below will show you how to get the default sender profile:

Get a collection of all profiles using the NotificationService API

The example below will show you how to get a collection of all profiles:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?

Next article

Email subscribers