Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Question about Getting Admin Email Notification. Please Help..

  1. #1
    iRazor is offline Junior Member
    Join Date
    Dec 2009
    Posts
    1

    Default Question about Getting Admin Email Notification. Please Help..

    Guys,

    I've read a number of posts about customizing ASPDNF to send a simple alert email to the administrator when a new customer has registered on the site. In this particular case my client needs to call the customer and ask a few questions before their account/pricing becomes active so they need to know ASAP when a new registration occurs.

    I've read several posts on this subject - though they are somewhat older.

    http://forums.aspdotnetstorefront.co...ad.php?t=13122

    http://forums.aspdotnetstorefront.co...ad.php?t=17577

    http://forums.aspdotnetstorefront.co...ad.php?t=16846

    I've implemented these changes EXACTLY as far as I can tell, but i'm still not getting an Administrative email when a new customer signs up (Though the customer does get the welcome email and all other email alerts are working as expected.

    Here's my code (Modified Code in RED):

    if (Checkout)
    {
    if (EMailAlreadyTaken)
    {
    ErrorMsgLabel.Text = AppLogic.GetString("createaccount_process.aspx.1", 1, Localization.GetWebConfigLocale());
    InitializePageContent();
    }
    else
    {
    if (AppLogic.AppConfigBool("SendWelcomeEmail") && EMailField.IndexOf("@") != -1)
    {
    // don't let a simple welcome stop checkout!
    try
    {
    AppLogic.SendMail(AppLogic.GetString("createaccoun t.aspx.79", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), AppLogic.RunXmlPackage(AppLogic.AppConfig("XmlPack age.WelcomeEmail"), null, ThisCustomer, this.SkinID, "", "fullname=" + FirstName.Text.Trim() + " " + LastName.Text.Trim(), false, false, this.EntityHelpers), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"), EMailField, FirstName.Text.Trim() + " " + LastName.Text.Trim(), "", AppLogic.MailServer());
    }
    catch { }
    if(AppLogic.AppConfigBool("NewCustomerEmailNotific ation"))
    {
    try
    {
    AppLogic.SendMail("New Customer Notification","You have a NEW Customer. Customer ID:" + ThisCustomer.CustomerID.ToString(), true, AppLogic.AppConfig("MailMe_FromAddress"), AppLogic.AppConfig("MailMe_FromName"),AppLogic.App Config("MailMe_ToAddress"), AppLogic.AppConfig("MailMe_ToName")," ",AppLogic.MailServer());
    }
    catch{ }
    }
    }

    if (VerifyAddressPrompt)


    Please Note! I am NOT an Programmer, i need stupid simple instructions on how to fix this issue... preferably to have someone rewrite the entire createaccount.aspx.cs file for me and send it to me so I can just upload it and be done with it.

    I'll pay you for your time if necessary.

    Contact Info: Cody@iRazorStrategies.com | Cell (920) 915-7371 | messenger: CFlanagan@New.RR.Com



    P

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Make sure you've added the new appconfig: NewCustomerEmailNotification already in Configuration -> Advanced -> Appconfig parameters, and set it to true as its value. That code wouldn't work without it.

  3. #3
    tundra is offline Junior Member
    Join Date
    Jan 2010
    Posts
    1

    Default solved?

    IF the above answer didnĀ“t solve this - might it be that you have an additional bracket at the end of your code snipped?

    In either case, it would be good for other users if you'd notify the board of how this was solved.