62
--smtp-user <str> * Username for SMTP-AUTH.
63
--smtp-pass <str> * Password for SMTP-AUTH; not necessary.
64
--smtp-encryption <str> * tls or ssl; anything else disables.
65
- --smtp-ssl * Deprecated. Use '--smtp-encryption ssl'.
65
+ --smtp-ssl * Deprecated. Use `--smtp-encryption ssl`.
66
--smtp-ssl-cert-path <str> * Path to ca-certificates (either directory or file).
67
Pass an empty string to disable certificate
68
verification.
75
--smtp-debug <0|1> * Disable, enable Net::SMTP debug.
76
--imap-sent-folder <str> * IMAP folder where a copy of the emails should be sent.
77
Make sure `git imap-send` is set up to use this feature.
78
+ --[no-]use-imap-only * Only copy emails to the IMAP folder specified by
79
+ `--imap-sent-folder` instead of actually sending them.
80
81
--batch-size <int> * send max <int> message per connection.
82
--relogin-delay <int> * delay <int> seconds between two successive login.
298
my $target_xfer_encoding = 'auto';
299
my $forbid_sendmail_variables = 1;
300
my $outlook_id_fix = 'auto';
301
+my $use_imap_only = 0;
302
303
my %config_bool_settings = (
304
"thread" => \$thread,
315
"forbidsendmailvariables" => \$forbid_sendmail_variables,
316
"mailmap" => \$mailmap,
317
"outlookidfix" => \$outlook_id_fix,
318
+ "useimaponly" => \$use_imap_only,
319
);
320
321
my %config_settings = (
536
"smtp-auth=s" => \$smtp_auth,
537
"no-smtp-auth" => sub {$smtp_auth = 'none'},
538
"imap-sent-folder=s" => \$imap_sent_folder,
539
+ "use-imap-only!" => \$use_imap_only,
540
"annotate!" => \$annotate,
541
"compose" => \$compose,
542
"quiet" => \$quiet,
1688
1689
if ($dry_run) {
1690
# We don't want to send the email.
1691
+ } elsif ($use_imap_only) {
1692
+ die __("The destination IMAP folder is not properly defined.") if !defined $imap_sent_folder;
1693
} elsif (defined $sendmail_cmd || file_name_is_absolute($smtp_server)) {
1694
my $pid = open my $sm, '|-';
1695
defined $pid or die $!;