>-----Original Message-----
>From: Mike Baranski [mailto:
[hidden email]]
>Sent: Tuesday, October 13, 2009 9:13 AM
>To: 'Commons Users List';
[hidden email]
>Subject: RE: [Mail] Hangs on send()
>
>OK, here's the code, and I get no more information, just hangs on the
>send()
>(and will hang for days).
>
>Properties props = new Properties();
> props.put("mail.debug", new Boolean(true));
> Session session = Session.getInstance(props, null);
>
> // Create the email message
> MultiPartEmail email = new MultiPartEmail();
> email.setMailSession(session);
>
> email.setHostName(this.mailServer);
> for(int i = 0 ; i < this.toEmail.length ; i++)
> {
> email.addTo(this.toEmail[i]);
> }
>
> email.setFrom(this.fromEmail);
> if(this.emailSubject != null)
> {
> email.setSubject(this.emailSubject);
> }
> else
> {
> email.setSubject("No Subject");
> }
>
> if(this.getMessage() != null)
> {
> email.setMsg(this.getMessage());
> }
> else
> {
> email.setMsg("No Message Provided");
> }
>
> // add the attachment
> email.attach(attachment);
> log.debug("Sending email via " + this.mailServer);
> log.debug("Email: " + email);
>
>>-----Original Message-----
>>From: Siegfried Goeschl [mailto:
[hidden email]]
>>Sent: Saturday, October 10, 2009 4:00 PM
>>To: Commons Users List
>>Subject: Re: [Mail] Hangs on send()
>>
>>Hi Mike,
>>
>>have a look at
>>
http://java.sun.com/products/javamail/javadocs/overview-summary.html>and
>>"mail.debug"
>>
>>Cheers,
>>
>>Siegfried Goeschl
>>
>>Mike Baranski wrote:
>>> My app hangs on send, but I can telnet to port 25 on the mail server
>>I'm
>>> using and send an email.
>>>
>>> Can someone explain to me how to turn on debug for the commons-mail
>>and see
>>> what's hanging?
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
[hidden email]
>>> For additional commands, e-mail:
[hidden email]
>>>
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail:
[hidden email]
>>For additional commands, e-mail:
[hidden email]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:
[hidden email]
>For additional commands, e-mail:
[hidden email]