убирание выключенных адресатов из списка, v++

This commit is contained in:
2024-07-29 23:15:17 +03:00
parent 0fe33b21ee
commit 5057db453f
4 changed files with 26 additions and 16 deletions

View File

@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override
public void GetVersionInfo() {
version = 1110;
version = 1112;
String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime());

View File

@@ -109,19 +109,6 @@ public abstract class RepositoryServer<D extends Database> {
targets_.add(Constants.MailAddress); //себе.
targets_.addAll(message_in.targets);
//------------------------------
Vector<String> targetsNames = new Vector<>();
for (String target: targets_){
String [] data = target.split("@");
if (data.length>0) {
String tname = data[0];
targetsNames.add(tname);
}
}
String text_ =
"Адресаты: "+String.join(", ",targetsNames)+"\n"+
message_in.text
;
//------------------------------
Session session = Session.getDefaultInstance(props,
new Authenticator() {
@Override
@@ -143,7 +130,7 @@ public abstract class RepositoryServer<D extends Database> {
message.setSubject(message_in.subject);
Multipart multipart = new MimeMultipart();
MimeBodyPart textBodyPart = new MimeBodyPart();
textBodyPart.setText(text_);
textBodyPart.setText(message_in.text);
multipart.addBodyPart(textBodyPart);
for (String aName : innerFiles.keySet()) {
MimeBodyPart attachmentBodyPart = new MimeBodyPart();