Servergrid UserLink

... connection ... education ... discovery ... information ...
Welcome to Servergrid UserLink Sign in | Join | Help
in
Home Blogs Forums Photos Downloads Servergrid Join Now Private Messages

Mailing Lists

Last post 12-11-2006, 9:14 AM by admin. 5 replies.
Sort Posts: Previous
  • Mailing Lists

     11-23-2006, 9:59 AM

    • Joined on 11-24-2006
    • Posts 7
    • Points 40
    • Top 25 Contributor

    Is there a good location to help me figure out how to subscribe people to a mailing list? I have created a mailing list but am unsure of what all of the features mean and how I can automate things. I am looking for a good manual to help me figure this one out. Any pointers would be muchly apreciated.

    Smile

     

  • Re: Mailing Lists

     11-23-2006, 3:04 PM

    Moderator
    Hi, assuming you create a mailing list with the address announce@domain.com, users can subscribe by sending an email to announce-subscribe@domain.com and unsubscribe by sending to announce-unsubscribe@servergrid.com.  You can automate this by generating these emails from your code, using a From address of the user you are subscribing or unsubscribing.  Detailed descriptions of the features available can be found here:

    http://servergrid.com/manual/mailing_lists.html


    Administration
    Servergrid - Windows Hosting Experts
    http://www.servergrid.com

  • Re: Mailing Lists

     11-24-2006, 3:38 PM

    Moderator
    • Joined on 11-24-2006
    • Posts 1
    • Points 6
    • Top 100 Contributor
    Below is some ASP.NET C# code you can use to control your mailing lists.




    using System.Net.Mail;

    /// <summary>
    /// Sends mail to specified list
    /// </summary>
    /// <param name="emailAddress"></param>
    private bool SendToServergridLists(string mailToAddress, string mailFromAddress)
    {
        // Sending to the lists is easy.
        // If you are having people subscribe/unsubscribe via
        // web forms, make sure that you have the
        // subscribe witout confirmation and unsubscribe without confirmation
        // boxes checked in the properties of your mailing list
        // in H-SPHERE. Also, you will probably want to enable sending
        // from the mailing list address.
        //
        // this example can be used in any case, to subscribe, unsubscribe,
        // or send to the list



        // set mail server
        SmtpClient cli = new SmtpClient("localhost");        // define the mail server
                                                            // if you are on Servergrid
                                                            // use localhost

        MailMessage myMessage= new MailMessage();            // Create a new Mail Message object
        myMessage.IsBodyHtml = false;                        // This isn't necessary

        try
        {
            // set the message properties

            // the TO will change depending on your intention
            // to subscribe, you want your TO address to be myList-subscribe@whateveryourdomainis.xx
            // your FROM should be the address you want added to the list
            // to unsubscribe, you want your TO address to be myList-unsubscribe@whateveryourdomainis.xx
            // your FROM should be the address you want removed from the list
            // to send an email to the people on the list you want your TO and FROM to be myList@whateveryourdomainis.xx

            myMessage.To.Add(new MailAddress(mailToAddress));    
            myMessage.From = new MailAddress(mailFromAddress);            
            myMessage.Body = string.Format("This is the message body");
            myMessage.Subject = "This is the message subject";

            // These next lines are essential to sending a message TO your list from a page

            // add a header describing the sending agent
            myMessage.Headers.Add("User-Agent", "ASP.NET");                                

            // define the sender, this is different than "From"
            myMessage.Sender = new MailAddress(mailFromAddress);

            // set the encoding for the message
            myMessage.BodyEncoding = System.Text.Encoding.ASCII;
            myMessage.SubjectEncoding = System.Text.Encoding.ASCII;

            cli.Send(myMessage);
        }
        catch (SmtpException stmpExp)
        {
            throw new Exception("Mail send failed due to smtp error: " + stmpExp.Message);
        }
        catch (Exception exp)
        {
            throw new Exception("Send failed : " + exp.Message);
        }

        myMessage.Dispose();

        return true;
    }

    Michael R. Czarnecki
    Senior Web Developer
    http://www.servergrid.com
    Get a quote on web development
    consulting@servergrid.com
  • Re: Mailing Lists

     12-11-2006, 4:25 AM

    • Joined on 12-11-2006
    • Posts 1
    • Points 7
    • Top 100 Contributor

    I have created a mailing list, now i dont want everyone to reply to the list and then it gets duplicated all over again.

    Specify which email addresses can use the mailing list, and prevent any other.

  • Re: Mailing Lists

     12-11-2006, 7:49 AM

    Moderator
    • Joined on 11-06-2006
    • Posts 72
    • Points 341
    • Top 10 Contributor

    The documentation at the following link will assist you with that. 

    http://www.servergrid.com/manual/mailing_lists.html

     

  • Re: Mailing Lists

     12-11-2006, 9:14 AM

    Moderator
    Rhizomes:

    I have created a mailing list, now i dont want everyone to reply to the list and then it gets duplicated all over again.

    Specify which email addresses can use the mailing list, and prevent any other.

    If you want to prevent new members from signing up without approval, the option to enable at the URL Brenda provided is "Subscription moderation" , or if you want to approve each individual message, enable both "Do not restrict posts based on SENDER address" and "Message moderation"


    Administration
    Servergrid - Windows Hosting Experts
    http://www.servergrid.com

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems