Dynamicweb.eCommerce.Orders Namespace > Order Class > SendTo Method : SendTo(PageView,String,String,String,String,Template) Method |
'Declaration
Public Overloads Function SendTo( _ ByRef PageView As PageView, _ ByVal subject As String, _ ByVal ToMailAddress As String, _ ByVal FromMailAddress As String, _ ByVal FromMailName As String, _ ByRef MailTemplate As Template _ ) As Boolean
public bool SendTo( ref PageView PageView, string subject, string ToMailAddress, string FromMailAddress, string FromMailName, ref Template MailTemplate )
class MyPage : System.Web.UI.Page { public void SendMails(ref Dynamicweb.eCommerce.CustomerCenter.CustomerCenterSettings Settings, ref Dynamicweb.Frontend.PageView pageView) { string addresses = Base.Request("Addresses"); if (!string.IsNullOrEmpty(addresses)) { string[] emailAddresses = addresses.Split(':'); string oid = Base.Request("OrderID"); string SenderMail = Settings.DefaultMailAddress.Trim(); if (string.IsNullOrEmpty(SenderMail) || Base.ValidateEmail(SenderMail) == false) { SenderMail = Convert.ToString(Base.GetGs("/Globalsettings/Settings/CommonInformation/Email")); if (Base.ValidateEmail(SenderMail) == false) { SenderMail = "noreply@dynamicweb-cms.com"; } } if (!string.IsNullOrEmpty(oid)) { Order tmpOrder = Dynamicweb.eCommerce.CustomerCenter.OrderManager.GetOrderForCurrentUser(oid); if (tmpOrder != null) { Dynamicweb.eCommerce.Shops.Shop shop = new Dynamicweb.eCommerce.Shops.Shop(tmpOrder.ShopID); for (int cnt = emailAddresses.GetLowerBound(0); cnt <= emailAddresses.GetUpperBound(0); cnt++) { Dynamicweb.Rendering.Template t = new Dynamicweb.Rendering.Template(Settings.MyOrderDetailsTemplate); tmpOrder.SendTo(ref pageView, emailAddresses[cnt], SenderMail, ref t); } } else { return; } } } } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2