From 4c1753265300cb08757bef458b9a8e1c52c5f12d Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Wed, 9 Sep 2026 11:23:39 +1000 Subject: [PATCH] Add old welcome email --- lib/Lacuna/Mailer.pm | 2 ++ lib/Lacuna/RPC/Empire.pm | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lib/Lacuna/Mailer.pm b/lib/Lacuna/Mailer.pm index fe55c453..5f1b90db 100644 --- a/lib/Lacuna/Mailer.pm +++ b/lib/Lacuna/Mailer.pm @@ -25,6 +25,8 @@ has api_key => ( sub send { my ($self, $to, $subject, $message) = @_; + return unless ($self->api_key); + my %form = ( from => $self->from, to => $to, diff --git a/lib/Lacuna/RPC/Empire.pm b/lib/Lacuna/RPC/Empire.pm index 9c8a038d..0adf57d9 100644 --- a/lib/Lacuna/RPC/Empire.pm +++ b/lib/Lacuna/RPC/Empire.pm @@ -367,6 +367,12 @@ sub create { # handle invitation $empire->attach_invite_code($account{invite_code}); + + # welcome email + $empire->send_email( + 'Welcome', + "Greetings ".$empire->name."!\n\nWelcome to The Lacuna Expanse. You are a very important member in our community, and we appreciate your patronage, feedback, and involvement.\n\nTLE Community\n".'natalie@thecommunity.com'."\nhttps://tlecommunity.com", + ); return $empire->id; } -- 2.51.2