About Ant and email

Posted on 2002-04-04
Last Modified: 2012-06-27

This is about the Ant project from Jakarta. I guess this question would be better answered at their mailing list but I dont have the patience to join a mailing list just for this.

This is about the built in task called 'mail'. When I use it, the message I get is: Connection refused. This may be expected because I havent given any details regarding the mail server, user name and password. Where is it picking these from?

Note: I do not want to use the optional task MimeMail.
Question by:hardeepbsingh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

coreyit earned 50 total points
ID: 6919008
The default mailhost is "localhost". If you do not have a mail server running on localhost, then you need to specify one with mailhost="HOSTNAME" where HOSTNAME is your mail server.

<mail from="joe" tolist="" subject="hey there" files="attachment.txt" mailhost="mailserver"/>


Author Comment

ID: 6920173
Yeh thanks, its there in the documentation dont know how i missed it. However, my mail host requires authentication (username and password). How do I handle that?

Also, I have one more question (this will have another 50 points). I am posting it here since it is related to ant. I am using JDK1.2.1 to run Ant. If I use crimson as my JAXP XML parser everything works fine but I get this in between:

A nonfatal internal JIT (3.00.078(x)) error 'Relocation error: NULL relocation target' has occured in:
'org/apache/crimson/parser/Parser2.maybeComment (Z)Z':Interpreting method

Have you or anyone else faced this problem? If I change VM (use Microsoft VM for Java 1.1.4) or the parser (use sun parser) this problem goes away. Please suggest.

Author Comment

ID: 6920240
The nonfatal JIT error problem is solved. For the records, I want to state that this is a common problem caused by a bug in jdk. The solution is to ignore it or to upgrade to jdk 1.3.
Now corey, if you can tell me about the authentication part, please do.

Expert Comment

ID: 7932682
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts refunded
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to execute a Python program and gather return output in Java 2 49
Chrome and Firefox Java 5 67
Java Eclipse Loop 3 31
IBM TS2900 (3572) Tape Autoloader Java? 12 59
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question