Hi Tessiturians,
I've customized Order Email Confirmation that our Education department sends to schools attending a concert. But sometimes they need a printed copy of this email - is there a way to send this email to a printer from within Tessitura?
Thanks, Sabina.
From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Jon BallingerSent: Thursday, April 28, 2011 6:05 AMTo: Sabina SpilkinSubject: Re: [Tessitura Technical Forum] Order Email Confirmations Hi Sabina, I had a chance to test out the first example and it works. One thought I had with either method is that you could use a custom field in the order as the email addresses to be copied on. Then use that data in the template to send the email. From: Jon Ballinger <bounce-jonballinger5072@tessituranetwork.com>Sent: 4/27/2011 9:18:05 PM Hi Sabina, A couple things come to mind. First I would think there would be a template for just education so that other types of orders would not send a copy of the email. Then in your education template there are two things I might try to do. First is in the template aspx page I would try to create and fire off an email with in it. createatig a new message with the order information. Something like the following: <%@ Import Namespace="System.Web.Mail" %><% MailMessage objMail = new MailMessage();objMail.From = "jballinger@mccarter.org";objMail.To = "jballinger@mccarter.org";objMail.Subject = "Response from website";objMail.Body = "This an edu order" + OrderData.OrderNumber ;SmtpMail.SmtpServer = "192.169.1.1; SmtpMail.Send(objMail);%> My second thought if this does not work is to execute a local procedure from the email confirmation and have the local procedure send an email out to the edutcation recipient with the proper information. Thie code in the template file could be something like: <% Tessitura.WebAPI.Tessitura tess = new Tessitura.WebAPI.Tessitura();string sessionkey = tess.GetNewSessionKey(""); tess.ExecuteLocalProcedure(sessionkey, 1, "@ORDER_NO=" + OrderData.OrderNumber +"@RECIPIENT=jballinger@mccarter.org");%> Hope this helps, Jon This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
Hi Sabina, I had a chance to test out the first example and it works. One thought I had with either method is that you could use a custom field in the order as the email addresses to be copied on. Then use that data in the template to send the email.
From: Jon Ballinger <bounce-jonballinger5072@tessituranetwork.com>Sent: 4/27/2011 9:18:05 PM
Hi Sabina,
A couple things come to mind. First I would think there would be a template for just education so that other types of orders would not send a copy of the email. Then in your education template there are two things I might try to do. First is in the template aspx page I would try to create and fire off an email with in it. createatig a new message with the order information. Something like the following:
<%@ Import Namespace="System.Web.Mail" %><% MailMessage objMail = new MailMessage();objMail.From = "jballinger@mccarter.org";objMail.To = "jballinger@mccarter.org";objMail.Subject = "Response from website";objMail.Body = "This an edu order" + OrderData.OrderNumber ;SmtpMail.SmtpServer = "192.169.1.1; SmtpMail.Send(objMail);%>
My second thought if this does not work is to execute a local procedure from the email confirmation and have the local procedure send an email out to the edutcation recipient with the proper information. Thie code in the template file could be something like:
<% Tessitura.WebAPI.Tessitura tess = new Tessitura.WebAPI.Tessitura();string sessionkey = tess.GetNewSessionKey(""); tess.ExecuteLocalProcedure(sessionkey, 1, "@ORDER_NO=" + OrderData.OrderNumber +"@RECIPIENT=jballinger@mccarter.org");%>
Hope this helps,
Jon
Sabina, Attached is my working example granted there are some extra calls to the webapi's executelocalprocedure that would not apply. But you can see where i have the email code in place.
Jon, I am attaching our .aspx file. I looked at your example and realize that my placement is not correct .... I am attaching our .aspx file if you have a chance to take a look. Thanks a bunch!
Sabina
Just to update what I have found with sending in either method. If you have both an html & text template for the confirmation the email code should go in the text template. It seems both files are executed so you only need it once. If you have just an html template then put the code in the html template.