context.generateRelativeURLs();
return resetPasswordUrl;
}
public static boolean sendEmailToPerson(String subject, WOComponent component, WOComponent plainTextComponent, SPPerson person, ERMessage.Delegate delegate, SPNoticeList errorNoticeList) {
ERMailDeliveryHTML mail = new ERMailDeliveryHTML();
mail.setComponent(component);
mail.setAlternativeComponent(plainTextComponent);
mail.newMail();
boolean sentEmail = false;
try {
mail.setFromAddress("donotreply@secret-pal.com");
mail.setReplyToAddress("donotreply@secret-pal.com");
mail.setSubject(subject);
mail.setToAddresses(new NSArray<String>(person.emailAddress()));
mail.setDelegate(delegate);
mail.sendMail();
sentEmail = true;
} catch (Exception e) {
EOEditingContext editingContext = ERXEC.newEditingContext();
try {
person.localInstanceIn(editingContext).setEmailDeliveryFailure(Boolean.TRUE);