<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Jason,<br>
      <br>
      this code gets current plain text password in mail notifications.<br>
      <br>
      midpoint.getPlaintextUserPassword(requestee);<br>
      <br>
      Here is useful link about midpoint library:<br>
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions">https://wiki.evolveum.com/display/midPoint/Script+Expression+Functions</a><br>
      <br>
      Regards<br>
      Roman Pudil<br>
      <div class="moz-signature">
        <title></title>
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <p> </p>
        <table style="border-collapse:collapse;">
          <tbody>
            <tr>
              <td colspan="2" style="font-family:Arial, sans-serif;
                font-size:11px; color:#000000; vertical-align:bottom;">
                <p> <span style="font-size:14px; font-weight:bold;">Roman
                    Pudil</span><br>
                  solution architect<br>
                  <br>
                  gsm: [+420] 775 663 666<br>
                  e-mail: <a href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a>
                </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000; vertical-align:bottom;">
                <p> AMI Praha a.s.<br>
                  Pláničkova 11<br>
                  162 00 Praha 6<br>
                  tel./fax: [+420] 274 783 239<br>
                  web: <a href="http://www.ami.cz">www.ami.cz</a> </p>
              </td>
              <td style="border-right:1px solid #cccccc;">   </td>
              <td>   </td>
              <td style="font-family:Arial, sans-serif; font-size:11px;
                color:#000000;">
                <p> <img src="cid:part3.05060700.05020408@ami.cz"
                    alt="AMI Praha a.s." title="AMI Praha a.s."> </p>
              </td>
            </tr>
            <tr>
              <td colspan="8"><br>
                <a
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
                    src="cid:part4.01020909.03060902@ami.cz" alt=""></a></td>
            </tr>
            <tr>
              <td colspan="8" style="font-family:Arial, sans-serif;
                font-size:11px; color:#808080;"> <br>
                Textem tohoto e-mailu podepisující neslibuje uzavřít ani
                neuzavírá za společnost AMI Praha a.s.<br>
                jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena,
                musí mít výhradně písemnou formu.</td>
            </tr>
          </tbody>
        </table>
      </div>
      Dne 30.10.2014 v 19:39 Jason Everling napsal(a):<br>
    </div>
    <blockquote
cite="mid:CAFkZXY6mv-ZBwqg-tCchWQu9QYP+SFrRbDqN+fTuowPxRqNiJw@mail.gmail.com"
      type="cite">
      <div dir="ltr">I got this down, I had to figure out where and what
        these were for \n\n but I was able to add a ton of information
        that was needed.
        <div><br>
        </div>
        <div>I need to add in the password and Employee Number which is
          actually the student ID,</div>
        <div><br>
        </div>
        <div>Is this correct, I couldn't find much on the subject,</div>
        <div><br>
        </div>
        <div>Your Password is " + requestee?.getPassword()?.getOrig()<br>
        </div>
        <div>Your Student ID is " +
          requestee?.getEmployeeNumber()?.getOrig()<br>
        </div>
        <div><br>
        </div>
        <div>Thanks for all your help!</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Oct 29, 2014 at 3:07 PM, Jason
          Everling <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Ohh I see, Thanks!<span class="HOEnZb"><font
                  color="#888888">
                  <div><br>
                  </div>
                  <div>JASON</div>
                </font></span></div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Wed, Oct 29, 2014 at 3:01
                    PM, Ivan Noris <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:ivan.noris@evolveum.com"
                        target="_blank">ivan.noris@evolveum.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000"> Hi Jason,<span><br>
                          <br>
                          <div>On 10/29/2014 07:26 PM, Jason Everling
                            wrote:<br>
                          </div>
                          <blockquote type="cite">
                            <div dir="ltr">Not that one, that one works
                              just fine but if I try to add to it is
                              when it fails, like
                              <div><br>
                              </div>
                              <div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"><bodyExpression></div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                        <script></div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                              <code></div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                   Welome to blah blah,
                                  the following below are links to the
                                  various resources you will use here</div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                     </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                        Your Username is  +
                                  requestee?.getName()?.getOrig()</div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"><br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                     You should login
                                  and should your password at <a
                                    moz-do-not-send="true"
                                    href="http://www.example/com"
                                    target="_blank">http://www.example/com</a><br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"><br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                     Link 1</div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                     Link 2<br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                                     Link 3<br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                             </code></div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"> 
                                          </script></div>
                                <div
                                  style="font-family:arial,sans-serif;font-size:13px"></bodyExpression></div>
                              </div>
                            </div>
                            <div class="gmail_extra"><br>
                            </div>
                          </blockquote>
                          <br>
                        </span> I see. But the answer is very simple:
                        everything in <code> is a groovy
                        expression. Return value of this expression is
                        what will be used for e-mail body (in this
                        case).<br>
                        <br>
                        For example in my previous sample, the Groovy
                        expression "[IDM] Your username is: " +
                        requestee?.getName()?.getOrig() is actually the
                        same as:<br>
                        <br>
                        return <b>"</b>[IDM] Your username is: <b>"</b>
                        <b>+</b> requestee?.getName()?.getOrig()<br>
                        <br>
                        In your case, you are missing:<br>
                        1) quotes for strings<br>
                        2) + operator for concatenating strings<br>
                        <br>
                        So your example needs to be rewritten to
                        maintain your required formatting, as:<br>
                        <br>
                                    <bodyExpression><br>
                                       <script><br>
                                          <code><br>
                                           "Welome to blah blah, the
                        following below are links to the various
                        resources you will use here. \n" + "Your
                        Username is " + requestee?.getName()?.getOrig()
                        + "\nYou should login and should your password
                        at <a moz-do-not-send="true"
                          href="http://www.example/com" target="_blank">http://www.example/com</a>"<br>
                                     </code><br>
                                       </script><br>
                                    </bodyExpression><br>
                        <br>
                        (this is a copy/paste from actual System
                        Configuration)<br>
                        <br>
                        Which will produce notification for example:<span><br>
                          <br>
                          Welome to blah blah, the following below are
                          links to the various resources<br>
                        </span> you will use here. <br>
                        Your Username is hulahop<span><br>
                          You should login and should your password at <a
                            moz-do-not-send="true"
                            href="http://www.example/com"
                            target="_blank">http://www.example/com</a><br>
                          <br>
                        </span> (this is copy/paste from actual e-mail
                        that was sent).<br>
                        <br>
                        So now you should be able to do anything (except
                        the HTML discussed earlier).<br>
                        <br>
                        Regards,<br>
                        Ivan<br>
                        <br>
                        <blockquote type="cite"><span>
                            <div class="gmail_extra">
                              <div class="gmail_quote">On Wed, Oct 29,
                                2014 at 1:18 PM, Ivan Noris <span
                                  dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:ivan.noris@evolveum.com"
                                    target="_blank">ivan.noris@evolveum.com</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex">
                                  <div bgcolor="#FFFFFF" text="#000000">
                                    Hi Jason,<br>
                                    <br>
                                    so the following didn't work for
                                    you? It looks ok at the first look.<br>
                                    <br>
                                    Do you get any exception when
                                    sending notifications? Errors in
                                    log? What precisely "does not work"?
                                    I'll try to replicate the behaviour.
                                    But please send the whole
                                    notification handler which does not
                                    work. Thank you.<span><br>
                                      <div><br>
                                      </div>
                                      <blockquote type="cite">
                                        <div><bodyExpression><br>
                                        </div>
                                        <div>
                                          <div><span
                                              style="white-space:pre-wrap">
                                            </span><script></div>
                                          <div><span
                                              style="white-space:pre-wrap">
                                            </span><code></div>
                                          <div><span
                                              style="white-space:pre-wrap">
                                            </span>"[IDM] Your username
                                            is: " +
                                            requestee?.getName()?.getOrig()</div>
                                          <div><span
                                              style="white-space:pre-wrap">
                                            </span></code></div>
                                          <div><span
                                              style="white-space:pre-wrap">
                                            </span></script></div>
                                          <div></bodyExpression></div>
                                        </div>
                                      </blockquote>
                                      <br>
                                    </span> Regards,<br>
                                    Ivan<span><br>
                                      <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  <a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
  ___________________________________________
           "Idem per idem - semper idem Vix."
</pre>
                                    </span></div>
                                  <br>
_______________________________________________<br>
                                  midPoint mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:midPoint@lists.evolveum.com"
                                    target="_blank">midPoint@lists.evolveum.com</a><br>
                                  <a moz-do-not-send="true"
                                    href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                                    target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                                  <br>
                                </blockquote>
                              </div>
                              <br>
                            </div>
                            <br>
                          </span><font><br>
                            <br>
                            <span> CONFIDENTIALITY NOTICE:<br>
                              This e-mail together with any attachments
                              is proprietary and confidential; intended
                              for only the recipient(s) named above and
                              may contain information that is
                              privileged. You should not retain, copy or
                              use this e-mail or any attachments for any
                              purpose, or disclose all or any part of
                              the contents to any person. Any views or
                              opinions expressed in this e-mail are
                              those of the author and do not represent
                              those of the Baptist School of Health
                              Professions. If you have received this
                              e-mail in error, or are not the named
                              recipient(s), you are hereby notified that
                              any review, dissemination, distribution or
                              copying of this communication is
                              prohibited by the sender and to do so
                              might constitute a violation of the
                              Electronic Communications Privacy Act, 18
                              U.S.C. section 2510-2521. Please
                              immediately notify the sender and delete
                              this e-mail and any attachments from your
                              computer. </span></font><br>
                          <br>
                          <fieldset></fieldset>
                          <br>
                          <span>
                            <pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
                          </span></blockquote>
                        <span> <br>
                          <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  <a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a>
  ___________________________________________
           "Idem per idem - semper idem Vix."
</pre>
                        </span></div>
                      <br>
                      _______________________________________________<br>
                      midPoint mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:midPoint@lists.evolveum.com"
                        target="_blank">midPoint@lists.evolveum.com</a><br>
                      <a moz-do-not-send="true"
                        href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                        target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <font size="2"><br>
        <br>
        CONFIDENTIALITY NOTICE:<br>
        This e-mail together with any attachments is proprietary and
        confidential; intended for only the recipient(s) named above and
        may contain information that is privileged. You should not
        retain, copy or use this e-mail or any attachments for any
        purpose, or disclose all or any part of the contents to any
        person. Any views or opinions expressed in this e-mail are those
        of the author and do not represent those of the Baptist School
        of Health Professions. If you have received this e-mail in
        error, or are not the named recipient(s), you are hereby
        notified that any review, dissemination, distribution or copying
        of this communication is prohibited by the sender and to do so
        might constitute a violation of the Electronic Communications
        Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
        notify the sender and delete this e-mail and any attachments
        from your computer. </font><br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>