Drupal 8 Commerce 2 Trigger custom mail to product author We can get the uid for purchased product after checkout using Event Subscriber. 

How to sent mail to product author with product details when someone checkout the product. We can get all the details in $order.
This is described in the Commerce 2 documentation:


  In our case we want to send the email after the transition to the
  Fulfillment state has occurred. We therefore need to create an event
  subscriber that listens to the commerce_order.fulfill.post_transition
  event.


// my_module/src/EventSubscriber/OrderFulfillmentSubscriber.php

    namespace Drupal\my_module\EventSubscriber;

    use Drupal\state_machine\Event\WorkflowTransitionEvent;
    use Drupal\Core\Language\LanguageManagerInterface;
    use Drupal\Core\Mail\MailManagerInterface;
    use Drupal\Core\StringTranslation\StringTranslationTrait;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;

    /**
     * Sends an email when the order transitions to Fulfillment.
     */
    class OrderFulfillmentSubscriber implements EventSubscriberInterface {

      use StringTranslationTrait;

      /**
       * The language manager.
       *
       * @var \Drupal\Core\Language\LanguageManagerInterface
       */
      protected $languageManager;

      /**
       * The mail manager.
       *
       * @var \Drupal\Core\Mail\MailManagerInterface
       */
      protected $mailManager;

      /**
       * Constructs a new OrderFulfillmentSubscriber object.
       *
       * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
       *   The language manager.
       * @param \Drupal\Core\Mail\MailManagerInterface $mail_manager
       *   The mail manager.
       */
      public function __construct(
        LanguageManagerInterface $language_manager,
        MailManagerInterface $mail_manager
      ) {
        $this-&gt;languageManager = $language_manager;
        $this-&gt;mailManager = $mail_manager;
      }

      /**
       * {@inheritdoc}
       */
      public static function getSubscribedEvents() {
        $events = [
          'commerce_order.fulfill.post_transition' =&gt; ['sendEmail', -100],
        ];
        return $events;
      }

      /**
       * Sends the email.
       *
       * @param \Drupal\state_machine\Event\WorkflowTransitionEvent $event
       *   The transition event.
       */
      public function sendEmail(WorkflowTransitionEvent $event) {
        // Create the email.
        $order = $event-&gt;getEntity();
        $to = $order-&gt;getEmail();
        $params = [
          'from' =&gt; $order-&gt;getStore()-&gt;getEmail(),
          'subject' =&gt; $this-&gt;t(
            'Regarding your order [#@number]',
            ['@number' =&gt; $order-&gt;getOrderNumber()]
          ),
          'body' =&gt; $this-&gt;t(
            'Your order with #@number that you have placed with us has been processed and is awaiting fulfillment.',
            ['@number' =&gt; $order-&gt;getOrderNumber()]
          ),
        ];

        // Set the language that will be used in translations.
        if ($customer = $order-&gt;getCustomer()) {
          $langcode = $customer-&gt;getPreferredLangcode();
        }
        else {
          $langcode = $this-&gt;languageManager-&gt;getDefaultLanguage()-&gt;getId();
        }

        // Send the email.
        $this-&gt;mailManager-&gt;mail('commerce_order', 'receipt', $to, $langcode, $params);
      }

    }