<div dir="ltr">Ohh I see, Thanks!<div><br></div><div>JASON</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 29, 2014 at 3:01 PM, Ivan Noris <span dir="ltr"><<a 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 class=""><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 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 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 class=""><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 class=""><br>
    You should login and should your password at <a 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 class="">
      <div class="gmail_extra">
        <div class="gmail_quote">On Wed, Oct 29, 2014 at 1:18 PM, Ivan
          Noris <span dir="ltr"><<a 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 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 href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
            <a 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 class="">
        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 class="">
      <pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </span></blockquote><span class="">
    <br>
    <pre cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  <a 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 href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a 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>
<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>