Skip to content

Instantly share code, notes, and snippets.

@gdm
Created May 1, 2019 00:07
Show Gist options
  • Select an option

  • Save gdm/afabb38144d406b5097100d77a9787dc to your computer and use it in GitHub Desktop.

Select an option

Save gdm/afabb38144d406b5097100d77a9787dc to your computer and use it in GitHub Desktop.
test SMTP perl
#!/usr/bin/perl
use strict;
use warnings;
# first, create your message
use Email::MIME;
my $message = Email::MIME->create(
header_str => [
From => 'sh...@test.com',
To => 'dm..@test.com',
CC => 'dav..@test.com',
Subject => 'test email with CC to D from new intance!',
],
attributes => {
encoding => 'quoted-printable',
charset => 'ISO-8859-1',
},
body_str => "This is a test email. \n BR\n Dmytro\n",
);
# send the message
use Email::Sender::Simple qw(sendmail);
sendmail($message);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment