Hi,
I have a form in user control(.ascx) after submitting on submit button it should call API for Authentication it should give me a session ID(The session id expires in 30 mins) using that session Id i need to call one more API and send an email to specific mail ID.
Please help me how can i proceed.
Here are API examples:
Email Notification:
var msg = new EmailMessage(); var eti = EmailTemplateProvider.GetEmailTemplate("CourseRequestNotification", SiteContext.CurrentSiteID);
if (eti == null) { EventLogProvider.LogException(this.GetType().Name, "NotifyCourseRequest", new Exception("Email template does not exist.")); return; } var mcr = MacroResolver.GetInstance(); mcr.SetNamedSourceData("user", request.Username); mcr.SetNamedSourceData("url", URLHelper.GetAbsoluteUrl(request.CourseNodePath)); mcr.SetNamedSourceData("course", request.CourseName); msg.EmailFormat = EmailFormatEnum.Html; msg.From = eti.TemplateFrom; msg.BccRecipients = eti.TemplateBcc; msg.Recipients = SettingsKeyInfoProvider.GetValue(SiteContext.CurrentSiteName + ".CourseRequestEmail"); msg.Subject = eti.TemplateSubject; EmailSender.SendEmailWithTemplateText(SiteContext.CurrentSiteName, msg, eti, mcr, true);
Sounds like you are trying implement a registration process where you create a user and send a registration email with Authentication Token so user can click on it and be automatically logged in to your site?
Please, sign in to be able to submit a new answer.