Hello Matt!
Thanks for your answers. For your first answer (answer to my second question *g*) I meant also in such a way to have one repeating section as group which inherits the tree fields (mailto, mailsubject…). But how can I in dependency of the number of chosen recipients insert the repeating sections? If I use checkboxes they are disabled because the data comes only as secondary data source in IP. One possibility is to use buttons for each row (respectively for each mail recipient). So I have to code something in the event handler…?!
At the end all recipients gets the same text-template but there are some specifics like the name (Dear Mr. XXX). That’s why I use per email on section in a repeating section. At the end following code iterates for each repeating section for sending the mail:
XPathNavigator mailTo = MainDataSource.CreateNavigator().SelectSingleNode("/my:email/my:editsection/my:to", NamespaceManager);
XPathNavigator mailSubject = MainDataSource.CreateNavigator().SelectSingleNode("/my:email/my:editsection/my:subject", NamespaceManager);
XPathNavigator sendingText = MainDataSource.CreateNavigator().SelectSingleNode("/my:email/my:emailsection/my:sendingText", NamespaceManager);
SPWeb web = SPControl.GetContextWeb(System.Web.HttpContext.Current);
if (SPUtility.IsEmailServerSet(web))
{
SPUtility.SendEmail(web, true, true, mailTo.ToString(), mailSubject.ToString(), sendingText.ToString());
}
Hope that helps to understand my problem.