ElkArte Community

Project Support => Support => Topic started by: ahrasis on January 15, 2015, 05:49:23 am

Title: Can't get mail working
Post by: ahrasis on January 15, 2015, 05:49:23 am
Sorry but I need assistance here. I can't seem to get my mail sending working. It was due to the fact I forgot my password and reset them in cPanel. But then, I have to change the password in the mail settings. Unfortunately, I can't save it at all. I am thinking to replace only relevant files with default that are related and affect the mail settings saving. Can some one guide me on which files I need to replace?

Otherwise, I need to change the whole forum files.  :'(

Title: Re: Can't get mail working
Post by: emanuele on January 15, 2015, 06:16:40 am
Are you using SMTP mail?
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 06:35:32 am
Yes SMTP mail. But After resetting in Cpanel, I have to reset it in  forum too, right?
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 07:16:04 am
I found a way to resolve this i.e. by putting all the same info in my smf test site and extract the same from phpMyAdmin.

I was testing in my ElkArte test site using fresh installation files but I cannot save as well. Is this a bug?
Title: Re: Can't get mail working
Post by: emanuele on January 15, 2015, 07:40:49 am
Works fine on my test install.
No idea what to suggest for debugging, because it's a rather simple form that uses the Settings_Form class...
.
Anyway, the SMTP email data are saved into the database, so change the forum files wouldn't make any difference. ;)
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 09:09:42 am
My problem is I cannot save to database. Unless the files are modified, it should normally save it there. But I just cannot do that. When I pressed save, it don't save anything at all and it returns me to the main admin center page. And that even after I replaced all files with 1.0.2 pack. Strange. The only possibility left is my 1.0.2 pack is partly corrupted. I will download a new one and test again.
Title: Re: Can't get mail working
Post by: radu81 on January 15, 2015, 09:20:31 am
I also remember that, when just converted I wanted to turn off all emails from my website so I imput something like XXXX in smtp details but those fields were not saved. I thought were not saved because not formated well.

==edit==
I just tried now and I was able to save the details  O:-)
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 10:11:23 am
Seems like no bug repeated in fresh install. My 1.0.2 pack is not corrupted after all.

Quote from: radu81 – I also remember that, when just converted I wanted to turn off all emails from my website so I imput something like XXXX in smtp details but those fields were not saved. I thought were not saved because not formated well.

==edit==
I just tried now and I was able to save the details  O:-)

Interesting. But I don't really think importing is the cause. I suspect one of the hook might have done that because when the database is fresh installed, I can't find the bug.

I found a hook remover from SMF. (The author is @emanuele ) Can anybody convert it to ElkArte?
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 10:22:56 am
Since it not much, I converted it myself and attached it here. However, it is not working. Lols.

If anybody can help to fix conversion error in this converted tool, please let me know. I want to check out this problem and fix it.
Title: Re: Can't get mail working
Post by: emanuele on January 15, 2015, 10:29:23 am
Actually I don't think this package does anything to hook (unless my memory is fooling me), it just toggles the activation status of the packages in the log table... oh it also removed entirely the hooks. I didn't know.
At the moment I can't look at the code, but if you just want to wipe all the hooks run this query:
Code: [Select]
	DELETE FROM {db_prefix}settings
WHERE variable LIKE 'integrate_%'
of course {db_prefix} should be elkarte_ or what you used as prefix.
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 11:10:41 am
Full upgrade package in smf 2.1 is able to remove hook. However, I am not sure whether the same works here. I also couldn't find any full upgrade package. May be there should be an upgrade package for Elk other then install and patch packages.

I manage to get working (finally!). I  attach it here for those who need it.
Title: Re: Can't get mail working
Post by: ahrasis on January 15, 2015, 11:35:27 am
I replace all the files with a fresh one, remove all the hooks, reinstall addon one by one while testing mail settings, and...

I found the cause. It is my own addon - ROAM. So, I fix it. Now the mail settings can be saved while using the updated ROAM.

Thanks everyone. :D
Title: Re: Can't get mail working
Post by: Spuds on January 15, 2015, 02:19:16 pm
I think the repair settings tool (on the tools site) has a button to remove all hooks in the system. 
Title: Re: Can't get mail working
Post by: emanuele on January 15, 2015, 03:14:35 pm
BTW!
Pay attention you may break your forum
Admin > maintenance > forum maintenance > integration hooks (and if the menu is not there, enable "Integration Hooks Management" in core features)
It's a while I don't use it but you should be able to selectively enable/disable single hooks.
Title: Re: Can't get mail working
Post by: ahrasis on January 16, 2015, 10:04:48 am
Sorry @Spuds , I don't believe I knew about it or 've seen it before. Now that you mentioned it, I will definitely grab and use that one instead.

I normally remove hooks after I change all the files with a fresh one. So, I think it will be safe if I removed them all after that.