ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37547] New: - MailTask eats smtp errors, only reports "Failed to send email"
Date Thu, 17 Nov 2005 11:31:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37547>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37547

           Summary: MailTask eats smtp errors, only reports "Failed to send
                    email"
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: g.hueller@gmx.at


I wanted to use the "mail" core task, and in my configuration there must be 
some problem with the mail server.
However I have no chance to find out, even when I tried running with "ant -
debug", because EmailTask eats the true cause and only writes a generic warning 
message, even at the highest trace level.

thus my enhancement suggestions:
1. in EmailTask it says
        } catch (BuildException e) {
            log("Failed to send email", Project.MSG_WARN);
here it would be nice to have 
            log("Failed to send email, reason: "+e.getMessage(), 
Project.MSG_WARN);
or better yet an additional line with the stack trace of e.getCause()
and two lines down same thing.

2. in MimeMailer there is also such a catch block:
        } catch (MessagingException e) {
            throw new BuildException("Problem while sending mime mail:", e);
        } catch (IOException e) {
            throw new BuildException("Problem while sending mime mail:", e);
        }
perhaps you could make this a new BuildException("Problem while sending mime 
mail: "+e.getMessage(), e);


3. IF Ant's global log level is set to DEBUG, I would love to see the debug 
messages of java mail as well, i.e. in MimeMailer (and perhaps somewhere else) 
add 
        props.put("mail.debug", "true");
(no idea where JavaMail debug output goes to, sorry)


Thanks from Vienna,
     Gernot

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message