Mail-send error when defining fileNames for attachments

Hello

1 I’m using the mail-send connector successfully for conventional text emails:

2 However, when I define a fileNames list of absolute path(s) no error is thrown and the email is sent.

3 The email is received but the attachment(s) are not there neither the body of the email.

image

4 Detail:
Camunda 7.8 Tomcat distribution
camunda-bpm-mail-core-1.3.0-SNAPSHOT.jar
>

    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
    <version>1.6.1</version>
  </dependency>
  <dependency>
    <groupId>org.camunda.connect</groupId>
    <artifactId>camunda-connect-core</artifactId>
    <version>1.0.6</version>
  </dependency>
  <dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.25</version>
  </dependency>

Any ideas as to what is happening here?

1 Like

hi @eugene
Can you tell me, how could you implment email sending service? i have used this example https://github.com/camunda/camunda-bpm-mail but i couldn’t send mail to my gmail account

Hi Sally

It can be that Google blocks the requests because it estimates your application as unsafe, and your.name@gmail.com may even received an email from Google to inform you about this.

To fix this, log on as your.name@gmail.com, then go to Anmelden – Google Konten and enable less secure apps.

Hi @eugene,

do you see any errors in the log file?

Best regards,
Philipp

hi @Philipp_Ossler

Thanks for responding.

Nope, none at all. All seems to work fine and the email is received but no attachment is present. I suspect it might have something to do with the latest versions of javax.mail, camunda-connect-core and slf4j-api. I’m not a programmer and find it difficult to investigate in depth.

I notice that the same happens when I send an HTML email. It succeeds with no errors but the received email has no body.

Thanks for your attention to this issue.

Hi @eugene,

it can be that it’s related to the libs you use. Can you tell me more about your setup?
Did you copy the JAR files in the tomcat lib folder?
What JAR files are in the folder?

Best regards,
Philipp

Hello @Philipp_Ossler

1 Herewith the files in lib:

ls -og ~/Wap/CamundaDev/7.8/camunda-bpm-tomcat-7/server/apache-tomcat-8.0.47/lib/
total 28380
-rw-r–r–. 1 18258 Dec 30 03:40 annotations-api.jar
-rw-r–r–. 1 46909 Mar 4 10:52 camunda-bpm-mail-core-1.3.0-SNAPSHOT.jar
-rw-r–r–. 1 648009 Dec 30 03:40 camunda-bpmn-model-7.8.0.jar
-rw-r–r–. 1 286781 Dec 30 03:40 camunda-cmmn-model-7.8.0.jar
-rw-r–r–. 1 4326 Dec 30 03:40 camunda-commons-logging-1.4.0.jar
-rw-r–r–. 1 64774 Dec 30 03:40 camunda-commons-typed-values-1.4.0.jar
-rw-r–r–. 1 12049 Dec 30 03:40 camunda-commons-utils-1.4.0.jar
-rw-r–r–. 1 1226536 Dec 30 03:40 camunda-connect-connectors-all-1.0.5.jar
-rw-r–r–. 1 19227 Dec 30 03:40 camunda-connect-core-1.0.5.jar
-rw-r–r–. 1 222146 Dec 30 03:40 camunda-dmn-model-7.8.0.jar
-rw-r–r–. 1 3624635 Dec 30 03:40 camunda-engine-7.8.0.jar
-rw-r–r–. 1 142869 Dec 30 03:40 camunda-engine-dmn-7.8.0.jar
-rw-r–r–. 1 4726 Dec 30 03:40 camunda-engine-feel-api-7.8.0.jar
-rw-r–r–. 1 185374 Dec 30 03:40 camunda-engine-feel-juel-7.8.0.jar
-rw-r–r–. 1 9139 Dec 30 03:40 camunda-engine-plugin-connect-7.8.0.jar
-rw-r–r–. 1 34925 Dec 30 03:40 camunda-engine-plugin-spin-7.8.0.jar
-rw-r–r–. 1 23546 Dec 30 03:40 camunda-identity-ldap-7.8.0.jar
-rw-r–r–. 1 50992 Dec 30 03:40 camunda-spin-core-1.4.1.jar
-rw-r–r–. 1 1937655 Dec 30 03:40 camunda-spin-dataformat-all-1.4.1.jar
-rw-r–r–. 1 7914 Dec 30 03:40 camunda-template-engines-freemarker-1.0.1.jar
-rw-r–r–. 1 164400 Dec 30 03:40 camunda-xml-model-7.8.0.jar
-rw-r–r–. 1 54373 Dec 30 03:40 catalina-ant.jar
-rw-r–r–. 1 119979 Dec 30 03:40 catalina-ha.jar
-rw-r–r–. 1 1584290 Dec 30 03:40 catalina.jar
-rw-r–r–. 1 75089 Dec 30 03:40 catalina-storeconfig.jar
-rw-r–r–. 1 276635 Dec 30 03:40 catalina-tribes.jar
-rw-r–r–. 1 2450404 Dec 30 03:40 ecj-4.6.3.jar
-rw-r–r–. 1 81505 Dec 30 03:40 el-api.jar
-rw-r–r–. 1 1018549 Dec 30 03:40 freemarker-2.3.20.jar
-rw-r–r–. 1 6997394 Dec 30 03:40 groovy-all-2.4.5.jar
-rw-r–r–. 1 1708138 Dec 30 03:40 h2-1.4.190.jar
-rw-r–r–. 1 161732 Dec 30 03:40 jasper-el.jar
-rw-r–r–. 1 586587 Dec 30 03:40 jasper.jar
-rw-r–r–. 1 38302 Dec 30 03:40 java-uuid-generator-3.1.2.jar
-rw-rw-r–. 1 654100 Mar 4 13:31 javax.mail-1.6.1.jar
-rw-r–r–. 1 570478 Dec 30 03:40 joda-time-2.1.jar
-rw-r–r–. 1 61674 Dec 30 03:40 jsp-api.jar
-rw-r–r–. 1 1251 Mar 6 12:52 mail-config.properties
-rw-r–r–. 1 1601156 Dec 30 03:40 mybatis-3.4.4.jar
-rw-r–r–. 1 244212 Dec 30 03:40 servlet-api.jar
-rw-r–r–. 1 29257 Dec 30 03:40 slf4j-api-1.7.7.jar
-rw-r–r–. 1 7901 Dec 30 03:40 slf4j-jdk14-1.7.7.jar
-rw-r–r–. 1 9841 Dec 30 03:40 tomcat-api.jar
-rw-r–r–. 1 720324 Dec 30 03:40 tomcat-coyote.jar
-rw-r–r–. 1 251061 Dec 30 03:40 tomcat-dbcp.jar
-rw-r–r–. 1 67814 Dec 30 03:40 tomcat-i18n-es.jar
-rw-r–r–. 1 41443 Dec 30 03:40 tomcat-i18n-fr.jar
-rw-r–r–. 1 43509 Dec 30 03:40 tomcat-i18n-ja.jar
-rw-r–r–. 1 144552 Dec 30 03:40 tomcat-jdbc.jar
-rw-r–r–. 1 31474 Dec 30 03:40 tomcat-jni.jar
-rw-r–r–. 1 115041 Dec 30 03:40 tomcat-util.jar
-rw-r–r–. 1 202403 Dec 30 03:40 tomcat-util-scan.jar
-rw-r–r–. 1 218923 Dec 30 03:40 tomcat-websocket.jar
-rw-r–r–. 1 36661 Dec 30 03:40 websocket-api.jar

2 I did not copy them, but added the dependencies in the pom as can be seen in my first post

Thanks for your assistance. If there’s anything else I can do to help, please shout.

Hi @eugene,

I tried but I can’t reproduce the issue. I set the version of javax.mail to 1.6.1 and send the mail via Gmail. It works as expected.

What mail provider do you use?
Did you have any new information that can help to reproduce the issue?

Best regards,
Philipp

@Philipp_Ossler

Eventually I uncovered the problem. I physically copied the 3 dependencies to the …/lib/ directory AND added the dependency definitions in the .pom. If I comment out the dependency definitions it works fine. Maybe it makes perfect sense to a Java developer … :star_struck:

1 Like

Hi @eugene,

I’m happy that you found the solution. Thank’s for sharing :+1: