|
|
@ -135,7 +135,7 @@ public class MailingList { |
|
|
|
var member = ListMember.load(this,user); |
|
|
|
var member = ListMember.load(this,user); |
|
|
|
return member.hasState(ListMember.STATE_OWNER|ListMember.STATE_SUBSCRIBER); // owners may subscribe their own mailing lists
|
|
|
|
return member.hasState(ListMember.STATE_OWNER|ListMember.STATE_SUBSCRIBER); // owners may subscribe their own mailing lists
|
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException e) { |
|
|
|
LOG.warn("Was not able to load ListMember: ",e); |
|
|
|
LOG.warn("Konnte ListeMember nicht laden: ",e); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -192,7 +192,7 @@ public class MailingList { |
|
|
|
.compile().exec(); |
|
|
|
.compile().exec(); |
|
|
|
if (rs.next()) ml = MailingList.from(rs); |
|
|
|
if (rs.next()) ml = MailingList.from(rs); |
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException e) { |
|
|
|
LOG.debug("Failed to load MailingList: ",e); |
|
|
|
LOG.debug("Konnte MailingList nicht laden: ",e); |
|
|
|
} |
|
|
|
} |
|
|
|
return ml; |
|
|
|
return ml; |
|
|
|
} |
|
|
|
} |
|
|
@ -229,7 +229,7 @@ public class MailingList { |
|
|
|
while (rs.next()) list.add(MailingList.from(rs)); |
|
|
|
while (rs.next()) list.add(MailingList.from(rs)); |
|
|
|
rs.close(); |
|
|
|
rs.close(); |
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException e) { |
|
|
|
LOG.warn("Listing mailing lists failed: ", e); |
|
|
|
LOG.warn("Auflisten der Mailinglisten fehlgeschlagen: ", e); |
|
|
|
} |
|
|
|
} |
|
|
|
return list; |
|
|
|
return list; |
|
|
|
} |
|
|
|
} |
|
|
@ -283,10 +283,10 @@ public class MailingList { |
|
|
|
* @throws UnsupportedEncodingException |
|
|
|
* @throws UnsupportedEncodingException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void sendConfirmationRequest(User user, String token) throws MessagingException, UnsupportedEncodingException { |
|
|
|
private void sendConfirmationRequest(User user, String token) throws MessagingException, UnsupportedEncodingException { |
|
|
|
var subject = t("Please confirm your list subscription"); |
|
|
|
var subject = t("Bitte bestätigen Sie ihr Listen-Abonnement"); |
|
|
|
var config = Configuration.instance(); |
|
|
|
var config = Configuration.instance(); |
|
|
|
var url = new StringBuilder(config.baseUrl()).append("/confirm?token=").append(token); |
|
|
|
var url = new StringBuilder(config.baseUrl()).append("/confirm?token=").append(token); |
|
|
|
var text = t("Please go to {} in order to complete your list subscription!",url); |
|
|
|
var text = t("Botte gehen Sie zu {} um das Abonnieren der Liste abzuschließen!",url); |
|
|
|
smtp.login().send(email(),name(),user.email(),subject,text); |
|
|
|
smtp.login().send(email(),name(),user.email(),subject,text); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -335,7 +335,7 @@ public class MailingList { |
|
|
|
rs.close(); |
|
|
|
rs.close(); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} catch (SQLException e) { |
|
|
|
} catch (SQLException e) { |
|
|
|
LOG.warn("Failed to read subscribable mailinglists for {}",user,e); |
|
|
|
LOG.warn("Lesen der für {} abbonnierbaren Mailinglisten fehlgeschlagen.",user,e); |
|
|
|
return Set.of(); |
|
|
|
return Set.of(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|