Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

unable to get email when creating a user #362

Open
mehboobc opened this issue Feb 23, 2016 · 3 comments
Open

unable to get email when creating a user #362

mehboobc opened this issue Feb 23, 2016 · 3 comments

Comments

@mehboobc
Copy link

i am unable to get emails when i create a new user. i checked in spam folders and everywhere. also it not allowing me to change the password while admin login without the old password. even when i click on forgot password it says email sent but nothing in box or spam

@kmontenegro
Copy link

I'm in the same boat. I tried the old solution which is here but that just brought my install down. Once I restored the mail_helper that came with my install, OpenVBX was back up but the mail function still isn't working.

@Cramertech
Copy link

Cramertech commented Jul 1, 2016

Since nobody has a recent fix for this issue (one that fixes it on the new version), I'll post what my fix was after days of headache and frustration.

Nobody told me where my mail logs were, so my brother showed me: /var/logs/maillog

After going into an ssh session on my server at that location I typed tail -100f maillog to get an always updating tail of the last 100 lines of the log. That way I could see what was going on as I was troubleshooting the mail system in real time.

As an aside, I saw that GMail was responding, so that part was working... but it was bouncing back an error saying the destination wasn't a valid account. I went "oh duh!" ... because I thought I had a catch-all set up, but instead I was just making aliases and had forgot to set up that user's email as an alias there.

To back up just a bit - I had tried many fixes out there for the issue, including a hack in the mail_helper.php file to strip off www from the From address, as well as the one mentioned here as the old solution which overrides the built-in mail function of OpenVBX. Nobody mentioned that Pear::Mail's Mail.php is required for that to even work. I downloaded that, but still got server errors when trying to send a pw reset. I think it also requires Pear.php - and I don't know enough about this crap to bother going file by file and including an entire framework just to get a bad kludgey hack to work.

Turns out that OpenVBX has its own SMTP solution if you wish to use it. You go into /OpenVBX/config/email.php and edit the settings to utilize smtp on this line:

$config['protocol'] = 'smtp'; //mail, sendmail, or smtp The mail sending protocol.

Then you want to set up your smtp settings at these lines:

/*
| -------------------------------------------------------------------
| SMTP Settings
| Use if protocol set to smtp above; otherwise ignore
| -------------------------------------------------------------------
*/

$config['smtp_host'] = 'smtp.gmail.com';        //SMTP Server Address.
$config['smtp_user'] = 'your_user@domain.com';      //SMTP Username.
$config['smtp_pass'] = 'passwordhere';      //SMTP Password.
$config['smtp_port'] = '465';   // SMTP Port.
$config['smtp_timeout'] = '5';  // SMTP Timeout (in seconds).

I hope that this helps someone out there. I know I was at the point of nearly tossing this whole thing out.

@Cookej2
Copy link

Cookej2 commented Aug 1, 2017

I am actually still quite lost with this and am still about to throw this whole thing out. I have done everything in this post to a T and it is still not working for me. I have created and added a new user to the SQL database, changed the passwords.. not sure what I am missing.

My second user is not able to log in no matter what I seem to try.

I do use GSuites, possibly this is an issue? Really not sure. Any help you be a blessing!

Many thanks,
James

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants