0 votes

I am able to connect with my server using port no 25

 client.Connect("webmail.dataglove-us.com", 25);
 ISendMessageResult result = client.SendMessage(email);

but when sending email its always Failure. can you suggest something?

by (200 points)
Can you please examine ISendMessageResult properties and share its values
-or-
Turn on logging and share the logs:
https://www.limilabs.com/blog/logging-in-ftp-dll
IsendMessageResult has 5.7.1 Unable to relay Error message in rejectedrecipientError.
Have you authenticated to this server (UseBestLogin)?
UseBestLogin giving exception "The remote certificate is invalid according to the validation procedure."
This means that your server requires client (Mail.dll) to switch to TLS/SSL encrypted channel, before authentication (good thing).

However certificate that the server provides is invalid (not trusted):
Issuer = "C=US, O=dgi, CN=TMAEXEDGE001.dgi.local"

Please read this article:
https://www.limilabs.com/blog/the-remote-certificate-is-invalid-according-to-the-validation-procedure

You should report that to the server administrator.
i am already using mail.dll , infect i have purchased licence.
Having a Mail.dll license doesn't change anything - this is not licensing issue.

Certificate provided by this server is simply not valid.

You can always accept invalid certificate (bad thing to do) using this code:

   client.ServerCertificateValidate += (sender, args) => args.IsValid = true;
   client.Connect("webmail.dataglove-us.com", 25);
   client.UseBestLogin("","")

1 Answer

0 votes

Your server denies sending this email. There can be many reasons for that:

  • You have not authenticated to the server, and your server doesn't want to be an open relay.
  • You are using port 25 instead of 587 or SSL/TLS connection over 465.

Please note that 25 should not be used for email submission.
Consider not specifying the port at all and using the default one - 587.

Please consult your SMTP server administrator - provide him the logs.

by (301k points)
...