.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

Duplicate emails are being sent

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :SharePoint
Hello I am using SPutility.SendEmail method to send the email to the particular recipient internally using case statement. I mean depending on the dropdown selection I am sending email by making the selected values in case statement. Here the issue is the users are complaining that they are getting multiple emails for the same request. When I checked in my dev server the flow of the code is normal but not the same case with prod. The following is the code. case "mycase":                             {                                 StringDictionary headers = new StringDictionary();                                 headers.Add("from", fromemail);                                 headers.Add("to",   toemail);        

View Complete Post

More Related Resource Links

Out of box approval workflow sends duplicate emails



I am using the approval workflow that will trigger when a document major version is published.   The 'approver' may receive 2 email notices that the task has been assigned.  Then 'approver' may receive 2 emails that the task has been completed.  For one workflow task the 'approver' may get 5 emails (2 assign, 1 task changed, and 2 complete).  This is not consistant though.  Sometimes it is 1 assign, 2 task changed, and 1 complete   ....  or any combination!      

Has anyone had a similar issue with the out of the box approval workflow?   


Using sp_send_dbmail , bcc recipient is getting duplicate emails


Hi There,

             i am using sql server 2008 r2 , when i use sp_send_dbmail  , the blind copied recipient receives two emails if there are more than 1 recipient , can any one let me know how we can fix this.

Thank you.

SharePoint custom workflow sending duplicate task assigned emails


I'm running into an issue where a custom sequential workflow I've built in VS2010 is sometimes sending duplicate emails to the user to whom created tasks are assigned. Note: this is a Site workflow not a List workflow, in case that matters.

It's a pretty simple flow: i've got an InfoPath initiation form, and am using an OnWorkflowActivated workflow action to take the data from the form and popluate some workflow variables, then I've got a CreateTask workflow action that sets the AssignedTo value on the Task Properties, along with some other Task Property values.

The task gets created successfully in the task list, and in most cases a single email goes out to the person the task is assigned to. However, sometimes (and I haven't been able to figure out what is causing the difference) up to 3 duplicate messages are sent out, as well.

I've seen other posts in the forums where this sort of thing is happening with OOTB workflows ( this thread, for example: http://social.msdn.microsoft.com/Forums/en/sharepointworkflow/thread/66f94e07-a690-4166-aaeb-b7f5bc424fe4?prof=required). However, duplicate tasks are not being created (unless I'm missing the duplicates somehow -- they're not showing in the task li

How do I get the emails of all the members of a given group in ActiveDirectory - Need help



  I have a need to send out emails to all the people who are in a given group say "HR Department". I need to be able to get all the emails through a for loop and then as it retrieves I should send emails to them. Can some one please help me with the code

this is what I came up with but not sure how to go about writing a for loop to get all the emails in the given group.

public static string SendEmails(string loginName)
        string Department = "HR Department"
        string userName = ExtractUserName(loginName);
        DirectorySearcher search = new DirectorySearcher();
        search.Filter = String.Format("(SAMAccountName={0})", userName);
        //search.Filter = String.Format("(SAMAccountName={FAY ImprovmentForm})", userName);
        //LdapSearcher.Filter = string.Format("(&(objectClass=user)(department={0}))", Department); 
        //search.Filter = string.Format("(&(objectClass=group)(SAMAccountName=" + Department + "))", userName);

SPD workflow, emails sent for one user, not for the other


Good day,

I have a SPD workflow (WSS/2007) that take a date field from a document list and when that date occurs it sends an email.  If the date is in the past, it will send the email out right away.  It is working fine for one user, not for another.  Both users have the same permissions.  The workflow goes as follows:

ACTION: Set Variable: vTermdate to DocumentsNotificationDate
       then log Documents:Email Date to the workflow history list

CONDITION: if Variable: vTermdate is not Empty
ACTION: Log term not empty to the workflow history list

CONDITION: if Variable: vTermdate is Empty
ACTION: Set Variable: vTermdate to N/A

ACTION: Add 0 minutes to Documents:Email Date (out to

Duplicate column names from forms in SharePoint lists



I'm in the process of migrating from a WSS 2 site to WSS 3/MOSS. On the old site I used an Infopath 2003 form for absence requests. During the migration I now use Infopath 2007. There wasn't any problem initially when the form was stored with the SharePoint form library. However, when I published the form as a content type from Infopath 2007 and then added that content type to the form library, there are two columns for each piece of data from the form. (One from the content type and one from the form list.) I relinked each old form (list content type) to the new AbsenceRequest content type and removed the original one from the list. However, the duplicate column names are still there. Since they came from the Infopath form, they are not editable or deletable from the SharePoint list management interface. The duplicate column names make it tough to build views since it isn't apparent which column to use in the form building UI. It can be determined form the overview display, but it is very cumbersome.


Does anyone know a way to get rid of the old, absolute, columns?

Email enabld list delay on recieving emails


So the situation is, i have a list, that receives emails from a particular account all day long, recently it has started recieving emails "late" being it will mass process emails at various times of the day. Before it proccessed them as soon as they were received.

Event log shows

A critical error occurred while processing the incoming e-mail file C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml. The error was: The process cannot access the file 'C:\Inetpub\mailroot\Drop\e472144001cb44a40000001e.eml' because it is being used by another process..


Have this error everywhere.

        -Restarted SMTP

        -Restarted IIS

It seems SMTP is having issues but wanted to come here and get some insight.


-I havent changed anythign recently except new cable runs to the switch

-There is no mail in the (Drop, Mailbox,Pickup, Queue) folders

-mail setup settings are

              -incoming is set to "Advanced" , no,  server.domain.com

Outgoing is my exange server.



smtp server 5.1 in xp not sending emails


hi iam using asp.net 2.0 with c#.net.

in my application when client completes its shopping email will goes to user this works fine when there is internet connection is working fine,
if  there is some problem  in internet connection if one mail stops then all the mails will be stopped even now internet works fine,

how to resend the emails using smtp server, is there any option to resend the emails automatically when internet works fine.

can you give example which helps me.

>>>Check duplicate while inserting record from Texbox.

Hi, On inserting record, I want to check that for example if a user enters a telephone number for any record is already in the database then it should validate that the number already exists in table and you cannot enter a duplicate value. Then if user will provide some other telephone number then he allows to insert record. For insertion of record I used ObjectdataSource. User will enter telephone number in a simple textbox. I may want to inform that I am working in asp.net2.0 and also not allowed to use any third party control or ajaxtoolkit. Any idea would be appreciated.

.net 3.5 in conjunction with CRM 4.0 email router adding code to subject line of emails causing spam

We use CRM 4.0, which is using .net framework 3.5 SP 1.  Emails sent out of CRM go through and email router and the subject line of these emails is getting "=?us-ascii?Q? added to the beginning of the subject line and "?= added to the end of the subject line. This is causing a large amount of our emails getting spammed. I was told by the CRM support that this is an issue with .net 3.5 and won't be fixed until .net 4.0, which CRM won't support for another year.  Is there not a .net 3.5 patch that can address this?

Duplicate constraint name

I have a 3.5 SDF file which contains duplicate FK constraint names. Is this a known bug? CONSTRAINT_TABLE_NAME CONSTRAINT_NAME UNIQUE_CONSTRAINT_TABLE_NAME UNIQUE_CONSTRAINT_NAME UPDATE_RULE DELETE_RULE Users_Log_Communications Users Users PK_Users Users_Log_Sensors Users Users PK_Users  From BOL: constraint_name The name of a constraint. The constraint_name is optional and must be unique within a database. If a constraint_name is not specified, SQL Server Compact 3.5 generates a constraint name. CASCADE CASCADE         Visit my SQL Compact blog - http://erikej.blogspot.com - Please mark as answer, if this was it.CASCADE CASCADE

SSRS Table hide duplicate by date

Hi, I am parikshit deshpande i am working in SSRS 2005 from last three months. I am trying to solve this problem please help me for that, I have one table as per  Date                     Shift                               Tons                       Passes 1/1/2009            Day                                    Formula                  Formula 1/1/2009           Swings                            1/2/2009           Day 1/2/2009     &nb

How do you add duplicate fields to a SSRS custom report and receive differtent output values.

I have built a custom report in SSRS 2008 using fields for supplier and customer.   I have added a Parent Row Group using the Supplier field for the group expression and used the Customer Details as my child details group. This returns a list of all customers for each supplier.   (Supplier | = Customer details ( Name, Dob etc.)   How would I add an additional Supplier field to the customer details returning only values for other Suppliers used by a customer, not the value of the Supplier listed in the Parent Group?

Duplicate records find in table

  Hi ALL, I want to find the dynamically check the primary key values and remove the duplicate records.. please suggest it.   Regards Ram

Duplicate columns names not allowed - OPENQUERY - OPENROWSET - Error 492

I have a piece of code below which manipulates incoming XML. I understand why it is failing in SQL2005, due to the duplicate name "Process". What i dont understand is why this works fine in SQL2000? We are trying to migrate from SQL2000 to SQL2005 and even if we run SQL2005 in 8.0 compatibility mode we still get the error. Why does it work in SQL2000 and is there anyway to emulate this behaviour in SQL2005? I really do not want to work through +-600 SPs to see if I need to change anything. Thank You declare @Event varchar(255) declare @XML varchar(3000) set @event = '' set @xml = '<OmegaEvent Process="NEWBUSINESS" Type="APPFORM" DateTimeStamp="2010-09-02T06:06:43" Version="3.0"> <APPFORM> <BUSSUNIT>AN</BUSSUNIT> <CATEGORYDESC> </CATEGORYDESC> <CHECKDIGIT>B</CHECKDIGIT> <CLIENTSTATUS> </CLIENTSTATUS> <CONVERSION> </CONVERSION> <DISTRCHANNEL> </DISTRCHANNEL> <EVENTDATE>20100902</EVENTDATE> <EVENTTIME>60643528960</EVENTTIME> <FINALISOR>N</FINALISOR> <FORM>MIFU</FORM> <FORMNAME>MAX INCOME COMPULSORY</FORMNAME> <INTERMEDCODE> </INTERMEDCODE> <MAIL_CAMPAIGN> </MAIL_CAMPAIGN> <POLICYNO>016058558</POLICYNO> <PROCESS>ICC</PROCESS> <PR

Best Way to Send Multiple Emails

I'm building a website that allows users to post comments. When they do, they can check a box that indicates if they want an email notification when someone else posts a comment under the same topic. (Similar to this web site.)This means when a comment is posted, the code has to send an email to all the subscribed users.My concern is about what happens when many users are subscribed to a topic. There is a short delay when sending an email. Sending dozens or potentially even hundreds could really cause a delay.Right now, I just loop through each user and send the emails one by one. Does anyone know if that's the best way?Thanks!

Duplicate URLs in Source Parameter of Query String for All SharePoint Lists

After performing a database attach method of upgrading our existing web application from MOSS 2007 to SharePoint Server 2010, all of our lists that migrated now exhibit an interesting but undesirable behavior.  The DispForm.aspx and EditForm.aspx pages that get loaded are given the Source parameter of the query string but instead of the URL being a single entry like: Source=http://sharepointsite.domain.com/Pages/Default.aspx It winds up putting the URL twice like this: Source=http://sharepointsite.domain.com/Pages/Default.aspx,http://sharepointsite.domain.com/Pages/Default.aspx Naturally this makes processing of the form -- either by choosing OK or Cancel buttons -- result in an HTTP 404 error.  The question we're left with is how in the world did the Source parameter get set that way to begin with.   It wasn't that way in 2007. We had thought that perhaps there was something that didn't migrate over correctly for the existing lists, so I tried creating a new list and then added a new item to the list.  So far so good.  Then attempted to Edit Properties or Edit Item or even View Item, etc. -- essentially triggering the load of the EditForm.aspx and DispForm.aspx  -- and we received the 404 again.  At this point we're not sure what's going on or how to fix it.  We've performed the migration three times so far with t
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