Here are some suggestions:
1. How would I go about sending a confirmation email after a new registration without using the existing registration widget? In other words, what's the namespace/api for sending confirmation emails.
One easy approach would be to replace the default User service with a custom one, that inherits from teh default service. this will allow you to implement the IUsers interface and take advantage of the CreateUser public method. Here's an example of the custom service. Simply add a class file to you project wtih the following code in it:
WcfMembershipUser CreateUser(WcfMembershipUser user,
//you can get ahold of the created user from the User parameter of the method
var myUser = user;
.CreateUser(user, userId, provider);
Then in the Users.svc file, located under /Services, change the declaration to point to your custom service (UsersServiceCustom is the name of my custom service class):
Now, having this allows you to execute your own logic whena user is created and you have access to the user parameter (for example yuo can get the user email from it). Here's a sample code for sending emails with Sitefinity:
var smtpSettings = Config.Get<SystemConfig>().SmtpSettings;
MailMessage message =
StringBuilder sb =
"You have been registered"
message.Body = sb.ToString();
message.BodyEncoding = Encoding.Unicode;
message.SubjectEncoding = Encoding.Unicode;
2) Alternatively, how would I go about adding "sign up to the newsletter" as part of the registration widget?
You will find attached a modified Registration form control with a custom template, where I've added a checkBox, and depending on whether this checkBox is checked, I'm adding the user to a mailing list.
All the best,
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items