0 votes
by (230 points)

I can't find a way that the logwriter of the SMTP Client writes something about the mail sending.
This is my code
Dim RebexMail As New Rebex.Net.Smtp()
RebexMail.LogWriter = New Rebex.FileLogWriter("(pathexisting)\log.txt",Rebex.LogLevel.Debug)
RebexMail.Send(mailRebex, configSMTP)

This is the log - Mail is send correct:
2022-07-19 09:37:08.627 Opening log file.
2022-07-19 09:37:08.628 INFO FileLogWriter(1)[1] Info: Assembly: Rebex.Common R6.4 for .NET 4.6-4.8
2022-07-19 09:37:08.666 INFO FileLogWriter(1)[1] Info: Platform: Windows 6.2.9200 64-bit; CLR: 4.0.30319.42000
2022-07-19 09:37:08.667 DEBUG FileLogWriter(1)[1] Info: Culture: de; Windows-1252

What is the mistake?
Thank you very much.

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (230 points)
selected by
Best answer

Figured out my problem by myself:
This is the right code:
Dim RebexMail As New Rebex.Net.Smtp()
RebexMail.LogWriter = New Rebex.FileLogWriter("(pathexist)\log.txt", Rebex.LogLevel.Debug)
RebexMail.Connect(configSMTP.ServerName, configSMTP.ServerPort, configSMTP.SslMode)
RebexMail.Login(configSMTP.UserName, configSMTP.Password)