<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Mail Task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169111#M122521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I have a problem with send Mail Task, I don't received anything. I use Apache James and JavaMail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I put this code in listener of MailTask:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class MailTaskNotification implements TaskListener{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private static final long serialVersionUID = 1L;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String HOST = "smtp.gmail.com";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;private static String USER = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:myAddress@gmail.com" rel="nofollow noopener noreferrer"&gt;myAddress@gmail.com&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String PASSWORD = "******";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String PORT = "465";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;private static String FROM = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:myAddress@gmail.com" rel="nofollow noopener noreferrer"&gt;myAddress@gmail.com&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;private static String TO = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:myAddress@gmail.com" rel="nofollow noopener noreferrer"&gt;myAddress@gmail.com&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String STARTTLS = "true";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String AUTH = "true";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String DEBUG = "true";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String SOCKET_FACTORY = "javax.net.ssl.SSLSocketFactory";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String SUBJECT = "Testing JavaMail API";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private static String TEXT = "This is a test message from my java application. Just ignore it";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void notify(DelegateTask task) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.out.println("Enter in Email Task");&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Use Properties object to set environment properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Properties props = new Properties();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.host", HOST);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.port", PORT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.user", USER);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.auth", AUTH);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.starttls.enable", STARTTLS);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.debug", DEBUG);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.socketFactory.port", PORT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.socketFactory.class", SOCKET_FACTORY);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;props.put("mail.smtp.socketFactory.fallback", "false");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Obtain the default mail session&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Session session = Session.getDefaultInstance(props, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;session.setDebug(true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Construct the mail message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MimeMessage message = new MimeMessage(session);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message.setText(TEXT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message.setSubject(SUBJECT);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message.setFrom(new InternetAddress(FROM));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message.addRecipient(RecipientType.TO, new InternetAddress(TO));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;message.saveChanges();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Use Transport to deliver the message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Transport transport = session.getTransport("smtp");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;transport.connect(HOST, USER, PASSWORD);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;transport.sendMessage(message, message.getAllRecipients());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;transport.close();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;} catch (Exception e) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.printStackTrace();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;System.out.println("Mail sent successfully!");&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Apr 2014 11:07:35 GMT</pubDate>
    <dc:creator>amani</dc:creator>
    <dc:date>2014-04-01T11:07:35Z</dc:date>
    <item>
      <title>Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169111#M122521</link>
      <description>Hi, I have a problem with send Mail Task, I don't received anything. I use Apache James and JavaMail.I put this code in listener of MailTask&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublic class MailTaskNotification implements TaskListener{private static final long serialVersionUID = 1L;private static String HOST = "smtp.gmail.com";private</description>
      <pubDate>Tue, 01 Apr 2014 11:07:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169111#M122521</guid>
      <dc:creator>amani</dc:creator>
      <dc:date>2014-04-01T11:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169112#M122522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This doesn't sound like an Activiti problem … you are doing al the email sending yourself here…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 20:28:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169112#M122522</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-04-01T20:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169113#M122523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want send a Mail Task. My Listener Task will be executed when Mail task was created. when i executed my project,&amp;nbsp; I can't find any exception in my console and I don't receive anything in my email box. I attached my bpm diagram. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2014 21:07:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169113#M122523</guid>
      <dc:creator>amani</dc:creator>
      <dc:date>2014-04-01T21:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169114#M122524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Amani.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not find any error in your process definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Did you try to debug it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Do you have a jUnit test?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 06:37:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169114#M122524</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-04-02T06:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169115#M122525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1) Yes, I putted toggles when my process started but I didn't have any exceptions just this message appears in my console and I putted also toggle in My listener Task "MailTaskNotification" but it didn't enter:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;****************** Start Approve Instruction ***********************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;your process is started&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data EHLO AZOUNA-PC&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data MAIL FROM: &amp;lt;activiti@localhost&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data RCPT TO: &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:azouna.amani@gmail.com" rel="nofollow noopener noreferrer"&gt;azouna.amani@gmail.com&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data DATA&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data .&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;Sending data QUIT&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Yes, I tried to test with jUnit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Apr 2014 10:19:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169115#M122525</guid>
      <dc:creator>amani</dc:creator>
      <dc:date>2014-04-02T10:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169116#M122526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Isn't there any problem with wiser?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;java.lang.NoSuchMethodError: org.apache.mina.transport.socket.nio.SocketAcceptor.&amp;lt;init&amp;gt;(ILjava/util/concurrent/Executor:smileywink:V&lt;BR /&gt; at org.subethamail.smtp.server.SMTPServer.initService(SMTPServer.java:211)&lt;BR /&gt; at org.subethamail.smtp.server.SMTPServer.&amp;lt;init&amp;gt;(SMTPServer.java:147)&lt;BR /&gt; at org.subethamail.smtp.server.SMTPServer.&amp;lt;init&amp;gt;(SMTPServer.java:156)&lt;BR /&gt; at org.subethamail.wiser.Wiser.&amp;lt;init&amp;gt;(Wiser.java:61)&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 06:58:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169116#M122526</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-04-03T06:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169117#M122527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, when I tested with jUnit I have this problem with wiser. I added all library necessary but it stay this exception.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2014 10:57:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169117#M122527</guid>
      <dc:creator>amani</dc:creator>
      <dc:date>2014-04-03T10:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169118#M122528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Amani,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on our experience, sending emails directly from within the workflow (using Mail Task or bespoke TaskDelegate) seems to be a Very Bad Idea. For starters, you may not want the workflow to wait for the whole SMTP interaction (especially if there's a user waiting for the workflow to proceed), and what you definitely don't want is to the whole workflow to fail due to some silly SMTP error - not to mention MailTask's templating support being quite limited.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What we ended up doing was dumping all process variables to external service that would enqueue the email and return immediately. External task executor then would get the variables through the proper template engine (Velocity, Freemarker - or Jinja2 in our case since we have external web services built in Python and running on Google App Engine) and actually send the email through.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 04:44:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169118#M122528</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-04-04T04:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169119#M122529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Apr 2014 22:28:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169119#M122529</guid>
      <dc:creator>amani</dc:creator>
      <dc:date>2014-04-06T22:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Mail Task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169120#M122530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@ekolesnikov: I would agree with that, specially in an enterprise setting that seems wise.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 08:41:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mail-task/m-p/169120#M122530</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-04-22T08:41:32Z</dc:date>
    </item>
  </channel>
</rss>

