ProFTPd-Admin icon indicating copy to clipboard operation
ProFTPd-Admin copied to clipboard

Feature request: Email for new Users

Open Shuro opened this issue 9 years ago • 8 comments

I've had in mind to send the new created user an email with the login details for his / her FTP-Account if an Email was saved. Maybe I try to implement it later if I have some spare time.

Shuro avatar Jul 21 '16 10:07 Shuro

This opens a whole new can of worms with SMTP processing, storing credentials for external mail servers and so on. I won't have time to implement this as I don't have a use-case for this but I welcome pull requests.

ChristianBeer avatar Nov 13 '16 11:11 ChristianBeer

@ChristianBeer what exactly would be a bother for sending mail ? About that I guess some configuration for the smtp (default sendmail) in the config.php, why not a template mail too, adding the mail function where it's needed, maybe I oversimply it ? One concern would be about the password sent by email which is quite ugly, could be a simple link but the problem is that there is no auth in ProFTPd admin yet.

floreo avatar Nov 16 '16 18:11 floreo

The easy thing to use is the builtin PHP mail() function but that does not work if you need to authorize yourself at the mailserver. You would need to include settings to config.php so an external SMTP server can be specified including authentication and encryption. Of course you need to add error handling when communicating with the mailserver. So you'll end up using something like https://github.com/PHPMailer/PHPMailer which seems to be the right tool when doing only a minimal installation.

Sending passwords via mail might not be allowed everywhere but is still a viable way to get the password to the user.

ChristianBeer avatar Nov 16 '16 23:11 ChristianBeer

@ChristianBeer yes I was thinking too of PHPMailer for simplicity's sake, would it be to consider to ship it with ProFTPd-Admin ? I guess it would just make it all "heavy" though if you're interested I might try something.

Yes, it's still "widely" used :/

floreo avatar Nov 20 '16 18:11 floreo

I would consider to include a minimal installation of PHPMailer to ProFTPd-Admin which means the files class.phpmailer.php and class.smtp.php, no languages, no extras. That would give the basic ability to send mails. The next step is to write a wrapper so there is only one internal function one needs to call when sending an email.

ChristianBeer avatar Nov 21 '16 08:11 ChristianBeer

Alrighty then, I'll give it a try :)

floreo avatar Nov 21 '16 11:11 floreo

Please do it, I would use this.

https://www.bountysource.com/issues/36222827-feature-request-email-for-new-users

neutrinus avatar May 29 '17 09:05 neutrinus

Hello to all. How about this request ? Is possible to add it ?

linuxmangr avatar Nov 30 '18 06:11 linuxmangr