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

emailing log file - error, help please #23

Closed
chrisbwy opened this Issue Oct 9, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@chrisbwy

chrisbwy commented Oct 9, 2018

Hi - I'm getting an error when trying to email the log file.

Settings...

email:
from: app@arris.com
to: chris.hargreaves@arris.com
server: smtp.arrisi.com
port: 25
useSsl: false
userName:
password:

Log Message...

Backup finished!
The backups are in this directory: c:\scm-backup\

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: userName
at MailKit.MailService.Authenticate(String userName, String password, CancellationToken cancellationToken)
at ScmBackup.Http.MailKitEmailSender.Send(String subject, String body) in C:\projects\scm-backup\src\ScmBackup\Http\MailKitEmailSender.cs
:line 17
at ScmBackup.LogMailingScmBackup.Run() in C:\projects\scm-backup\src\ScmBackup\LogMailingScmBackup.cs:line 31
at ScmBackup.Program.Main(String[] args) in C:\projects\scm-backup\src\ScmBackup\Program.cs:line 9

Note our server does not require a userName or password.

Any ideas what the problem is?

Many thanks in advance.

Regards

Chris

christianspecht added a commit that referenced this issue Oct 9, 2018

SMTP: only authenticate if the server supports it AND the config cont…
…ains credentials

(maybe the solution for #23?)
@christianspecht

This comment has been minimized.

Owner

christianspecht commented Oct 10, 2018

Unfortunately I don't have access to a SMTP server which doesn't require authentication.
So I can only try some stuff, and I need you to check whether it helped.

Can you try this version?
https://ci.appveyor.com/project/ChristianSpecht/scm-backup/builds/19385148/artifacts

@chrisbwy

This comment has been minimized.

chrisbwy commented Oct 10, 2018

SCM Backup output 10 Oct 121620.txt

Hi Christian,

Great, thanks that works ok, see attached.

There's lots of extra debug in this log - is that correct?

Regards

Chris

christianspecht added a commit that referenced this issue Oct 11, 2018

@christianspecht

This comment has been minimized.

Owner

christianspecht commented Oct 11, 2018

No, this shouldn't happen with the default settings.

I didn't notice it because I only tested the mails with a GitHub account (where I'm using GitHub's Octokit library, which doesn't log), but not with a Bitbucket account (where I'm calling the API in my own code, with full logging).

I just pushed another change - please try this version:
https://ci.appveyor.com/project/ChristianSpecht/scm-backup/builds/19444335/artifacts

@plbrownoptivcom

This comment has been minimized.

plbrownoptivcom commented Oct 11, 2018

@christianspecht

This comment has been minimized.

Owner

christianspecht commented Oct 14, 2018

I've moved this to a new issue: #25

@christianspecht christianspecht added the bug label Oct 14, 2018

@chrisbwy

This comment has been minimized.

chrisbwy commented Oct 15, 2018

Hi Christian,

Many thanks for the latest update.

Now the log is ok, no debug stuff in there.

Regards and thanks for your changes here :-)

Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment