| | #1 (permalink) | |||||||||||
| EduCanDo a La Competencia Ingreso: junio-2008 Ubicación: Con Tu Novia
Mensajes: 223
Poder: 56 ![]() ![]() ![]() | Así llega el correo : http://img510.imageshack.us/my.php?image=maileh5.jpg SERVIDOR 1- Agregamos esta cls al servidor (Ctrl D y seleccionan el archivo) [Solo Miembros registrados ven los enlaces. ] 2- Creamos un modulo con este contenido: Código:
Option Explicit
Dim oMail As clsCDOmail
Public Function EnviarCorreo(ByVal UserNick As String, ByVal UserMail As String) As Boolean
Set oMail = New clsCDOmail
With oMail
.Servidor = "smtp.gmail.com"
.Puerto = 465
.UseAuntentificacion = True
.SSL = True
.Usuario = "USUARIO GMAIL (SIN @gmail.com)"
.PassWord = "CONTRASEÑA DE GMAIL"
.Asunto = "Recuperación de claves del personaje " & UserNick
.De = "NOMBRE DEL ENVIANTE"
.Para = UserMail
.Mensaje = "La contraseña de tu personaje es " & ObtenerPassword(UserNick)
If .Enviar_Backup Then
EnviarCorreo = True
Else
EnviarCorreo = False
End If
End With
Set oMail = Nothing
End Function
3- Agregamos esto al final del modulo Base Código:
Public Function ComprobarCorreo(ByVal Name As String, Correo As String) As Boolean
Dim tempCorreo As String
Dim RS As New ADODB.Recordset
Set RS = Con.Execute("SELECT * FROM `charinit` WHERE IndexPJ='" & IndexPJ(Name) & "'")
If RS.BOF Or RS.EOF Then Exit Function
tempCorreo = RS!Email
If Len(tempCorreo) = 0 Then Exit Function
Set RS = Nothing
ComprobarCorreo = (tempCorreo = Correo)
End Function
Public Function ObtenerPassword(ByVal Name As String) As String
Dim RS As New ADODB.Recordset
Set RS = Con.Execute("SELECT * FROM `charflags` WHERE Nombre='" & UCase$(Name) & "'")
If RS.BOF Or RS.EOF Then Exit Function
If Len(RS!PassWord) > 0 Then ObtenerPassword = RS!PassWord
Set RS = Nothing
End Function
4- Buscamos: Código: Case "NLOGIO" Y arriba agregamos: Código: Case "RECUPE"
rdata = Right$(rdata, Len(rdata) - 6)
If ComprobarCorreo(ReadField(1, rdata, Asc(",")), ReadField(2, rdata, Asc(","))) = True Then
If EnviarCorreo(ReadField(1, rdata, Asc(",")), ReadField(2, rdata, Asc(","))) Then
Call SendData(ToIndex, UserIndex, 0, "ERREl email ha sido enviado correctamente")
Else
Call SendData(ToIndex, UserIndex, 0, "ERREl email no pudo ser enviado")
End If
Else
Call SendData(ToIndex, UserIndex, 0, "ERREse correo no es del personaje " & ReadField(1, rdata, Asc(",")))
End If
Exit Sub
1- Agregamos este formulario al cliente (Ctrl D y seleccionan el archivo) [Solo Miembros registrados ven los enlaces. ] 2- Vamos al codigo del frmConnect , y reemplazamos todo el Private Sub imgGetPass_Click() por este: Código: Private Sub imgGetPass_Click()
If frmMain.Socket1.Connected Then frmMain.Socket1.Disconnect
If frmConnect.MousePointer = 11 Then
frmConnect.MousePointer = 1
Exit Sub
End If
EstadoLogin = RecuperarPass
Me.MousePointer = 11
frmMain.Socket1.Connect
End Sub
Código: ElseIf EstadoLogin = Dados Then
frmCrearPersonaje.Show
Código: ElseIf EstadoLogin = RecuperarPass Then
frmRecupera.Show
*Buscamos en todos los lugares: Código: UserPassword = MD5String(aux) Y reemplazamos por: Código: UserPassword = aux Código: Call SendData("PASS" & MD5String(Me.PasswdViejo) & "," & MD5String(Me.PasswdNuevo))
Código: Call SendData("PASS" & PasswdViejo & "," & PasswdNuevo)
Testeado y 100 % funcional. Fuente : Gs-zone.
__________________ "El año ya se va, porque no me aguanta más". | |||||||||||
| |
| Sponsored Links |
![]() |
| Marcadores |
| Herramientas | |
| Desplegado | |
|
|
Te recomendamos visitar estos sitios
|