Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryNotifications - any way to turn off?Notifications - any way to turn off?
Previous
 
Next
New Post
4/27/2008 10:57 PM
 

Hi,

I have the opposite issue to that which a number of people seem to have logged in the forum. Instead of wanting to have notifications sent in new circumstances (e.g. when a file is downloaded), I want to be able to turn off the e-mail notifications that are sent to the administrator when a file is uploaded. I can see no ability under the module settings to control this - the only way I have found to stop them is to remove the SMTP server from the site, but that is not a good solution for obvious reasons.

I believe from reading posts this can probably be achieved reasonably simply by hacking the code to remove the mail generation when the upload occurs. Is there any chance someone (Steve?) can point me at the correct lines of code? I am currently running the latest RC for 3.0.14.

Might I also suggest that in the next release it would be a good idea to provide the ability to control via the module settings a) the ability to turn on or off mail generation for the various events and b) the ability to customise the recipient for each of these events?

TIA,

Graham

 
New Post
7/30/2008 7:25 PM
 

Bump. I'd really appreciate a response to this. Running this site without SMTP server is presenting other problems so I need to be able to stop the repository generating 'File Uploaded'  mails.

Thanks,

Graham

 
New Post
7/31/2008 5:02 PM
 

sorry for not responding earlier .. sorry, but unfortunately, with the current code the only was to supress the email would be a code change. The code is in the RepositoryBL.vb file ... just open the file and search for "SendMail" to find it.

If strMessage = "" Then
  ' if no errors and the uploaded file needs to be approved, then send an email to the administrator
  If Not IsTrusted(PortalID, ModuleID) Then
    Dim objUsers As New UserController
    Dim objAdministrator As UserInfo = objUsers.GetUser(PortalID, Int32.Parse(_portalSettings.AdministratorId))
    Dim strBody As String = ""
    If Not objAdministrator Is Nothing Then
      strBody = objAdministrator.DisplayName & "," & vbCrLf & vbCrLf
      strBody = strBody & "A file has been uploaded/changed to " & _portalSettings.PortalName & " and is waiting for your Approval." & vbCrLf & vbCrLf
      strBody = strBody & "Portal Website Address: " & DotNetNuke.Common.Globals.GetPortalDomainName(_portalSettings.PortalAlias.HTTPAlias, HttpContext.Current.Request) & vbCrLf
      strBody = strBody & "Username: " & pRepository.Author & vbCrLf
      strBody = strBody & "User's email address: " & pRepository.AuthorEMail & vbCrLf
      strBody = strBody & "File Uploaded: " & strFileName & vbCrLf & vbCrLf
      DotNetNuke.Services.Mail.Mail.SendMail(_portalSettings.Email, _portalSettings.Email, "", "", Services.Mail.MailPriority.Normal, "ADMIN: A File is Awaiting your Approval at " & _portalSettings.PortalName, Services.Mail.Mailformat.Text, System.Text.Encoding.Default, strBody, "", "", "", "", "")
    End If
  End If
End If

So, you can see whenever the uploader is not trusted ( ie.: not an administratror or a moderator ) then an email will be sent. You could simply comment the code out and rebuild the module to remove that function. If you plan to do that please refer to the pinned post in this forum on how to make code changes and recompile the module.

 
New Post
7/31/2008 8:58 PM
 

Steve,

Thanks for the reply. Commenting out and recompliing is definitely the route I'll take for the moment. The site I'm supporting in this case is basically one big repository which gets dozens if not hundreds of files uploaded each day and they really don't need the e-mails as the moderators  / administrators are well aware that files will be there for them to check every day.

Longer term I still believe that it would be very useful to be able to control whether or not e-mails are generated as part of the module settings function, so could you please add this to the 'wish list' for a future version.

Regards,

Graham

 
New Post
8/1/2008 7:32 AM
 

not a problem Graham. In version 4.0, you'll have much more control over not only the look and feel of the module, but in the underlying process as you will be able to use the Repository.Workflow component to direct what happens whenever an event takes place like uploading, etc.  So you will be able to define your own business rule that will decide whether or not to send an email based on your own criteria, whatever that may be

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryNotifications - any way to turn off?Notifications - any way to turn off?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out