tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felix <fe...@crucial-systems.com>
Subject Re: UnknownHostException thrown from SmtpClient
Date Tue, 13 Nov 2001 22:54:51 GMT


> From: "Craig R. McClanahan" <craigmcc@apache.org>
>> on a related topic,
>> I've been trying to figure out if JavaMail threads / forks when it sends.

> Besides the fact that it's probably an insignificant effect on response
> time (unless you're sending large numbers of messages on one request),

that's what i wanted to hear. thanks!  its just a quick email send (to
another company), i just want to make the whole response as quick as
possible.

> By the way, Tomcat 4 offers support for a JavaMail resource that you can
> access from all of the servlets and JSP pages in your web app, without
> having to configure all of them for the appropriate SMTP host.  See
> Craig

bravo!  i was just thinking "why isn't javamail included if we should
definitely use it?"


on the other topic:

i have exim (http://www.exim.org) installed (it came with our dedicated
server).  it appears to be more robust in terms of queuing, freezing,
unfreezing, managing and retrying than classic sendmail.

with xwindows you can open a manager to sort through the queue.


of course i'm still getting this

javax.servlet.ServletException: Sending failed;
  nested exception is:
        javax.mail.MessagingException: 501 syntactically invalid HELO
argument(s)

though it should be an exact replacement.

code is dirt simple:

        String FromAddress = "support@royalsweeps.com";
        String ToAddress = "design@crucial-systems.com";
        String Subject = "testttjavamail";
        String Body = " bodydddyyy";

        Properties p = System.getProperties();
        p.put("mail.host","209.41.200.16");

        MimeMessage message = new MimeMessage(Session.getInstance(p, null));
        message.setFrom(new InternetAddress(FromAddress));
        message.setRecipients(Message.RecipientType.TO,
        InternetAddress.parse(ToAddress));
        message.setSubject(Subject);
        message.setText(Body);

        Transport.send(message);



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message