Send email to user on creation

Please post here if you have problems in using Wing FTP Server.
Post Reply
floppy
Posts: 2
Joined: Thu Nov 13, 2025 9:55 am

Send email to user on creation

Post by floppy »

Hello everyone,

When i create a new user i would like to have a formatted email to be sent automatically to him containing the password and other information.
In event manger there is no trigger for it, and i do not see how i could do it. I'm on the latest version of ftp server available (8.0.6)

Can anybody help?
FTP
Site Admin
Posts: 2144
Joined: Tue Sep 29, 2009 6:09 am

Re: Send email to user on creation

Post by FTP »

Do you want to send email after adding a user account? If so, you may modify the file "webadmin/service_add_user.html" or "webadmin/admin_adduser.html", find the line:

AddUser(domain,user)

And insert the following code below that line:

Code: Select all

if user.note_email ~= nil and user.note_email ~= "" then
	local strContent = "Please check your account name and password below.<br><br>Username: <b>"..user.username.."</b><br>Password: <b>"..user.password.."</b>"
	c_SendMail(user.note_email,"Your account name and password",strContent,"","SMTP_CONFIG",true)
end

Here, user.note_email is the email address defined at "User -> Notes -> Email address". And SMTP_CONFIG is the SMTP configuration name, you can add a SMTP configuration at "Server > Settings > SMTP configuration manager".
floppy
Posts: 2
Joined: Thu Nov 13, 2025 9:55 am

Re: Send email to user on creation

Post by floppy »

thanks fo the info. Can i ask you if there's an encrypt feature for c_sendmail or if anyone figured out how to encrypt the email going trough exchange online?
FTP
Site Admin
Posts: 2144
Joined: Tue Sep 29, 2009 6:09 am

Re: Send email to user on creation

Post by FTP »

There is no encrypt feature for c_SendMail, only you can enable "TLS/SSL" for SMTP configurations.
Post Reply