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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 2 42
where is session ID cache stored 1 39
JDeveloper 12c for 32 bit 4 35
eclipse formatting 6 41
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
This video teaches viewers about errors in exception handling.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now