• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Configuring Recover account/password

Aeronx

Intermediate OT User
Joined
Dec 17, 2015
Messages
735
Solutions
9
Reaction score
119
Hello Otlanders!

I've been trying for days now many options to configure the automatic account/password recovery throguth email on znote.

I've set all the data from my webservice into config.php
Is phpmailer 100% necessary? If so, there is anything to configure about it?

This is the info on config:
PHP:
$config['mailserver'] = array(
        'register' => false, // Send activation mail
        'accountRecovery' => true, // Recover username or password through mail
        'host' => "smtp.gmail.com", // Outgoing mail server host.
        'securityType' => 'ssl', // ssl or tls
        'port' => 465, // SMTP port number - likely to be 465(ssl) or 587(tls)
        'email' => '[email protected]',
        'username' => '[email protected]', // Likely the same as email
        'password' => 'myemailpassword', // The password.
        'debug' => true, // Enable debugging if you have problems and are looking for errors.
        'fromName' => $config['site_title'],
    );

and this is the error i get:
error.PNG

I've tested all tutorials/troubleshootings on everywhere, this was my last resource.
@Znote Any idea?

Thank you all for your time.
 
Solution
To use mail function in Znote AAC you have to use an SMTP service, as well as use the PHPMailer libs. (Download their latest version 5 release, extract it to web directory, rename the folder to just "PHPMailer").
You do not need to install an SMTP server of any kind, and you should be able to use gmail as an SMTP service just fine. (Until you hit daily spam limits and get your account blocked).

I suppose gmail is fine for testing, but I would move to something else once you decide to go live. I don't know what to recommend tho, transactional mail services tend to be shit, or expensive (or both). If anyone has a good suggestion please let me know, I'm curious myself. :p

It's because the code was made to work with PHPMailer 5.2 or...
SMTP installed? I really dont know lol! All that goes to website/db shit im a bit lost.
I have a gmail account and the settings on config.php

A year ago it was working perfectly, but since i've updated to the new 1.6 from znote, it stopped working.
If someone could guide me a bit on the process on seting that up would be awesome. If not, somewhere i can check a guide or anything that could help me.

EDIT (after 2h):
I've been reading files and more files and i got to this conclusion:

recovery.php requires init.php, in init.php is loaded mail.php which at the same time loads PHPMailerAutoload.php

All this request the info from config.php which is already configured. So no further configuration should be necessary after this point. So far i dont know why it doesnt connect to the server.

EDIT2:
Since i didnt find a solution for using the mail working i made a work around. I modified znoteacc register, and some other files to put in a secret word when registering. This work is then asked on recovery for username or password. If you know the secret work, the email and a character name on that account, the website will show you your acount name or password.
 
Last edited:
It's because the code was made to work with PHPMailer 5.2 or lower versions. The PHPMailer 6 did a major update that causes incompatibilty. The problem is that PHPMailer 5.2 only works with PHP5, not PHP7. Can you help us @Znote
 
To use mail function in Znote AAC you have to use an SMTP service, as well as use the PHPMailer libs. (Download their latest version 5 release, extract it to web directory, rename the folder to just "PHPMailer").
You do not need to install an SMTP server of any kind, and you should be able to use gmail as an SMTP service just fine. (Until you hit daily spam limits and get your account blocked).

I suppose gmail is fine for testing, but I would move to something else once you decide to go live. I don't know what to recommend tho, transactional mail services tend to be shit, or expensive (or both). If anyone has a good suggestion please let me know, I'm curious myself. :p

It's because the code was made to work with PHPMailer 5.2 or lower versions. The PHPMailer 6 did a major update that causes incompatibilty. The problem is that PHPMailer 5.2 only works with PHP5, not PHP7. Can you help us @Znote

Sure, github issue created. Follow it to keep track of PHPMailer version 6 support. But according to their github's README, version 5.2 should support PHP 7.0.
 
Last edited:
Solution
EDIT2:
Since i didnt find a solution for using the mail working i made a work around. I modified znoteacc register, and some other files to put in a secret word when registering. This work is then asked on recovery for username or password. If you know the secret work, the email and a character name on that account, the website will show you your acount name or password.

Do you mind posting how you did it for us?
 
Back
Top