Last post Sep 24, 2012 09:58 PM by Dino He - MSFT
Sep 13, 2012 07:24 AM|masterdineen|LINK
I am using a createuserWizard and have amended it so the username is the email address. I have deleted the email address text box and is working up to now. I have created a confirmation email with the below code.
Protected Sub CreateUserWizard1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles CreateUserWizard1.SendingMail
Dim userInfo As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)
'Construct the verification URL
Dim verifyUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & Page.ResolveUrl("~/Verify.aspx?ID=" & userInfo.ProviderUserKey.ToString())
'Replace <%VerifyUrl%> placeholder with verifyUrl value
e.Message.Body = e.Message.Body.Replace("~/Verify.aspx", verifyUrl)
when i test i get the following error
((( The specified string is not in the form required for an e-mail address. ))))))))
I know my web config file setup correctly with my smpt details.
How do i dynamically make the username (email address) as the TO field.
Sep 24, 2012 09:58 PM|Dino He - MSFT|LINK
Congratulations! Im glad to know that you have solved this issue by yourself, and it will be very appreciated to share your solution to us,
It could be helpful for others who have similar problems, and welcome to post your question on this forum in your future programming.