Friday, 18 January 2013 13:55

how to send email by dnn sendmail method and create custom NavigateUrl

Written by 
Rate this item
(0 votes)

you can create custom navigate url in dotnetnuke to send the url or
use it as a querystring in another page by the following way -

string newValue = Globals.NavigateURL(this.TabId, "", new string[]
{ string.Format("ModuleId={0}", ModuleId.ToString()),
string.Format("ItemId={0}",Itemid) }); }

here newValue holds the url.


To send email using dotnetnuke use dnn built in method which uses
dnn SMTP settings to send email.most common parameters of this method
are -

DotNetNuke.Services.Mail.Mail.SendMail(PortalSettings.Email, ToEmail, "",
"new notification", "Name - " + NameTextBox.Text.Trim() + "<br/>Comment - " +
NCommentTextBox.Text.Trim() + "<br/>Posted On - " + DateTime.Now+
"<br/>Comment Link - " + newValue, "", "html", "", "", "", "");

here ToEmail will be the email to which email will be send.after that
you can add as many parameters as you want to send as email body.

Read 4538 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.
Login to post comments