Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Evan 344 posts 99 karma points
    Jul 27, 2009 @ 16:57
    Evan
    0

    Writting a newsletter engine...

    I am writting a newsletter engine based off of the mail engine for umbraco v4.  So far it is working pretty nicely where I can create the newsletters and send them out to my group, now I need to have the ability to have people come to the site and join the email list.  They need to enter their email address and name, and then they will be added the the members section.  Then they need to be added to the newsletter group dynamically.  How can I achieve this?

  • Comment author was deleted

    Jul 27, 2009 @ 17:06

    Hi Evan, check out this post: http://www.nibble.be/?p=20 (for creating members)

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Jul 27, 2009 @ 17:21
    Paul Sterling
    1

    Evan -

    Here's a snippet from a simple Member creation routine we use frequently where we also add the new Member to a specific Member Group - like "NewsletterMember."

    string pwd = Membership.GeneratePassword(8, 1);
    string memberType = "your type";
    string memberGroup = "your group";
                           
    Member m = Member.MakeNew(encEmail, encEmail, MemberType.GetByAlias(memberType), new umbraco.BusinessLogic.User(0));

    m.Password = pwd;

    MemberGroup Group = MemberGroup.GetByName(memberGroup);
    if (Group != null)
      m.AddGroup(Group.Id);

    m.Save();

    -Paul

Please Sign in or register to post replies

Write your reply to:

Draft