problem sending mail: Sending the email to the following server failed

  • Follow


HiI use this code to send emails:import org.apache.commons.mail.*;SimpleEmail email = new SimpleEmail();email.setFrom(from, "Name");email.addTo(to);email.setSubject(oggetto);email.setHostName("mailserver");email.setMsg(messaggio);email.send();if the "To" field is an internal address of the domain(name@domain.it) it works and the mail is sent.If the "To" field is a domain external address (name@yahoo.com) itgives me the error:Sending the email to the following server failed : mailserver:25How is it possibile?any solution?thanks
0
Reply lmarantelli (2) 3/15/2007 9:53:29 AM

On 15 Mar 2007 02:53:29 -0700, Luke wrote:> if the "To" field is an internal address of the domain> (name@domain.it) it works and the mail is sent. If the "To" field is> a domain external address (name@yahoo.com) it gives me the error:> Sending the email to the following server failed : mailserver:25Where is the rest of the code?What was the complete error message from the mailserver?What happened when you turned on debugging with setDebug(true)?Is "mailserver" the name of the outgoing SMTP server for your domain?Do you need to authenticate with the SMTP server in order to sendoutgoing mail?/gordon-- [ don't email me support questions or followups ]g o r d o n  +  n e w s  @  b a l d e r 1 3 . s e
0
Reply Gordon 3/15/2007 10:03:45 AM


Luke wrote:> Hi> I use this code to send emails:> > import org.apache.commons.mail.*;> > SimpleEmail email = new SimpleEmail();> email.setFrom(from, "Name");> email.addTo(to);> email.setSubject(oggetto);> email.setHostName("mailserver");> email.setMsg(messaggio);> email.send();> > if the "To" field is an internal address of the domain> (name@domain.it) it works and the mail is sent.> If the "To" field is a domain external address (name@yahoo.com) it> gives me the error:> Sending the email to the following server failed : mailserver:25> > How is it possibile?> any solution?> > thanksProbably because the administrator of that mail server has configured it toprevent it being used as a relay. Are you supposed to be able to use that mailserver for relaying messages?What it the error code and message returned?-- Nigel Wade, System Administrator, Space Plasma Physics Group,            University of Leicester, Leicester, LE1 7RH, UK E-mail :    nmw@ion.le.ac.uk Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555
0
Reply Nigel 3/15/2007 10:54:32 AM

2 Replies
636 Views

(page loaded in 0.051 seconds)

Similiar Articles:













7/22/2012 6:00:02 AM


Reply: