Asked by:
Simple E Mail Notification after Signing up for Membership

Question
-
User-1512203029 posted
HI
Can some one Help me in sending a e mail once someone has signed up for account
I want the Admin to approve of Member all I want is a e mail sent to me when some one signs up for membership.
I hope some one can help.
Thanks
Keep Smiling
Baba
Saturday, January 17, 2009 9:02 PM
All replies
-
User1566012831 posted
The SmtpClient class is what you're looking for: http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx
Saturday, January 17, 2009 9:16 PM -
User-1512203029 posted
Hi Rick
Thanks for this information What I am looking for is to use the notification in the Maintenance.cs to send a pending membership just like when a stone is pending posting.
Please enlighten me if you know of this way.
Thanks
Keep Smiling
baba
Wednesday, January 28, 2009 11:28 PM -
User1836100399 posted
A simple solution would be to modify your register.aspx.cs to send you and email upon completion of the signup process.
You can add a function to your "CreateUserWizardControl_CreatedUser" and have it send you an email once the user is created.
I used vb to do it and it is working for me...here is an example of my code.
CallAdminNotify(username)
from the CreateUserWizardControl_CreatedUser, right before the End If
then create the following:
Public Sub AdminNotify(ByVal newuser As String)
Dim objMail As New MailMessage()
Dim adminEmail As String
adminEmail = SiteSettings.GetSharedSettings().SiteEmailAddress
objMail.From = newuser@yoursite.com
objMail.To = adminEmail
objMail.Subject = "A new user has registered."
objMail.Body = "A new user has registered on YourSite.com." + "<br>" + "Their username is: " + newuser
objMail.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "yourhostingsite.net"
SmtpMail.Send(objMail)That should give you a simple way to get the new users as they are created.
Sunday, May 24, 2009 11:55 PM -
User-1512203029 posted
HI
Thank you very much for this code.
The problem is that I am using C# and I would like to have C# code for this.
This is what I was looking for a long time but have not been able to get it. So thanks.
I want to hard code the whole thing so When sone one registers I get a e mail that it happens with the Name and E Mail the user used to Create the account.
Thanks
LondonBaba
Monday, May 25, 2009 5:00 PM -
User1058130597 posted
Hi LondonBaba ,
You can easily Send Email in asp.net using c#. Just after the user registration completes you can send the email to the user. Further you can set the email address and smtp credentials in the web.config file and extract the email sending credentials from web.config file in asp.net
Hope this helps. Please feel free to ask if the problem persists or if any help is required. Thanks. Happy Programming!
Wednesday, June 10, 2009 1:14 AM