<%Response.Flush()%> Laboratoire de DendroÉcologie
<% Dim user,email,sEmail user=Request("user") email=Request("email") sEmail=Request("sEmail") If sEmail<>"" then '--- Recherche du password en fonction du USERNAME dans la BD 'Dim objRS, SQL SQL = "SELECT * FROM tbl_Users WHERE Usager ='"&UCASE(user)&"';" SQL = "SELECT * FROM tbl_Users WHERE Courriel ='"&UCASE(sEmail)&"';" 'Response.Write SQL Set objRS = Server.CreateObject("ADODB.RecordSet") objRS.open sql, objConn If objRS.EOF Then email=False Response.Write "
" & vbCrLf Response.Write "
 Invalid e-mail! 
 
" & vbCrLf Response.Write "

" & vbCrLf Response.Write "

Forgot your access! Please enter your e-mail

" Response.Write "

Click HERE to try again

" Else email=True sPassword = objRS.Fields("MotPasse") sEmail=objRS.Fields("Courriel") End If 'objRS.close If email then '--- Envoi d'un courriel r l'usager pour lui faire part de sa réservation 'Declaration des variables Dim sMsg Dim sTo Dim sFrom Dim sCc Dim sBcc Dim sSubject Dim sTextBody sTo=sEmail sFrom = "igor.drobyshev@uqat.ca" sCc = "lesieur.daniel@uqam.ca" sSubject = "Mot de passe Labo dendro - Dendro lab password" strEmailMsg="" strEmailMsg = "

Voici votre nom d'usager pour accéder aux sections réservées du site de réservations du labo de dendro.

" strEmailMsg = strEmailMsg & "Username:"&objRS("Usager")&"
Password:"&objRS("MotPasse")&"

" strEmailMsg = strEmailMsg & "

Bonne navigation! Igor Drobyshev.

" strEmailMsg = strEmailMsg & "

SVP, veuillez ne pas répondre à ce courriel.

" '--- Create the mail object Dim objMail '--- Create the mail object Set objMail = Server.CreateObject("CDO.Message") '--- Set key properties objMail.From = sFrom objMail.To = sTo objMail.Cc = sCc objMail.Subject= sSubject objMail.HTMLBody = strEmailMsg objMail.Configuration.Fields.Item _ ("https://schemas.microsoft.com/cdo/configuration/sendusing")=2 '--- Name or IP of remote SMTP server objMail.Configuration.Fields.Item _ ("https://schemas.microsoft.com/cdo/configuration/smtpserver")="courrier.uqat.ca" '--- Server port objMail.Configuration.Fields.Item _ ("https://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 objMail.Configuration.Fields.Update '--- Envoi du courriel objMail.Send '--- Clean-up Set objMail = Nothing Response.Write "
Un courriel a été envoyé à votre adresse avec votre nom d'usager et votre mot de passe.
" & _ "
E-mail with username and password has been send successfully to your address!
" Response.Write "
" End if Else %>

Vous avez oublié votre acces! Veuillez entrer votre adresse courriel. Un courriel vous sera automatiquement envoyé avec votre usager et mot de passe.

Forgot your access! Please enter e-mail address. An e-mail will be send automatically with username and password.

 

e-mail:


 
<% End if %>