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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Implementing Email in DOTNETNUKEImplementing Email in DOTNETNUKE
Previous
 
Next
New Post
9/1/2009 3:39 AM
 

Hello,

I am pretty new to DNN, just 1 week old. I am into a project which has a contact form and needs to send email once i click on submit. I have no clue how to go about implementing it, i went through few online codes which suggested to use  as specified below....I am not too sure where to add this code, how to call this. Please help...

 

How to send email in Dotnetnuke using VB.Net?
7/22/2009 7:56:11 AM

To send an email in DNN you can use the built in Dotnetnuke API framework. The following code function will do the job

Protected Sub SendMail(ByVal strFrom As String, ByVal strTo As String, ByVal strCC As String, ByVal strBCC As String, ByVal strSubject As String, ByVal strBody As String)
            Dim strSMTP As String = DotNetNuke.Entities.Host.HostSettings.GetHostSetting("SMTPServer")
            DotNetNuke.Services.Mail.Mail.SendMail(strFrom, strTo, strCC, strBCC,          DotNetNuke.Services.Mail.MailPriority.Normal, strSubject, DotNetNuke.Services.Mail.Mailformat.Text, System.Text.Encoding.UTF8, strBody, "", strSMTP, "", "", "")
End Sub


'Sample code
SendMail("fromemail@dnninfo.com","sender@dnninfo.com","","","Email Subject","Email Message")

Remember in order to make it work, you need to setup the SMTPServer in host settings.

(Source : http://www.dnninfo.com/Tutorials/ViewTutorial/tabid/62/smid/378/ArticleID/4/reftab/38/Default.aspx)

 
New Post
9/1/2009 9:57 AM
 

In the code behind for your module, you can forumlate the message then call the one line of code listed.

Typically this would be in the Click event for the button.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
9/2/2009 1:53 AM
 

@Mitch Sellers,

Thanks a lot for your reply, i will create a custom module and then how to call the btn_Submit_Click from aspx page that i have added, can you please share some example.

 
New Post
9/2/2009 4:30 AM
 

I suggest having a looka t the module development tutorials at dotnetnuke.adefwebserver.com


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/3/2009 4:33 AM
 

@Sebastian Leupold

Thanks a lot for your help...i will have a look @ it.

Can you suggest me a site where i can get the help on email functionality module ?

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Implementing Email in DOTNETNUKEImplementing Email in DOTNETNUKE


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