PHPMailer exception on Heroku

Hi there, got this PHPMailer exception after deploying my project to Heroku. Locally everything is works. Website can be loaded, only after firing $kirby->email the exception comes :point_up_2:t2:

I am new to platforms like Heroku, was looking for something more “manageable” then shared hosting. Maybe Heruko is not ideal?

PHPMailer\PHPMailer\Exception: Could not instantiate mail function. in /app/vendor/phpmailer/phpmailer/src/PHPMailer.php:1720 Stack trace: #0 /app/vendor/phpmailer/phpmailer/src/PHPMailer.php(1518): PHPMailer\PHPMailer\PHPMailer->mailSend() #1 /app/vendor/phpmailer/phpmailer/src/PHPMailer.php(1352): PHPMailer\PHPMailer\PHPMailer->postSend() #2 /app/kirby/src/Email/PHPMailer 2.php(74): PHPMailer\PHPMailer\PHPMailer->send() #3 /app/kirby/src/Email/Email 2.php(41): Kirby\Email\PHPMailer->send() #4 /app/kirby/src/Cms/App 2.php(478): Kirby\Email\Email->__construct() #5 /app/site/snippets/registration.php(65): Kirby\Cms\App->email() #6 /app/kirby/src/Toolkit/Tpl 2.php(37): require('/app/site/snipp...') #7 /app/kirby/config/components.php(183): Kirby\Toolkit\Tpl::load() #8 /app/kirby/src/Cms/App 2.php(1271): Kirby\Cms\App->{closure}() #9 /app/kirby/config/helpers.php(699): Kirby\Cms\App->snippet() #10 /app/site/templates/default.php(5): snippet() #11 /app/kirby/src/Toolkit/Tpl 2.php(37): require('/app/site/templ...') #12 /app/kirby/src/Cms/Template.php(167): Kirby\Toolkit\Tpl::load() #13 /app/kirby/src/Cms/Page.php(1156): Kirby\Cms\Template->render() #14 /app/kirby/src/Cms/App 2.php(598): Kirby\Cms\Page->render() #15 /app/kirby/src/Cms/App 2.php(926): Kirby\Cms\App->io() #16 /app/index.php(5): Kirby\Cms\App->render() #17 {main}

I found this: https://devcenter.heroku.com/articles/smtp

But not familiar with Heroku…

Heroku supports sending emails only through add-ons and SMTP services. This means you will need to use some email service or your personal email as SMTP server (gmail, yahoo, hotmail etc.).
If you want to just test emails, use MailTrap addon. Setup is same like SMTP server, it will just give you nice dashboard to see sent emails in development stage.