0 votes

We have the configuration:
- 2017 licenced version of Mail.dll
- Exchange-Mailserver (stable 2019) in the local network of the Mail-Client
- Exchange with default-Settings acts as "Mail-Relay" on port 25 (no auth)
- Normal SMTP.Connect(SERVER,PORT); // no ConnectSSL
- Normal builder.Create() - MimeEncoding for TextData only
- Body with Text only under 1kByte - No Attachgments
- Only one valid address in TO and FROM, no CC, BCC and ReplyTO
=>
- SendMessageStatus is Success after 5,1 seconds
- Productive Outlook or Outlook-Web-Access takes under 100ms
- On other external Mail-Servers with Auth/TLS 1.2 this is "fast engouth" (0,4 sec).
- Still no wireshark analyse is possible due to our enterprice IT...

For no Auth/SMTP-Relay:
Do you have an idea why this could be so slow or is there a parameter that we missed? Is there a bug or is the performance in new version of Mail.dll essential better?


[Edited]

Thanks for the answer. We create all mail parameters. The only parameter that is set after the connect and before the SendMessage() is the

IMail imail = MailBuilder.Create(); 

and

imail.TextData.ContenTransferEncoding 
    = MimeEncoding.QuotedPrintable;

To make these step bevore the connect has no effect.

Is it possible get a deeper log-level or is it possible to find out which limilabs- or mailserver-component is so slow?

Here is my complete log:

13:10:18 S: 250-EXCH-PERMTEST.XXXXXXXXXXX.de Hello [X.X.X.117]
13:10:18 S: 250-SIZE 37748736
13:10:18 S: 250-PIPELINING
13:10:18 S: 250-DSN
13:10:18 S: 250-ENHANCEDSTATUSCODES
13:10:18 S: 250-STARTTLS
13:10:18 S: 250-X-ANONYMOUSTLS
13:10:18 S: 250-AUTH NTLM
13:10:18 S: 250-X-EXPS GSSAPI NTLM
13:10:18 S: 250-8BITMIME
13:10:18 S: 250-BINARYMIME
13:10:18 S: 250-CHUNKING
13:10:18 S: 250-SMTPUTF8
13:10:18 S: 250 XRDST
13:10:25 C: MAIL FROM:XXXXXXXXXXXXXXXX@gmx.de
13:10:25 C: RCPT TO:user01@XXXXXXXXxXXXXXXX.de
13:10:25 C: NOOP
13:10:25 S: 250 2.1.0 Sender OK
13:10:26 S: 250 2.1.5 Recipient OK
13:10:30 S: 250 2.0.0 OK
13:10:31 C: BDAT 591 LAST
13:10:31 C (591 bytes): Content-Type: text/plain;
 charset="utf-8"
 Content-Transfer-Encoding: 7bit
 MIME-Version: 1.0
 Date: Thu, 07 Nov 2019 13:10:25 +0100
 Message-ID: 0169c2e9-7e72-4a9b-b469-a968a7fb511e@mail.dll
 Subject: =?utf-8?Q?Genehmigungsaufgabef=C3=BCrEingangsrechnungbis31=2E12?=
 =?utf-8?Q?=2E2015_pr=C3=BCfen?=
 From: muster.moebelmeister@XXXX.de
 To: user01@YYYY.de

 Liebe Kollegin, lieber Kollege,

 [...]
13:10:31 S: 250 2.6.0 0169c2e9-7e72-4a9b-b469-a968a7fb511e@mail.dll [InternalId=1417339207682, Hostname=EXCH-PERMTEST.XXXXXXXXXXXXXX.de] 2057 bytes in 0.097, 20,499 KB/sec Queued mail for delivery
13:10:31 C: QUIT
by (400 points)
edited by
Question was edited to include the log, same as the answer.

1 Answer

0 votes

Make sure that email creation happens before you even try to connect.

This way you can measure what takes most time: email creation, connecting or sending.

Consider turning on logging:
https://www.limilabs.com/blog/logging-in-mail-dll

5.1 sec is very long, I'm pretty sure the problem is not with Mail.dll.
Maybe your server is throttling you?


[Edited]
Create message before connecting otherwise log times make no sense.

There is almost 7 seconds gap after connection is established and first MAIL FROM is send:

13:10:18 S: 250 XRDST
13:10:25 C: MAIL FROM:XXXXX

Why is that? - I assume this is were you create a message and it is slow for some reason.

Then the server responses start to be extremely slow:

13:10:25 C: NOOP
13:10:25 S: 250 2.1.0 Sender OK
13:10:26 S: 250 2.1.5 Recipient OK
13:10:30 S: 250 2.0.0 OK

This usually means that the server is throttling you.

Please consult you server administrator: maybe authenticated accounts are not being throttled.

by (301k points)
edited by
...