本文整理汇总了C#中Bobs.Usr.SendWelcomeEmail方法的典型用法代码示例。如果您正苦于以下问题:C# Usr.SendWelcomeEmail方法的具体用法?C# Usr.SendWelcomeEmail怎么用?C# Usr.SendWelcomeEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bobs.Usr
的用法示例。
在下文中一共展示了Usr.SendWelcomeEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSkeletonUserAndSendWelcomeEmail
private static Usr CreateSkeletonUserAndSendWelcomeEmail(Usr invitingUsr, string email, string nickName, Group invitingGroup, string inviteMessage, bool invitedViaContactImporter)
{
Usr u = new Usr();
Random r = new Random();
u.DateTimeSignUp = DateTime.Now;
u.DateTimeLastAccess = DateTime.Now;
u.DateTimeLastPageRequest = DateTime.Now;
u.IsSkeleton = true;
u.Email = Cambro.Web.Helpers.StripHtml(email);
u.EmailDateTime = DateTime.Now;
if (HttpContext.Current != null)
u.EmailIp = Utilities.TruncateIp(HttpContext.Current.Request.ServerVariables["REMOTE_HOST"]);
u.LoginString = Cambro.Misc.Utility.GenRandomText(6, r);
u.RandomNumber = r.NextDouble();
u.IsAdmin = false;
u.LoginCount = 0;
u.FirstName = "";
u.LastName = "";
u.NickName = Cambro.Web.Helpers.StripHtml(nickName);
u.Mobile = "";
u.AddressPostcode = "";
u.SendSpottedEmails = true;
u.UpdateLargeEvents = 5000;
u.UpdateSendBuddies = false;
u.UpdateSendGenericMusic = false;
u.SendSpottedTexts = true;
u.SendFlyers = true;
u.SendInvites = true;
u.SendPartnerEmails = false;
u.SendPartnerTexts = false;
u.IsEmailVerified = true;
if (invitingUsr != null)
u.AddedByUsrK = invitingUsr.K;
if (invitingGroup != null)
u.AddedByGroupK = invitingGroup.K;
u.InvitedViaContactImporter = invitedViaContactImporter;
u.Update();
u.SendWelcomeEmail(invitingUsr, invitingGroup, inviteMessage);
u = new Usr(u.K);
return u;
}