Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with use authenticated flow, tail_n_mail generates errors #40

Open
Johndeydier opened this issue May 15, 2023 · 0 comments
Open

with use authenticated flow, tail_n_mail generates errors #40

Johndeydier opened this issue May 15, 2023 · 0 comments

Comments

@Johndeydier
Copy link

following a switch to authenticated flow, tail_n_mail generated errors :
Failed to send mail (from): 5.7.3 STARTTLS is required to send mail

I modified the code to make it work again

1/ No SASL mechanism found
at /usr/share/perl5/vendor_perl/Authen/SASL.pm line 77.
at /usr/share/perl5/Net/SMTP.pm line 165.
=> SOLUTION / comment out the following lines
## Attempt to authenticate

if (not $smtp->auth($mailuser, $mailpass)) {

die 'Failed to authenticate to mail server: ' . $smtp->message;

}

2/ Failed to send mail (from): 5.7.3 STARTTLS is required to send mail
=> SOLUTION / add the following 2 lines
$smtp->starttls(); # make sure to install IO::Socket::SSL
$smtp->auth($mailuser, $mailpass); # make sure to install Authen::SASL

Prepare to send the message

$smtp->starttls(); # make sure to install IO::Socket::SSL
$smtp->auth($mailuser, $mailpass); # make sure to install Authen::SASL
$smtp->mail($from_addr) or die 'Failed to send mail (from): ' . $smtp->message;
$smtp->to($emails)      or die 'Failed to send mail (to): '   . $smtp->message;
$smtp->data()           or die 'Failed to send mail (data): ' . $smtp->message;

I haven't changed anything for this :
3/ Use of uninitialized value in printf at /usr/bin/tail_n_mail line 3789.
==> of %s is not valued
[1] From D, F, C, I, G, E, L, B, A, J, K, H(between lines 1 of and 2,284 of , occurs 24,677 times) (21,709, 582, 546, 474, 407, 403, 400, 119, 23, 6, 6, 2)

printf '(between lines %s of %s and %s of %s, occurs %s times)',
$earliest->{line}, $fab{ $earliest->{file} },
$latest->{line}, $fab{ $latest->{file} },
$pcount;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant