Thread: Smtp
View Single Post
  #4 (permalink)  
Old November 1st, 2008, 12:50 AM
teddyk teddyk is offline
Authorized User
 
Join Date: Jul 2008
Location: Cape Town, Western Cape, South Africa.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

here's the code:

 Protected Sub CreateUserWizard1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles CreateUserWizard1.SendingMail
    ' Customize the mail body by replacing the placeholders in the static mail body file with actual values.
    e.Message.Body = e.Message.Body.Replace("##Id##", Membership.GetUser(CreateUserWizard1.UserName).Pro viderUserKey.ToString())
    e.Message.Body = e.Message.Body.Replace("##UserName##", CreateUserWizard1.UserName)

        Dim applicationFolder As String = Request.ServerVariables.Get("SCRIPT_NAME").Substri ng(0, Request.ServerVariables.Get("SCRIPT_NAME").LastInd exOf("/"))
        e.Message.Body = e.Message.Body.Replace("##FullRootUrl##", Helpers.GetCurrentServerRoot & applicationFolder)
  End Sub

supertedz
Reply With Quote