Yes !!! I got it. Thank you very very much Imar !!! What a relief !
Here is what I have done finally based on your fantastic guidance .
================================================== ===================
Protected Sub CreateUserWizard1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles CreateUserWizard1.SendingMail
e.Cancel = True
Dim myfilePath As String = Server.MapPath("~/StaticFiles/OptInEmail.html")
Dim mymailBody As String = System.IO.File.ReadAllText(myfilePath)
Dim sc As New Net.Mail.SmtpClient()
sc.EnableSsl = True
mymailBody = mymailBody.Replace("##Id##", Membership.GetUser(CreateUserWizard1.UserName).Pro viderUserKey.ToString())
mymailBody = mymailBody.Replace("##UserName##", CreateUserWizard1.UserName)
Dim applicationFolder As String = Request.ServerVariables.Get("SCRIPT_NAME").Substri ng(0, Request.ServerVariables.Get("SCRIPT_NAME").LastInd exOf("/"))
mymailBody = mymailBody.Replace("##FullRootUrl##", Helpers.GetCurrentServerRoot & applicationFolder)
Dim mymailMsgobj As New Net.Mail.MailMessage("
[email protected]", CreateUserWizard1.Email, "Registration Confirmation", mymailBody)
mymailMsgobj.IsBodyHtml = True
sc.Send(mymailMsgobj)
End Sub
================================================== ===================
Thanks a lot for your great patience to tolerate me so long !
I can not express my gratitude in any other way. I will definitely seek help from you in this field in future.
Bye.
Ajoy.