Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 535785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:45:12+00:00 2026-05-13T09:45:12+00:00

I am currently building a tool which creates SharePoint sites automatically. Each site must

  • 0

I am currently building a tool which creates SharePoint sites automatically. Each site must have a mailbox enabled and a specific Email address specified.

I can create the site which by default has a SharePoint list named “mailbox”.

My questions is how to I allow the “mailbox” SPList to receive email. There is a property within an SPList called CanReceiveEmail but this is Read-only? So is there another way?

I also need to be able to set the Email address of the SPList programtically, does anyone know the best way to do this?

It can be done manually but this is not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:45:12+00:00Added an answer on May 13, 2026 at 9:45 am

    A simple list (as far as I know but I may be wrong) does not have the ability to receive emails. You can create a custom list that does.
    You can create a document library, which by default has this ability.

    How these properties are set, you can see when you examine the code (using Lutz Roeder’s Reflector, http://www.red-gate.com/products/reflector/) of /_layouts/EmailSettings.aspx which can be found in “Microsoft.SharePoint.ApplicationPages.dll” found on your server in path something like
    \\server\c$\Inetpub\wwwroot\wss\VirtualDirectories\80\_app_bin.
    So you will have to set multiple properties of the “rootfolder” of the document library.

    The code is as follows :

    Protected Sub SubmitButton_Click(ByVal sender As Object, ByVal args As EventArgs)
        If Me.EnabledTrue.Checked Then
            If ((Me.TxtAlias.Text Is Nothing) OrElse (Me.TxtAlias.Text.Length = 0)) Then
                Throw New SPException(SPResource.GetString("MissingEmailAlias", New Object(0  - 1) {}))
            End If
    
            'This will be the receiving e-mail address
            Me.m_List.EmailAlias = Me.TxtAlias.Text
    
            'do we need to check users permissions on items
            Me.m_RootFolder.Properties.Item("vti_emailusesecurity") = IIf(Me.UseSecurityTrue.Checked, 1, 0)
    
            If Me.ShowSaveAttachments Then
                'options how to save attachments, root folder, grouped, whatever
                Me.m_RootFolder.Properties.Item("vti_emailsaveattachments") = IIf(Me.SaveAttachmentsTrue.Checked, 1, 0)
            End If
            If Me.ShowSaveOriginalAndMeetings Then
                Me.m_RootFolder.Properties.Item("vti_emailsavemeetings") = IIf(Me.MeetingsTrue.Checked, 1, 0)
                Me.m_RootFolder.Properties.Item("vti_emailsaveoriginal") = IIf(Me.SaveOriginalTrue.Checked, 1, 0)
            End If
    
            If Me.ShowAttachmentFolders Then
                Me.m_RootFolder.Properties.Item("vti_emailoverwrite") = IIf(Me.OverwriteTrue.Checked, 1, 0)
                If Me.AttachmentFoldersSender.Checked Then
                    Me.m_RootFolder.Properties.Item("vti_emailattachmentfolders") = "sender"
                ElseIf Me.AttachmentFoldersSubject.Checked Then
                    Me.m_RootFolder.Properties.Item("vti_emailattachmentfolders") = "subject"
                Else
                    Me.m_RootFolder.Properties.Item("vti_emailattachmentfolders") = "root"
                End If
            End If
            If Me.ShowAutoApprove Then
                'I think this is something when content approval is enabled.
                Me.m_RootFolder.Properties.Item("vti_emailautoapprove") = IIf(Me.AutoApproveTrue.Checked, 1, 0)
            End If
        ElseIf Me.EnabledFalse.Checked Then
            Me.m_List.EmailAlias = Nothing
        End If
        Me.m_RootFolder.Update
        Me.m_List.ResetContentTypes
        Me.m_List.Update
        SPUtility.Redirect((IIf((Me.m_List.BaseType = SPBaseType.Survey), "survedit", "listedit") & ".aspx?List=" & Me.m_List.ID.ToString), SPRedirectFlags.RelativeToLocalizedLayoutsPage, Me.Context)
    End Sub
    

    EDIT: added comments to my code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a site which currently uses javascript from several sources: Group 1:
I'm currently building a tool that will have to match filenames against a pattern.
I am currently building in Version 3.5 of the .Net framework and I have
I am currently building a web site and I just implemented SqlCacheDependency using LinqToSQL
I'm currently in the process of building a CRUD tool for an existing Spring-based
I have spent a few days on a personal productivity tool and am currently
Possible Duplicate: Do you know tool building tree of include files in project\file? Currently
I'm currently building a site that allows previewing photos and videos using Shadowbox. I'm
I'm currently building a portfolio site for a client, and I'm having trouble with
I'm currently creating an admin tool for a new project which I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.