Created
May 1, 2019 00:07
-
-
Save gdm/afabb38144d406b5097100d77a9787dc to your computer and use it in GitHub Desktop.
test SMTP perl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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