I created a login screen for my users, that they need to enter their login and password in order to enter the database. Now I am creating it so if they forget their password then it will email me that they need it reset. I am testing this code, which works in Excel:
I can't get it to work. It keeps crashing on the .Send line saying:
Application-defined or Object-defined error
PHP:
Sub emResetPassword()
Dim OL As Object, EmailItem As Object
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(0)
With EmailItem
.To = "Dblois@atalanta1.com"
.Body = "I forgot my Password - Please Reset it!"
.Subject = "Password Reset"
.Send
End With
Set OL = Nothing
Set EmailItem = Nothing
End Sub
I can't get it to work. It keeps crashing on the .Send line saying:
Application-defined or Object-defined error