locked
Classifieds Advert - Email Notification RRS feed

  • Question

  • User440565073 posted

    How to set up Email notification when new ad posted.  ???

    When I go to "Configure SMTP e-mail settings " in Web Site Admin Tool, I get

    "An error was encountered. Please return to the previous page and try again"

    I have set option in Site Administration to notify "for each Ad"

     

    Thanks

     

    Monday, June 12, 2006 4:35 AM

All replies

  • User440565073 posted

    Can anybody help with this ???

    "The email was not sent. Contact the system administrator for further details"

    Web.config settings

    <system.net>
    <mailSettings>
    <smtp>
     <network host="mail.mysite.com"
            port="25"
            defaultCredentials="true"  
            userName="postmaster@mysite.com"
            password="mypassword"/>
            /&gt;
            </smtp>
    </mailSettings>
    </system.net>

     

     

    Tuesday, June 13, 2006 5:58 AM
  • User440565073 posted

    Can anybody assist,  ??????

    Does Email facilities actually work in Classifieds Kit.

    I am assuming that it does, but it would be nice to know how ??

    Are there any special settings ?????

    Cannot get it to work locally or on remote server.

     

    Thanks

     

    Thursday, June 15, 2006 3:06 PM
  • User1987993172 posted

    cbrscae , email notification does work, you just need to do a very small change in:

    App_Code ->BLL -> Maintenance.cs (Line 46)

    Change: 'list.Append(";");' by 'list.Append(",");'

    This is a bug and this change should allow your app to send email notification.

    Remember to modify Web.config with your own configuration.

    Fulltronic.

    Monday, June 19, 2006 1:59 PM
  • User440565073 posted

    Fulltronic, Thanks

     

    I'm using vb, do you think a similar amend applies  ????

     

    C.

    Monday, June 19, 2006 3:04 PM
  • User1987993172 posted

    I discovered that in vb there are 2 errors that must be corrected before email notification works.

    The first one is similar to c# code

    App_Code -> BLL -> Maintenance.vb (Line 45)

    Change 'list.Append(";")' by 'list.Append(",")'

    The second one, just delete this string /&gt;  located inside web.config, just before </smtp>

    Fulltronic.

    Monday, June 19, 2006 6:49 PM
  • User1987993172 posted

    I discovered that in vb there are 2 errors that must be corrected before email notification works.

    The first one is similar to c# code

    App_Code -> BLL -> Maintenance.vb (Line 45)

    Change 'list.Append(";")' by 'list.Append(",")'

    The second one, just delete this string /&gt;  or />  located inside web.config, just before </smtp>

    Fulltronic.

    Monday, June 19, 2006 6:58 PM
  • User440565073 posted

    Thanks,

    I had fixed the /&gt; and /> errors

    and was able to receive Emails when the

    Respond to Ad and Send Ad as Email options were selected.

    I have changed the code as you suggested.

    I now get this when trying to bring up site

    compilation error
    des_crip_tion: an error occurred during the compilation of a resource required to service this request. please review the following specific error details and modify your source code appropriately.

    compiler error message: bc30175: enum 'adminnotificationsetting' and enum 'adminnotificationsetting', declared in 'c:\windows\microsoft.net\framework\v2.0.50727\temporary asp.net files\root\036c85d8\f77c5c8d\app_code.vgu5nba3.12.vb', conflict in namespace 'businesslogiclayer'.

    source error:



    line 13: namespace aspnet.starterkits.classifieds.businesslogiclayer
    line 14:
    line 15: public enum adminnotificationsetting
    line 16: none = 0
    line 17: eachad = 1

    Perhaps you are familiar

    Regards

     

    Tuesday, June 20, 2006 11:20 AM
  • User-168160696 posted
    One thing you can do is check the \Inetpub\mailroot folder (really one of the sub folders to see if messages are even making it into there). If mail files are not being dropped there then something is wrong with your connection information. 
    Friday, June 23, 2006 7:25 PM
  • User-168160696 posted

    Sorry, just read rest of thread. I made change to source to append email using ',' instead of ";".  When adding multiple messages to the To collection, they get added with comma. Thanks.

    Friday, June 23, 2006 7:40 PM
  • User440565073 posted

    Respond to Ad, Send Ad as Email and Email notification all work fine locally.

    Respond to Ad and Send Ad as Email work fine remotely but I still cannot get Email notification working.  My site Email address is set to my Gmail account which works fine.

    HOSTERS Config Mail settings are

    <mailSettings>
     <smtp>
     <network
            host="serverAddress"
            port="25"
            defaultCredentials="true"  
            userName="postmaster@serverEmailAddress.com"
            password="class"/>
            />
            </smtp>
    </mailSettings>

    My hoster has now supplied me with 3 different host addresses. All allow emails to be sent to my SiteEmail Gmail Account but still no notification of New Ads Posted or New Registrations. ?

    Is It the HostServers Address or some other issue ????

     

     

     

     

    Monday, June 26, 2006 4:01 AM
  • User-168160696 posted

    I just tried email notification (options: None, EachAd, Hourly, Daily) for EachAd and it worked on winisp.net.  An ad posted from a user in the "guests" role and a user in the "administrators" role both triggered email notification. Relisting ads also triggered email. New user registration is not configured to send email. It could be though.

    Did you have Hourly or Daily set so you were not seeing the notifications?  Also, check any Junk Mail folders to make sure notifications didn't wind up there.

     

    Monday, June 26, 2006 1:03 PM
  • User-168160696 posted

    Just noticed that the Admin\Settings.aspx UI had Hourly/Daily swapped in terms of their order in the enumeration AdminNotificationSetting.  The correct markup should be

    <asp:DropDownList ID="AdminNotificationDropDown" Runat="server" SelectedIndex='<%# Bind("AdminNotification") %>' CssClass="post_title">
    <asp:ListItem Value="0">None</asp:ListItem>
    <asp:ListItem Value="1">for each Ad</asp:ListItem>
    <asp:ListItem Value="2">Hourly</asp:ListItem>
    <asp:ListItem Value="3">Daily</asp:ListItem>
    </asp:DropDownList>

    Will address this in the final version of the Kit.

    Monday, June 26, 2006 1:20 PM
  • User440565073 posted

    Just discovered that the Email Notifications are being sent to 2 Other email accounts that I have used at various times for testing.

    The notifications go straight to these accounts. My Host email account is Postmaster@Mysite.com

    The emails do not appear anywhere in my postmaster Email account but are sent directly to the 2 accounts mentioned above. I do not have Email Forward set on host account.

    Any thoughts  ???

     

    Regards

     

    Thursday, June 29, 2006 5:21 AM
  • User209709384 posted
    Are those 2 test user accounts still active users with the Administrator role in your database? I think notifications are sent to all users with the Administrator role
    Thursday, June 29, 2006 8:25 AM
  • User-168160696 posted

    I posted this originally to the wrong thread, so here it is again since it is relevant to this thread.

    Some further clarification on notification. It looks like the reference to the timer (_hourlyTimer in App_Code\Web\ClassifiedsHttpApplication.cs) is being lost. The _hourlyTimer needs to have class scope so that the reference to it can be kept. So _hourlyTimer needs to be defined for the class.

    private static Timer _hourlyTimer;  [C#]
    Private Shared _hourlyTimer As Timer [VB]

    The code line setting the timer in the Application_Start method for ClassifiedsHttpApplication then needs to be adjusted to just set the value not declare it.

    After these changes, the hourly and daily notifications will work. One more caveat, the notifications work like this:

    none = none

    forEachAd = send an email for each ad regardless of whether ads need to be activated by an admin; good for small volume sites

    hourly/daily = send an email summary ONLY if there are pending ads that require activation; otherwise no mail is sent; good for moderate to high volume sites

    Thursday, June 29, 2006 12:12 PM
  • User1335671932 posted

    I get a error when trying to use the forgot password tool......

    I am having email issues and i am trying to figure out your post.....

     

    you said........"    I made change to source to append email using ',' instead of ";"     "

     

    Mine look like this   

    list.Append(u.Email)

    list.Append(",")

    Is this what it should look like.

     

    Thursday, July 27, 2006 7:25 PM
  • User1335671932 posted
    Are you saying that you used single quotes with comma in the middle or double quotes?
    Saturday, July 29, 2006 5:55 AM
  • User-1047292335 posted

     

    Has anyone found a fix for this? Im running windows 2008 server;ISS 6.0 Smtp server, and I cant get it to work. With my current settings I can respond to an ad, but the email goes straight to my server,it wont relay the email to the receiver, The emails drop in the server mail folder, but they wont relay. :(
    Friday, August 29, 2008 8:38 AM
  • User-1512203029 posted

    Hi

     I am trying to get a e mail sent as soon as some one registers on the website using the same notification as when a add is placed. I have been trying this for a long time with no JOY. Hope you can help with this problem.

     

    Thanks

     

    Baba

     

     

    Wednesday, February 11, 2009 12:28 PM