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 (2.7k 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 (19k 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

I'm building my first rule to license users in Office365. When the rule runs it fails to find the Usage Location which is based on the Country (default settings). I ... runs before the "assign 365 license" rule. Why am I not getting Usage Location populated?

asked Jul 20 by ComputerHabit (2.6k points)
0 votes
1 answer

Hi all, Having issues creating a GSuite (Apps for Education) account for my users during a new user creation process. Logic location: Business Rules &gt; After User Creation &gt ... stated, no user is created. Any idea how I can go about troubleshooting this?

asked Jan 7, 2019 by Robb (320 points)
0 votes
1 answer

I have a customized Web form used to create a Non-Employee that contains fields that are required. When I leave some of the fields blank and select the "Create" button, ... if the form still has required fields that are blank? Screen shots below. Thanks...

asked Jul 21, 2015 by sandramnc (3.4k points)
0 votes
1 answer

UPDATE: Fixed this, turns out there was a request with no approver, denied the request and it works as normal now. I have a scheduled task that has been working ... ) if ([System.DateTime]::Now -lt $requestExpDate) { continue } HandleExpiredRequest($request) }

asked Jun 24, 2015 by bistromath (4.3k points)
0 votes
1 answer

Hello, I am using a custom task to run PowerShell scripts that migrate users to Office 365. After the initial migration is complete, I'm running a second script ... .Actions.RunScriptAction.Execute(ICommand command) --- End of inner exception stack trace ---

asked Feb 19, 2015 by DFassett (4k points)
2,245 questions
2,007 answers
5,494 comments
19,929 users