From f25286a60b8ad26994c5c88c60b7c0ec998ae803 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 26 Jan 2016 18:12:37 +0000 Subject: first commit, it works already --- t/send.t | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 t/send.t (limited to 't') diff --git a/t/send.t b/t/send.t new file mode 100644 index 0000000..69d21a8 --- /dev/null +++ b/t/send.t @@ -0,0 +1,29 @@ +#!perl +use strict; +use warnings; +use Test::More; +use Config::ClawsMail; +use Email::Sender::Simple qw(sendmail); +use Email::Simple; +use Email::Simple::Creator; + +my $claws = Config::ClawsMail->new(); +my $account = $claws->accounts->{BB}; +my $address = sprintf q{%s <%s>}, + $account->name, $account->address; + +my $email = Email::Simple->create( + header => [ + To => $address, + From => $address, + Subject => 'config::claws-mail test', + ], + body => "test for Config::ClawsMail\n", +); +ok( + sendmail($email, {transport => $account->email_transport}), + 'sending should work', +); + +done_testing; + -- cgit v1.2.3