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 ForumsForumForumSendForumMail QuestionSendForumMail Question
Previous
 
Next
New Post
5/9/2007 5:41 PM
 

Hello,

I've built a module which references the forum module dlls.  This module simply posts a thread using code similar to that found in Forum_PostEdit.ascx function PostToDatabase.  Will the SendForumMail function (DotNetNuke.Modules.Forum.Utils.SendForumMail)  send an email to the individual that a forum post as been made, or only to people subscribed to the forum?

Thanks in advance,

Ben

 


Do you use Oracle?  Then try GoldFish.Net

Get it from CNET Download.com! 

 
New Post
5/9/2007 8:15 PM
 

Ben, this depends on what code you took, and if the user has checked the subscribe box for the post (if not already subscribed to the thread or forum). This is really dependant on several variables so its hard for me to give you a definitive answer.

 


Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
5/9/2007 9:06 PM
 

Hi Chris,

Great point, I have the notify flag set to true ( bNotify=true).  I believe that the SendForumMail should send everyone subscribed to that thread a message correct? 

Sorry I know this is alittle hard without seeing all of the code, I really only took a very small amount of code since I only need to be able to start a thread from another module.

iNewPostID = ctlPost.PostAdd(0, iForumId, CType(_tPostUserId, Integer), tRemoteAddr, bNotify, _tSubject, _tBody, bIsPinned, dtPinnedDate, bIsClosed, _Image, _MediaURL, _MediaNav, _ObjectTypeCode, _ObjectID, _tFileAttachmentURL)


Do you use Oracle?  Then try GoldFish.Net

Get it from CNET Download.com! 

 
New Post
5/9/2007 9:34 PM
 

Using the PostAdd method alone will not send email notifications in that forum version or the next. The logic to send the email is a series of IF conditional statements (because of moderation and such) and you will need to have a seperate call for sending email in your custom module.

 


Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
5/9/2007 10:10 PM
 

Hi Chris,

 

I first call the PostAdd, with the Notify option, then I call the SendForumMail function, after creating the mail url string.

The below example uses the hard coded mail to string.

            iNewPostID = ctlPost.PostAdd(0, iForumId, CType(_tPostUserId, Integer), tRemoteAddr, bNotify, _tSubject, _tBody, bIsPinned, dtPinnedDate, bIsClosed, _Image, _MediaURL, _MediaNav, _ObjectTypeCode, _ObjectID, _tFileAttachmentURL)
            _emailType = ForumEmailType.PostAdd

            tMailUrl = "http://mysite.com/Workshop/tabid/60/forumid/-1/threadid/" & iNewPostID.ToString & "/scope/posts/Default.aspx"

            SendForumMail(iNewPostID, tMailUrl, _emailType, "Forum Post Created")


Do you use Oracle?  Then try GoldFish.Net

Get it from CNET Download.com! 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumSendForumMail QuestionSendForumMail Question


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