98204
Goto Top

Apache Ant sendet Mail nicht

Hallo zusammen,

ich hoffe ich habe das richtige Thema gewählt.
Ich will mit einem Script für Apache Ant eine Mail senden.
Script build.xml sieht so aus:
<project name="LearningAnt" >  
   <target name="mail2work">  
      <mail mailhost="smtp.web.de" user="xyz@web.de" password="superpassword" mailport="587" ssl="true" enableStartTLS="true" encoding="mime" messagemimetype="text/html" subject="Test">  
         <from address="xyz@web.de"/>  
         <to address="abc@bla.com"/>  
         <message>This is a test message created by ANT</message>
      </mail>
   </target>
</project>

Aufruf:
>ant mail2work -verbose
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
Trying the default build file: build.xml
Buildfile: ...\build.xml
Detected Java version: 1.8 in: C:\Program Files\Java\jdk1.8.0_72\jre
Detected OS: Windows 7
parsing buildfile ...\build.xml with URI = file:.../build.xml
Project base dir set to: ...
Build sequence for target(s) `mail2work' is [mail2work]  
Complete build sequence is [mail2work, main, mail2web.de, ]

mail2work:
parsing buildfile jar:file:/T:/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/T:/ant/lib/ant.jar!
/org/apache/tools/ant/antlib.xml from a zip file
     [mail] Using MIME mail
     [mail] Sending email: Test
     [mail] From xyz@web.de
     [mail] ReplyTo 
     [mail] To [abc@bla.com]
     [mail] Cc 
     [mail] Bcc 
     [mail] Failed to send email: Exception reading response

BUILD FAILED
...\build.xml:34: Problem while sending mime mail:
        at org.apache.tools.ant.taskdefs.email.MimeMailer.send(MimeMailer.java:284)
        at org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:575)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
...........................

Hat einer eine Idee was hier falsch läuft?

Danke im voraus.
Der Internetter

Content-Key: 304891

Url: https://administrator.de/contentid/304891

Printed on: April 26, 2024 at 06:04 o'clock