.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

Send 2 emails (different) on CreateUserWizard1_CreatedUser

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net

I have a web application that allows a user to "join" our site.  When the CreateUserWizard completes, I just have the code below in the bottom of my wizard tags; and this works!

<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationUser.txt" Subject="Arts & Crafts Website - New Registration" >

I need to now add a second email that'll tell site admins that this particular user has requested access.  So the user gets an email saying "Thanks for registering... account is pending authorization"!  At the same time I need a second email to be sent to the site admins (just one email address) stating something like "A new user <%username%> has requested to join your site".  This is what I tried, but doesn't work:

<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationUser.txt" Subject="Arts & Crafts Website - New Registration" >
<MailDefinition BodyFileName="~/EmailTemplates/NewRegistrationSiteAdminAlert.txt" Subject="Arts & Crafts Website - New Registration" >

Of course this isn't working because the CreateUserWizard automatical

View Complete Post

More Related Resource Links

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!

How to automatically run code and send emails?

Hi all- I would like to have users set some parameters, then have routines run in the middle of the night and if the user parameters are met, have an automated email sent to update the user at various time intervals as set by user , ie daily, weekly, monthly, etc.) Can someone please point me in the right direction on how I go about doing this?    

Sharepoint 2010, Not able to send emails?




I have installed Sharepoint 2010 on Windows server 2008 with SQL 2008. The installation was successful and I am able to access Sharepoint but when I add users and try sending invitation email I get error message. I have setup all the email configuration setting on Sharepoint, i.e. provided the SMTP server name and outgoing and incoming email address but still getting the same error message. I thought there might be some SMTP issue, so installed Outlook and configured it and I am able to receive emails on outlook using the same SMTP server. Could someone help me on this?

Can't send SMTP to all emails


Hi, I can send email with my asp.net 2.0 to gmail and other domains with my local SMTP server, but if I try and send it to a cellphone like 5551234567@tmomail.net, the mail just gets stuck in the SMTP queue.  I can send a text message via email to that same email address with normal email.  For example, I can send an email through gmail or my company's server to the tmomail.net email, but I can't from my local SMTP server.  I can send email with my local SMTP server to other Internet and Intranet emails, just not the phone.  My local SMTP is working, security is for localhost only, just can't send to this address.

 Thanks for any help.

how to send emails to multiple persons at the same time from sharepoint workflow using visual studio


Hi Every one !!

   I am trying to send copy of a document for multiple directors at my client for their approval.

   The director can approve the document at the same time.

   Hence, I would like to know how to create a task to send emails for multiple people at the same time from a sharepoint workflow using visual studio 2008.

   I see there is a parallel activity. But it gives me only 2 paths ( means would be able to send only for 2 users )

   If creating a separate task to send emails for each user is an inefficient way, please let me know if there is another good way of sending emails to multiple users.


Thank you

Should Lotus Notes Client be running or Open in background to send emails programatically using .NET



Does Lotus notes client be running or opened in the background to send emails using Lotus Notes with .Net?

    I am working on a task where my app should send emails using Lotus Notes with .NET . I am able to send mails also. But the problem comes when i close my Lotus Notes mail and try to run my application which sends mails. But the mails are not being delivered. Reason, they were being stored in "Outgoing mail". Again when i open my Lotus Notes client by entering my username and password, then the mails that were in "Outgoing mail" were been delivered. Should lotus notes client run on the background for my application to send emails? Is there any way that my application sends emails even if lotus notes is not opened? I'm struck with this issue all day, did lot of research, but i could find anything.

i used this link  as a base ref to send emails using .net http://www.ibm.com/developerworks/lotus/library/domino-msnet/  

Any help regarding this is greatly appreciated.

Can't I send and receive emails without exchange server?


Hello Friends,

I know this question of mine sounds weird but here goes. I am installing SharePoint 2010 on a standalone machine which has its own AD, SMTP. Now I would like to enable email communications within the system and almost all the forums I come across say that exchange server is needed for email communication. My question is can't this be done without exchange server???

If the exchange server is not needed please do provide me with instructions on how to go ahead with my installation.

Thanks & Regards, Chandra Shekhar Rameneni

Send Email from SQL Server Express Using a CLR Stored Procedure

One of the nice things about SQL Server is the ability to send email using T-SQL. The downside is that this functionality does not exist in SQL Server Express. In this tip I will show you how to build a basic CLR stored procedure to send email messages from SQL Server Express, although this same technique could be used for any version of SQL Server.

If you have not yet built a CLR stored procedure, please refer to this tip for what needs to be done for the initial setup.

Send object from one page to another



I want to create object in 1.aspx, and then send it to 2.aspx. This methods are bad, because:

1)Send object with url, like this:


This is not confidential.


Session["field1"] = "12345"; // set
Object foo = Session["field1"]; // get

This is bad too, because in 2.aspx this fields send to textboxes, and if user go to 2.aspx without 1.aspx, he'll see old data. 

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

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);

Security negotiation failed because the remote party did not send back a reply in a timely manner. T



Dear All i have created one simple service

like this

namespace WcfService2
        public class Service1 : IService1
        public string ShowEmpName(string strFirstName, string strLastName)
            return strFirstName + strLastName;

after executing in .net command promt i got 2 files

service.cs & output.config

after that i create one class file like this

namespace WcfService2
    public class clientcs

        static void Main(string[] args)
            Service1Client client = new Service1Client();
            string strResult = client.ShowEmpName("Pradeep", "Deokar");

Send SMS

Hi All,
I want to send SMS from my application i have tried alot but i don't fine any solution.Please help me out i really need this.I don't want to use any third party webservice or any third party tool like simplewire,i want to create my own web service,I don't expect any code from anybody but i will be very thankful if anybody share the logic behind this.I am working as vb.net developer but i haven't use mobile toolkit.Kindly give me the direction where i could start.
Please reply,i really need this.
Thanx in advance,

How to send bulk sms from asp.net


Hi experts,

I want to send and receive sms in my asp.net website.I am currently targetting users in India.I may need to send the same sms to thousands of users at the same time.How can I achieve this?

Thanks in advance

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More


Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007

MSMQ and .NET: Send MSMQ Messages Securely Across the Internet with HTTP and SOAP


When creating a distributed system you frequently need to provide for communication between two entities that are not in sync. Microsoft Message Queue Server (MSMQ) provides the kind of store-and-forward messaging in a pre-built infrastructure that can help you address these kinds of messaging needs. In the past, MSMQ was accessed using a COM wrapper. Now there's a .NET wrapper that lets you accomplish your messaging goals easily from your Framework-based code. To illustrate the use of the wrapper, the author builds a messaging application, sends MSMQ messages over the Web, and discusses messaging security.

David S. Platt

MSDN Magazine December 2003

Fax Services: Send Any Printable File From Your Program in Windows 2000


All versions of Windows 2000 have fax services built in, so sending faxes manually is as easy as setting fax options from the control panel. Faxes can also be sent programmatically in Windows 2000 using either COM Automation or the standard C API. The example in this article uses COM Automation with Visual Basic and MFC to programmatically manage faxing. The objects used for fax transmission, such as the FaxServer and FaxDoc objects, as well as their properties and methods, are explained. Because faxing of files you can't print can be problematic, this process is explained. Finally, this article implements a fax routing extension-a plug-in that exports standard functions and implements routing methods for processing received faxes.

Marcin Kaluza

MSDN Magazine August 2001

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