RSS Git Download  Clone
Raw Blame History
# email-to-sms via ClickSend:

# configure Email SMS Settings;
# https://dashboard.clicksend.com/#/sms/settings/email-sms
# * Get message from email subject only
# * Get message from email body only

use Email::Stuffer;
use Try::Tiny;

my $sender = 'ra.jones@dpw.clara.co.uk';
my $domain = 'sms.clicksend.com';
my $mobile = '07854951815';

my $recipient = join '@', $mobile, $domain;
my $message   = 'test email-to-sms message';

my $email = Email::Stuffer
    ->to($recipient)
    ->from($sender)
    ->subject($message)
    ->text_body($message);

try {
    $email->send;
}
catch {
    warn 'Email not sent: ' . $_;
};