diff --git a/docs/manual/CoreTasks/mail.html b/docs/manual/CoreTasks/mail.html index 5d981404c..ff14f0d76 100644 --- a/docs/manual/CoreTasks/mail.html +++ b/docs/manual/CoreTasks/mail.html @@ -40,10 +40,16 @@ body may be specified. To send binary attachments the optional
* * @author glenn_twiggs@bmc.com + * @author Magesh Umasankar */ public class SendEmail extends Task { private String from; @@ -119,6 +125,7 @@ public class SendEmail extends Task { private String toList; private String subject; private Vector files = new Vector(); + private boolean includefilenames; /** Creates new SendEmail */ public SendEmail() { @@ -190,6 +197,15 @@ public class SendEmail extends Task { } } + /** + * Sets Includefilenames attribute + * + * @param includefilenames Set to true if file names are to be included. + */ + public void setIncludefilenames(boolean includefilenames) { + this.includefilenames = includefilenames; + } + /** * Executes this build task. * @@ -230,15 +246,25 @@ public class SendEmail extends Task { int bufsize = 1024; int length; byte[] buf = new byte[bufsize]; - + if (includefilenames) { + String filename = file.getName(); + int filenamelength = filename.length(); + out.println(filename); + for (int star=0; star < filenamelength; star++) { + out.print('='); + } + out.println(); + } BufferedInputStream in = null; try { in = new BufferedInputStream( new FileInputStream(file), bufsize); - while ((length = in.read(buf, 0, bufsize)) != -1) { out.write(buf, 0, length); } + if (includefilenames) { + out.println(); + } } finally { if (in != null) { in.close();