0 votes

With the latest version, sometimes the emails never get sent and no error message exists in the log files. When I notice this happen, I try sending a test meail form the Service Properties page and I get a screen titled: Test Settings Failed and the message is: The operation has timed out.

If I restart the server(restarting the service does not address the issue), mail starts working again but it never sends any of the messages that failed.

This is a real reliability problem that I need to get fixed ASAP. Please advise. Thanks!

Version 2012.1 Version 3.3.8318.0

by (360 points)
0

Hello Michael,

Please execute the following PowerShell script:

    $smtpServer = "smtp.company.com" # TODO: modify me
    $emailFrom = "emailFrom@company.com" # TODO: modify me
    $emailTo = "emailTo@company.com" # TODO: modify me

    $smtpClient = New-Object Net.Mail.SmtpClient($smtpServer)
    $smtpClient.UseDefaultCredentials = $TRUE
    $smtpClient.Send($emailFrom, $emailTo, "Subject", "Test")

Does it send email successfully?

0

It did not work
SendEmail: 1 operation executed
Run PowerShell script 'smtp email' for the user
Exception calling "Send" with "4" argument(s): "Failure sending mail."

I also tried sending a test message through the properties tab and it failed again with the same Timeout error.

Please note I have also upgraded to the latest version from the website Friday, so that didn't fix it either...

0

Michael,

Try executing the script via the Windows PowerShell Console, not via Adaxes.

0

That worked fine through powershell. Trying the Test Settings button still failed. Thanks!

0

Michael,

Our QAs are trying to reproduce the issue in our environment. I'll update this post as soon as they have any result.

1 Answer

0 votes
by (18.0k points)

Michael,

We managed to find the cause of the problem. Email messages are not sent because .NET System.Net.Mail.SmtpClient class doesn't issue QUIT command to SMTP transaction. That's a Microsoft's bug, but we'll try to workaround it. On Thursday we'll release a minor update for Adaxes that contain a fix for the issue.

0

Yes here are the details

I've noticed that this occurs when it is sending a large amount of emails and usually the first error precedes the beginning of the failure errors. Let me know what or how you want to recieve it and I'll export and send you the entire log. Thanks!

Log Name: Adaxes
Source: Adaxes Service
Date: 9/28/2012 2:01:53 AM
Event ID: 0
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: mitkuscfln89.mii.com
Description:
Scheduled Task 'Non-N. America Account Expiration Notifier' generated the following warning while resolving value references: Resolving value references in the notification recipient address '%mail%' resulted in an empty string.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Adaxes Service" />
<EventID Qualifiers="0">0</EventID>
<Level>3</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-09-28T07:01:53.000000000Z" />
<EventRecordID>364810</EventRecordID>
<Channel>Adaxes</Channel>
<Computer>mitkuscfln89.mii.com</Computer>
<Security />
</System>
<EventData>
<Data>Scheduled Task 'Non-N. America Account Expiration Notifier' generated the following warning while resolving value references: Resolving value references in the notification recipient address '%mail%' resulted in an empty string.</Data>
</EventData>
</Event>

Log Name: Adaxes
Source: Adaxes Service
Date: 9/28/2012 2:05:48 AM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: mitkuscfln89.mii.com
Description:
Softerra.Adaxes.BackgroundThreadException: An error occurred while sending an e-mail notification to dtruax@mii.com. ---> System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: The operation has timed out.
at System.Net.ConnectionPool.Get(Object owningObject, Int32 result, Boolean& continueLoop, WaitHandle[]& waitHandles)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Softerra.Adaxes.Utils.Mailer.Send(String toAddress, String subject, String textBody, String htmlBody, String fromAddress, String cc, String bcc)
at Softerra.Adaxes.CommandPipeline.Actions.SendMailNotificationAction.SendNotifications(Object info)
--- End of inner exception stack trace ---
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Adaxes Service" />
<EventID Qualifiers="0">0</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-09-28T07:05:48.000000000Z" />
<EventRecordID>364962</EventRecordID>
<Channel>Adaxes</Channel>
<Computer>mitkuscfln89.mii.com</Computer>
<Security />
</System>
<EventData>
<Data>Softerra.Adaxes.BackgroundThreadException: An error occurred while sending an e-mail notification to dtruax@mii.com. ---> System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: The operation has timed out.
at System.Net.ConnectionPool.Get(Object owningObject, Int32 result, Boolean& continueLoop, WaitHandle[]& waitHandles)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Softerra.Adaxes.Utils.Mailer.Send(String toAddress, String subject, String textBody, String htmlBody, String fromAddress, String cc, String bcc)
at Softerra.Adaxes.CommandPipeline.Actions.SendMailNotificationAction.SendNotifications(Object info)
--- End of inner exception stack trace ---</Data>
</EventData>
</Event>

0

Hello Michael,

Today we released a minor update for Adaxes 2012.1 that contains a fix for your issue. Please, reply if this fix helped.

Also, when an email is not sent, Adaxes now records an error in the Execution Log.

Find the latest build here.
Upgrade instructions.

0

I've just completed the upgrade. I'll look through the logs periodically and see if the error reoccurs. Thanks!

0

Latest upgrade and service configuration set as emailworkaround = 2 has not thrown this error in 4 days. I think we're good. Thanks!

0

Hello Michael,

Great! Thanks for the info.

Related questions

0 votes
1 answer

We have multiple secondary domains that are being managed by Adaxes. Everything seems to be working except self service portal login. We tested with our other secondary domains and those ... other than sign failed. What else can I look at to figure this out?

asked Aug 21, 2020 by mark.it.admin (2.3k points)
0 votes
1 answer

Hej ho, If my session timed out and I refresh the page or even pages, everytime I start on home - no matter which object was opened before. Thats kind of annoying, if you opened 10+ objects and then time out kicks in :D Is this something we can change?

asked Mar 15 by wintec01 (1.1k points)
0 votes
1 answer

Hi team, currently the loading of "My managed objects" is timing out for some users after exact 1 minute with error DevTools showing me 504 Timing I assume its because of ... users each time I open homepage its loading again and again and take some times.

asked Dec 20, 2023 by wintec01 (1.1k points)
0 votes
1 answer

Hi all, I setup some rule-based groups and tried to copy criterias from group A to B. I did it via "copy" and "copy as plain text" option, but everytime pasting is failing : ( Any clue or idea why?

asked May 26, 2023 by wintec01 (1.1k points)
0 votes
1 answer

Hi We have a couple of scheduled tasks set up to remove accounts which have been disabled for a perios of time. This works fine for normal user accounts, but we ... and former domain admin accounts? We're running the latest version of Adaxes Thanks Matt

asked Oct 26, 2022 by chappers77 (2.0k points)
3,326 questions
3,026 answers
7,727 comments
544,678 users