Iron Speed Designer Help
 

Send Password by Email

Updated June 5, 2006
Iron Speed Designer V4.0 and later

This example sends a password by email. Please note that you need to implement a page with a button that calls this function with the appropriate email address and password.

Private Sub SendPasswordByEmail(ByVal emailAddress As String, ByVal password As String, ByVal Msg As String)

     'Get the information needed to construct and send the email

     Dim fromAddress As String = "Iron Speed Technical Support"

     Dim bccAddress As String = “support@ironspeed.com”

     Dim subject As String = "Your Password"

     Dim content As String = "Here is your information to sign into the Iron Speed online technical support site." & vbCrLf & _

          vbCrLf & _

          "URL: " & "http://www.ironspeed.com/support" & vbCrLf & _

          "User Name: " & emailAddress & vbCrLf & _

          "Password: " & password & vbCrLf & _

          Msg & vbCrLf & vbCrLf & _

          "After you sign in, you can change your password by going to the My Account page." & vbCrLf & _

          "Sincerely," & vbCrLf & "Iron Speed Technical Support."

 

     Try

          'Construct the email

          Dim email As New BaseClasses.Utils.MailSender()

          email.AddFrom(fromAddress)

          email.AddTo(emailAddress)

          email.AddBCC(bccAddress)

          email.SetSubject(subject)

          email.SetContent(content)

          'Send the email

          email.SendMessage()

     Catch e As System.Exception

     End Try

 

End Sub