aspose file tools*
The moose likes Servlets and the fly likes emailing functionality is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "emailing functionality is not working" Watch "emailing functionality is not working" New topic
Author

emailing functionality is not working

Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

On Friday 30 April 2004 18:50, Jignesh Patel wrote:
> HI All,
> Whenever I tried to send to other email address then the bangracing.com it
> says relaying denied as follows however it works fine for one domain bangracing.com except others. Can any body guide me what is the reason
> for not sending emails.
>
> message:
> MessagingException:Sending failed;
> nested exception is:
> class javax.mail.SendFailedException: Invalid Addresses;
> nested exception is:
> class javax.mail.SendFailedException: 554 <jpatel@bangtechnology.com>:
> Relay access denied
>
> my code is as follows:
>
> Properties properties = System.getProperties();
> properties.put("mail.transport.protocol","smtp");
> properties.put("mail.smtp.host","mail.bangracing.com");
> Session session = Session.getInstance(properties,null);
> MimeMessage message = new MimeMessage(session);
>
> try{
> message.setFrom (new InternetAddress("jpatel@bangracing.com"));
> message.setRecipient(Message.RecipientType.TO, new
> InternetAddress("jpatel@bangtechnology.com"));
> message.setSubject("Nutzz New Customer Inquiry Detail");
> String messageText = emailText;
> message.setText(messageText);
> Transport.send(message);
> }
>
> -Jignesh
danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
check whether both original and target mail servers are accessible.
check if there is a firewall.
Dan
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
Relay access denied -
May mean that the server does not recognize the from address as being a user who can legally mail through that system. It thinks you may be a spammer.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: emailing functionality is not working