.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Global Address List (GAL), enumerating the GAL and Dist. Groups, obtain email address

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
I have an application in which I need to populate a drop-down with names and email addresses from the Global Address List (GAL). If that is too much data (which it probably will be), I would then need to obtain a collection of same data (name/email address) from a Distribution List to populate the drop-down.   I have never done this sort of thing before, so I apologize for the vagueness, but can anyone point me in the right direction?  Thanks in advance.

View Complete Post

More Related Resource Links

Send email to address in a list

infopath form.  end users submits.  Manager gets and assigns to someone on team.  (no Task list involved) In the form there is a drop down pulled from a list of team member names (2 fields: Name and Email) Trying to create a workflow that will email the "assigned to" person.  I think its a workflow look up, but i am not connecting the final dots.  Can anyone direct me to a resource for: If assigned to is equal to "name on a list" use the email associated to the name in the same list thank you in advance..

Retrieving Global Address List from Exchange Server


Hi everyone,

This is my 3rd post, always getting great help from here.

My last two questions were about sending email through ASP.NET, and adding web form to that email body, which is working :)

This time my boss wants me to send email addresses from our exchange server global address list. :(

For example,

Dropdownlist for send from who,  Dropdownlist for recieving person...The behind values should be email addresses.

And this information should come from global address list on our exchange server.


I am very newbie to ASP.NET so please instruct me step by step, what is the steps I need to do, very specifically please.

Thank you advance!!!



Bad email address exception handling

 I have a form that used to send an email to someone who had posted  a listing on my site, with a copy to the sending user. The code below is intended to catch the exception that occurs when email address of the person posting the listing (TxtBxTo.Text) is not valid, and also intended to catch the (unlikely) event that the user has entered and confirmed an invalid email (TxtBxEmail.Text) for himself on the form. I have tested this code for all combinations of valid and invalid email addresses for the listing poster and the user filling out the form and sending the email Everything works fine except for the situation where the email address for the listing poster is valid but that of the user  is invalid. In this situation I am getting the message on the ConfirmResaleEmail.aspx page that says: "Your message has been sent to the contact person, with a copy to you. " when I should be getting "Woops, it looks like your own email failed when we tried to send you your copy. " I am hoping some sharp-eyed person can spot the problem.  Here is the code:         ' this sends email from a user with email TxtBxEmail to the contact perons listed in TxtBxTo        msg = New MailMessage(TxtBxEmail.Text, TxtBxTo.Text, TxtBxSubject.Text, sb.ToString())    &n

Is it possible to display the friendly name or email address of LiveID User Using Claims Authenticat

We have finally gotten LiveID authentication to work.  However when we specify a user to add to a sharepoint group, we need to do it via the unique id that live uses.   The user does login using their usual email address and password, but on the sharepoint side they see the PUID@live.com as the logged in user, and when we want to specify the user to have access to the a particular site or library, we have to do it by the same PUID@live.com.  This display makes it difficult to manager users on the sharepoint side.   Is there something I missed on setting up of the authentication provider, or is there something I can do to get sharepoint to retrieve the other information so that we can view the user through the email or full name that live provides?   Steve Paplanus

Email - From Address Problem

Hello All,I have a sample Email code - MailMessage Message = new MailMessage(); Message.IsBodyHtml = true; Message.To.Add(new MailAddress("TO@gmail.com","ToName")); Message.From = new MailAddress("FROM@abc.com","FromName"); Message.Subject = "Test Sub"; Message.Body = "This is Test!!!"; SmtpClient sc = new SmtpClient(); sc.UseDefaultCredentials = false; sc.Host = "smtp.gmail.com"; sc.Port = 587; sc.Credentials = new NetworkCredential("CREDENTIALS@gmail.com", "CredentialsPassword"); sc.EnableSsl = true; sc.Send(Message); When i Use this code - Email is going 100% successfully but, Insted of displaying from address as "FROM@abc.com" - it is displaying it as "CREDENTIALS@gmail.com".** From Name is displaying correctly.So the email in email Client is pretty confusing with this problem. Kindly suggest me some work arounds.FROM@abc.com

Calculating email address from AD Username in a form

I have  a change request form that has a requied filed where the user enters a valid username.  In my view for this form I want to display this users email address based their username but I when I look at calculated values the username files is not one that I can do calculations from.  Does anybody know how to do this sort of calculation?

InfoPath 2010 People Picker - Find Email Address

I am creating a form that uses the people picker to find information on a user but it doesn't appear to contain an email address for the user. I can create another form that uses a web service to connect to the SharePoint 2010 user profile service and pull back the current user details but I want to be able to send data from the people picker to fill in parts of the form with that users details (includiong email) and not the current user

Email address regular expression

I used the function below to validate email addresses. // Function to test for valid email address.         public static bool IsValidEmailAddress(String emailAddress)         {             Regex regex = new Regex(@"^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$");             Match match = regex.Match(emailAddress);             return match.Success;         } This regular expression works for amy.charles@test.com, but not robert.o'neil@test.com. Can anyone help me to modify the regulation expression, making it to valid for robert.o'neil@test.com Thanks in advance!

Require Unique eMail Address in CreateUserWizard?

I want my users' email addresses to be unique.  I have looked around and found various examples of code to add to the web.config file that all look similar to the following: <membership defaultProvider="CustomizedMembershipProvider"> <providers> <add name="CustomizedMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="xmxmxmxmm" requiresUniqueEmail="true" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" minRequiredPasswordLength="8" minRequiredNonalphanumericCharacters="1"/> </providers> </membership> However...whenever I add this to the web.config file and run the page with the CreateUserWizard I get the following error: Parser Error Message: Unrecognized configuration section membership. I am building a website based on .Net 3.5 using Visual Studio 2008. Does anybody know how I can add the <membership> section to the web.config so that these CreateUserWizard parameters can be added...or...is there another way of going about this altogether? Many thanks in advance...MDCragg

Subscription email using Load Balancer IP address instead of host name



     How to configure reporting services instance to use load balancer IP address as part of the URL generation before sending subscription emails?

Example: We have 4 resporting service instances routed through a load balancer. When an email subscription is triggered, the reporting server generating reporting URL is using host name as part of the report server URL. Instead, we would like to use load balancer IP so that when a user click the URL received in an email, will be routed through load balancer instead of hitting directly the reporting server URL.

 Any pointers on this?




Trying to download evaluation copy of Sharepoint but get redirected to email address verification pa


I am trying to download an evaluation copy of Sharepoint but get redirected to a page that says "Verify Ownership of your E-mail Address."  Specifically:

1. I log into Windows Live.

2. I go to http://technet.microsoft.com/en-us/evalcenter/ee388573.aspx

3. I make a selection in "Select a version to download", such as "SharePoint server for internet sites, Standard".

4.  I click on the "Get Started Now" button

At this point a redirect takes me to the page with heading "Verify Ownership of your E-mail Address." But I have already verified this, otherwise I couldn't log in to Windows Live, right?

Pass delivery method, email address to create SSRS subscription using VS2005



I have created SSRS reports and built a user UI to run these reports. Now when creating SSRS subscriptions in report Manager, is it even possible to programmatically pass the delivery method (email or file share), To email address, scheduled time and date, etc from my front-end UI to the Report Manager?

Any help will be greatly appreciated. Thanks

Create Visual Studio Workflow to send Email from another address


Hello All,

I have a requirement where i need to build a visual studio for sharepoint workflow where i can send email from different address as we have on the code plex like this..

http://spdactivities.codeplex.com/(Send Email Extended - Enhaced version of the OOTB activity. Allows you to specify the sender. Also does not break links in body.)


I need to achieve the same using Visual studio workflow.

I am a new bie to Visual studio workflow.Can anyone point me to any  good article to achieve it.\

Thank you



Can't update the Membership email address


In my update Membership account routine, I have the sub:

    Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
        'Update this account in the database
        Membership.GetUser.Email = TextBoxEmail.Text

        Membership.GetUser.ChangePasswordQuestionAndAnswer(HiddenFieldConfirmPassword.Value, TextBoxQuestion.Text, TextBoxAnswer.Text)

        Dim dcMembership As New MembershipDataContext()
        Dim vUserId As Guid = Membership.GetUser.ProviderUserKey
        Dim vMembershipRecord = dcMembership.wmsUsersPlus.SingleOrDefault(Function(x) x.UserID = vUserId)
        If vMembershipRecord IsNot Nothing Then
            vMembershipRecord.FirstName = TextBoxFirstName.Text
            vMembershipRecord.LastName = TextBoxLastName.Text
        End If
    End Sub

This sub runs successfully and everything is updated, including the membership question and answer, except the membership.getuser.email address which is not updated.

In de-bug mode, TextBoxEmail.text contains the updated email address but the membership record is not updated.

Conversely, I can get the current email address successfully earlier in the code with:

TextBoxEmail.text = Member

Retrieve user email address from text box


I have an Technical Service Request InfoPath form and an email alert needs to be sent to two users each time that the form is completed and submitted to a library. An email alert needs to be sent to our technical manager which is a relatively easy workflow to set up in SharePoint Designer. The other user which needs to be alerted is the engineer which could be one of six people (we only have one technical manager).

The person completing the form will have to enter the name of the engineer to whom the alert should be sent to. I am struggling to send an email to this user. Is there a way to associate an email address with the name which is entered? We could use drop down lists and need to automate this in some way.

We dont need to retrieve full user information from AD but just need the email address of the user whose name is captured in a Text Box named 'Engineer'.

Any suggestions or assistance would be greatly appreciated,

Many Thanks

Email address of currently logged in user


We are using Profile.FirstName and Profile.LastName to get current user's firstname/last name.

How do we get current user's email address?


how to configure the incoming email for external email address?



I would like to configure the incoming email for external email address. I have configured the incomig email for the address: library1@sp.myorg.loc Do you know how to set the email for library1@sp.mydomain.com ?

thanks in advance


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend