smtp settings not accepted

Topics: General, Troubleshooting
Aug 5, 2012 at 7:19 PM

Hi there,

I'm working on my local computer on an instance of orchard 1.5. I just installed messaging 1.4.1 and email messaging 1.5. When the yellow box comes up telling me that : "The SMTP settings needs to be configured." I do that, fill out all the credentials and do save.

It then says "settings updated" in a green box, and it does this too when I leave all the textboxes empty....anyway it returns with all empty textboxes and still the same message in the yellow box :

"The SMTP settings needs to be configured."

 

Any Ideas?? Help would be much appreciated, I have tried to fill out the smtp settings at least 15 times..

Thanks for all the hard work, regards , robin

Coordinator
Aug 6, 2012 at 7:09 PM

Don't leave the textboxes empty. If they don't save, you probably have an error in app_data\logs.

Aug 7, 2012 at 9:47 AM
bertrandleroy wrote:

Don't leave the textboxes empty. If they don't save, you probably have an error in app_data\logs.

Thank you, but what now? I tries it again today to isolate the erro it gives in the app_data\logs.. this is the erro that was logged.

Being a beginner with Orchard I can't make much of it... any help would be greatly appreciated :)

2012-08-07 10:42:01,353 [9] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler
System.NullReferenceException: Object reference not set to an instance of an object.
   at Orchard.ContentManagement.DefaultContentManager.GetItemMetadata(IContent content) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 500
   at Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler.GetItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard.Web\Core\Navigation\Handlers\ContentMenuItemPartHandler.cs:line 30
   at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.GetContentItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 333
   at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass60.<GetItemMetadata>b__5f(IContentHandler handler) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 505
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Build\Orchard\src\Orchard\InvokeExtensions.cs:line 17
2012-08-07 10:42:01,410 [9] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler

Developer
Aug 8, 2012 at 11:03 AM

Is this the only exception that occures when saving the SMPT settings?

Aug 8, 2012 at 11:44 AM
Hi Skywalker,

No actually not, it also says something about not being able to insert NULL in Recaptcha table... even when I took out the recaptcha from the form where it's used, it still logs the same errors:
I surely hope you can make something of it!
Thanks!

2012-08-08 12:38:47,557 [14] NHibernate.AdoNet.AbstractBatcher - Could not execute command: INSERT INTO Orchard_Captcha_CaptchaSettingsPartRecord (PublicKey, PrivateKey, Theme, CustomCaptchaMarkup, Id) VALUES (@p0, @p1, @p2, @p3, @p4)
System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'PublicKey', table 'Orchard.dbo.Orchard_Captcha_CaptchaSettingsPartRecord'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
2012-08-08 12:38:48,347 [14] NHibernate.Util.ADOExceptionReporter - Cannot insert the value NULL into column 'PublicKey', table 'Orchard.dbo.Orchard_Captcha_CaptchaSettingsPartRecord'; column does not allow nulls. INSERT fails.
The statement has been terminated.
2012-08-08 12:38:48,348 [14] NHibernate.Event.Default.AbstractFlushingEventListener - Could not synchronize database state with session
NHibernate.Exceptions.GenericADOException: could not insert: [Orchard.Captcha.Models.CaptchaSettingsPartRecord#1][SQL: INSERT INTO Orchard_Captcha_CaptchaSettingsPartRecord (PublicKey, PrivateKey, Theme, CustomCaptchaMarkup, Id) VALUES (?, ?, ?, ?, ?)] ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'PublicKey', table 'Orchard.dbo.Orchard_Captcha_CaptchaSettingsPartRecord'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Action.EntityInsertAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
2012-08-08 12:38:48,454 [14] NHibernate.Impl.AbstractSessionImpl - DTC transaction prepre phase failed
NHibernate.Exceptions.GenericADOException: could not insert: [Orchard.Captcha.Models.CaptchaSettingsPartRecord#1][SQL: INSERT INTO Orchard_Captcha_CaptchaSettingsPartRecord (PublicKey, PrivateKey, Theme, CustomCaptchaMarkup, Id) VALUES (?, ?, ?, ?, ?)] ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'PublicKey', table 'Orchard.dbo.Orchard_Captcha_CaptchaSettingsPartRecord'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd)
at NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
--- End of inner exception stack trace ---
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Action.EntityInsertAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()



Cordiali saluti / Vriendelijke groeten / Herzliche Grüsse / Kind regards

Robin van Teunenbroek
00 39 3383545259
www.toursardinia.com



From: [email removed]
To: [email removed]
Date: Wed, 8 Aug 2012 03:03:40 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: sfmskywalker
Is this the only exception that occures when saving the SMPT settings?
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Developer
Aug 8, 2012 at 5:27 PM

Is it possible to (temporarily) disable the ReCaptcha module, and try again?

Aug 8, 2012 at 8:22 PM
YES! That did the trick! I guess that captcha module has to keep it's dirty little hands out of other peoples business, right!
Thanks for your thoroughness.


Cordiali saluti / Vriendelijke groeten / Herzliche Grüsse / Kind regards

Robin van Teunenbroek
00 39 3383545259
www.toursardinia.com



From: [email removed]
To: [email removed]
Date: Wed, 8 Aug 2012 09:27:20 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: sfmskywalker
Is it possible to (temporarily) disable the ReCaptcha module, and try again?
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Aug 8, 2012 at 8:32 PM
Hi again Skywalker,

Sorry I was crying victory too soon,
all settings are accepted now, except the pasword.... this is the erro thta's been logged:

2012-08-08 21:27:51,325 [6] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.ContentManagement.DefaultContentManager.GetItemMetadata(IContent content) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 500
at Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler.GetItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard.Web\Core\Navigation\Handlers\ContentMenuItemPartHandler.cs:line 30
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.GetContentItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 333
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass60.<GetItemMetadata>b__5f(IContentHandler handler) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 505
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Build\Orchard\src\Orchard\InvokeExtensions.cs:line 17


Cordiali saluti / Vriendelijke groeten / Herzliche Grüsse / Kind regards

Robin van Teunenbroek
00 39 3383545259
www.toursardinia.com



From: [email removed]
To: [email removed]
Date: Wed, 8 Aug 2012 09:27:20 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: sfmskywalker
Is it possible to (temporarily) disable the ReCaptcha module, and try again?
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Aug 8, 2012 at 8:33 PM
So no, the email was not send... it logs an exception instead


Cordiali saluti / Vriendelijke groeten / Herzliche Grüsse / Kind regards

Robin van Teunenbroek
00 39 3383545259
www.toursardinia.com



From: [email removed]
To: [email removed]
Date: Wed, 8 Aug 2012 09:27:20 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: sfmskywalker
Is it possible to (temporarily) disable the ReCaptcha module, and try again?
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Developer
Aug 8, 2012 at 9:36 PM

So, are you saying that the username is saved, but not the password? To be sure, could you verify this by checking the database? Since the password text field is a password input typed, it will not display a value, not even ******.

Aug 9, 2012 at 12:49 PM

Hi Skywalker,

You're right again, the pasword is saved, I found it in the database. But then what is that error from my last post all about, because an email wasn't send.

2012-08-09 12:52:03,224 [9] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.ContentManagement.DefaultContentManager.GetItemMetadata(IContent content) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 500
at Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler.GetItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard.Web\Core\Navigation\Handlers\ContentMenuItemPartHandler.cs:line 30
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.GetContentItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 333
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass60.<GetItemMetadata>b__5f(IContentHandler handler) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 505
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Build\Orchard\src\Orchard\InvokeExtensions.cs:line 17

Cordiali saluti / Vriendelijke groeten / Herzliche Grüsse / Kind regards

Robin van Teunenbroek
00 39 3383545259
www.toursardinia.com



From: [email removed]
To: [email removed]
Date: Wed, 8 Aug 2012 13:37:10 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: sfmskywalker
So, are you saying that the username is saved, but not the password? To be sure, could you verify this by checking the database? Since the password text field is a password input typed, it will not display a value, not even ******.
Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Aug 9, 2012 at 1:34 PM

That error seems like an other problem. Are you sure u don't have the following problem: http://orchard.codeplex.com/workitem/18709 ?

 

Aug 23, 2012 at 11:04 PM
Hi Znowman,

Thanks for your help, I'm replying a bit late due to my holidays...
Adding the line suggested by you doesn't solvbe my problem, also I'm working with Orchard 1.5.0
Yesterday I didn't try to send an email and still it logged this error... any idea what is going on?
Today I did try email sending , but no luck and the same error occuring
Log:
2012-08-22 12:08:19,465 [14] Orchard.ContentManagement.DefaultContentManager - NullReferenceException thrown from IContentHandler by Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler
System.NullReferenceException: Object reference not set to an instance of an object.
at Orchard.ContentManagement.DefaultContentManager.GetItemMetadata(IContent content) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 500
at Orchard.Core.Navigation.Handlers.ContentMenuItemPartHandler.GetItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard.Web\Core\Navigation\Handlers\ContentMenuItemPartHandler.cs:line 30
at Orchard.ContentManagement.Handlers.ContentHandler.Orchard.ContentManagement.Handlers.IContentHandler.GetContentItemMetadata(GetContentItemMetadataContext context) in c:\Build\Orchard\src\Orchard\ContentManagement\Handlers\ContentHandler.cs:line 333
at Orchard.ContentManagement.DefaultContentManager.<>c__DisplayClass60.<GetItemMetadata>b__5f(IContentHandler handler) in c:\Build\Orchard\src\Orchard\ContentManagement\DefaultContentManager.cs:line 505
at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in c:\Build\Orchard\src\Orchard\InvokeExtensions.cs:line 17





From: [email removed]
To: [email removed]
Date: Thu, 9 Aug 2012 05:34:49 -0700
Subject: Re: smtp settings not accepted [orchard:390348]

From: Znowman
That error seems like an other problem. Are you sure u don't have the following problem: http://orchard.codeplex.com/workitem/18709 ?

Read the full discussion online.
To add a post to this discussion, reply to this email (orchard@discussions.codeplex.com)
To start a new discussion for this project, email orchard@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Jan 21, 2013 at 7:36 PM

finally the problem is solved

setting port number from 465 to 578 did the trick I got the answer from this post:

http://orchard.codeplex.com/discussions/391267

Feb 9, 2013 at 4:22 PM
Port 587 man not 578. But yea, I tore my hair out for about 12 hours trying to get to the root of this, and in my case it was also down to the captcha module preventing the persistence of the SMTP settings.