Send sprout email programmatically
At the most simple level, if you have a Notification Email configured with the event 'None', you can do the following:

$mailer = SproutBaseEmail::$app-&gt;mailers-&gt;getMailerByName(DefaultMailer::class);
$notificationEmail = Craft::$app-&gt;elements-&gt;getElementById(123);
$mailer-&gt;sendNotificationEmail($notificationEmail);


If you have an Event selected other than 'None' or want to use any Personalization in your email, you may need to also configure the notification to have the Event Object.

Let's say, your Notification Email body needs to use the person's name:

Hello {firstName}

OR

Hello {{ object.firstName }}


In that case, you can use the setEventObject method to set any variables you need available in your Email Template:

$mailer = SproutBaseEmail::$app-&gt;mailers-&gt;getMailerByName(DefaultMailer::class);
$notificationEmail = Craft::$app-&gt;elements-&gt;getElementById(123);
$notificationEmail-&gt;setEventObject([
  'firstName' =&gt; 'Mr. Smithyyy'
]);
$mailer-&gt;sendNotificationEmail($notificationEmail);