YAFLogo

the_Drewster
6 years ago
Hi there

I have enabled Allow Notification of All Posts on All topics within Host - Permission and as a user selected Notification for all posts on all topics under user profile, but not notificaitons emails are sent when someone posts to any forum.

All other types of notifications are working. Email is working. I can see the value is updated within the yaf_user table in the database. Nothing obvious in the logs. Any ideas on how to debug this?

Thanks

Drew

DNN YAF 2.22.5730

Sponsor

the_Drewster
6 years ago
Hi there

In addition to this, the Digest doesn't send out. The "Send Test Digest" works, direct and queued. and The Generate Digest works too. But the Force Digest Send does't send and digests nor are any received at any time by anyone who has select this option.

Any ideas on how I can debug this please?

Thanks

Drew

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
6 years ago
Originally Posted by: the_Drewster 

Hi there

I have enabled Allow Notification of All Posts on All topics within Host - Permission and as a user selected Notification for all posts on all topics under user profile, but not notificaitons emails are sent when someone posts to any forum.

All other types of notifications are working. Email is working. I can see the value is updated within the yaf_user table in the database. Nothing obvious in the logs. Any ideas on how to debug this?

Thanks

Drew

DNN YAF 2.22.5730

Did you try it with multiple users? The Author of the post will not receive an email

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
6 years ago
Originally Posted by: the_Drewster 

Hi there

In addition to this, the Digest doesn't send out. The "Send Test Digest" works, direct and queued. and The Generate Digest works too. But the Force Digest Send does't send and digests nor are any received at any time by anyone who has select this option.

Any ideas on how I can debug this please?

Thanks

Drew

Was there any new posting within the last 24 hours? Because if there are no new post then no digest is send out.

the_Drewster
6 years ago
Thanks for replying. Yes, I have a test user who has "Receive one daily digest/summary of activity" enabled. But the test users account has not received any emails. There are daily posts, and I have also created many test posts. Also, I have clicked the Force Digest Send button but the test user account has not received the digest.

Could it be related to the "Connection Limit" and "Max Idle Time" and "Number of messages sent in each batch" settings in both the Host and Admin Site settings of DNN? I've tried different combinations.

Thanks

Drew

the_Drewster
6 years ago
One message has appeared over night. This message does not appear when I force a digest. Any ideas?

Exception Thrown in SendMail Thread: System.Data.SqlClient.SqlException (0x80131904): There is insufficient system memory in resource pool 'internal' to run this query. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at YAF.Types.Interfaces.Data.IDbAccessExtensions.<>c__DisplayClass7.b__6(IDbCommand c) at YAF.Core.Data.DbAccessBase.Execute[T](Func`2 execFunc, IDbCommand cmd, IDbTransaction dbTransaction) at YAF.Types.Interfaces.Data.IDbAccessExtensions.GetDataset(IDbAccess dbAccess, IDbCommand cmd, IDbTransaction dbTransaction) at YAF.Types.Interfaces.Data.IDbAccessExtensions.GetData(IDbAccess dbAccess, IDbCommand cmd, IDbTransaction dbTransaction) at YAF.Core.Data.DynamicDbFunction.b__5(IDbCommand cmd) at YAF.Core.Data.DynamicDbFunction.DbFunctionExecute(DbFunctionType functionType, InvokeMemberBinder binder, IList`1 parameters, Func`2 executeDb, Object& result) at YAF.Core.Data.DynamicDbFunction.InvokeGetData(InvokeMemberBinder binder, Object[] args, Object& result) at YAF.Core.Data.TryInvokeMemberProxy.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) at CallSite.Target(Closure , CallSite , Object , Nullable`1 , DateTime ) at YAF.Core.Model.MailRepositoryExtensions.ListTyped(IRepository`1 repository, Nullable`1 processID) at YAF.Core.Services.YafSendMailThreaded.GetMailListSafe() at YAF.Core.Services.YafSendMailThreaded.SendThreaded() ClientConnectionId:32e541df-b65c-4f46-899e-1c70776c71d5 Error Number:701,State:123,Class:17

guest
6 years ago
Originally Posted by: the_Drewster 

Hi there

In addition to this, the Digest doesn't send out. The "Send Test Digest" works, direct and queued. and The Generate Digest works too. But the Force Digest Send does't send and digests nor are any received at any time by anyone who has select this option.

Any ideas on how I can debug this please?

Thanks

Drew

I agree with you

marcelocabrera
6 years ago
I manually fixed my installation of YAF 2.2.2 on my localhost and it fixed it on the server as well.

Symptoms: email notifications do not go out when someone posts on a watched topic/forum or for users with receive all notifications enabled.

Solution: edit the C# file YafSendNotifications.cs on YAF.Core.Services (using visual studio on my case) and go to the line where it checks for valid membership and make the following change, then compile and the notifications are send.

// create individual watch emails for all users who have All Posts on...

foreach (var user in usersWithAll.Where(x => x.UserID != messageAuthorUserID && x.ProviderUserKey != null))

{

var membershipUser = UserMembershipHelper.GetUser((Object)user.ProviderUserKey);

//var membershipUser = UserMembershipHelper.GetUser(user.UserID);

if (membershipUser == null || membershipUser.Email.IsNotSet())

{

continue;

}

watchEmail.TemplateLanguageFile = user.LanguageFile.IsSet()

? user.LanguageFile

: this.Get().LanguageFileName;

watchEmail.SendEmail(

new MailAddress(forumEmail, boardName),

new MailAddress(membershipUser.Email, membershipUser.UserName),

subject,

true);

}