Hi,
I am using java application to send email.
My Email server is "Godaddy.com".
host is smtpout.secureserver.net
port is : 25
when I use gmail(smtp.gmail.com) it works fine, but using godaddy I can't send mail
this is my code:
-----------------------------------------------------------------------
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", "relay-hosting.secureserver.net");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.socketFactory.port", "25");
//props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
props.setProperty("mail.smtp.quitwait", "false");
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator()
{
protected PasswordAuthentication getPasswordAuthentication()
{ return new PasswordAuthentication("username@xx.com","pass"); }
});
MimeMessage message = new MimeMessage(session);
message.setSender(new InternetAddress("vinoth@clss.in"));
message.setSubject("test");
message.setContent("Hi pon", "text/html");
message.setRecipient(Message.RecipientType.TO, new InternetAddress("xxxx@clss.in"));
Transport.send(message);
---------------------------------------------------------------------------------------------------------------------------------------------------------
I get Error message like this:
--------------------------------------
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, relaying denied from your location [115.117.232.45] (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1835)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at Mailing.SendMail.clss_sendMail(SendMail.java:107)
at Mailing.SendMail.main(SendMail.java:31)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, relaying denied from your location [115.117.232.45] (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1686)
... 5 more
any idea please?
I am using java application to send email.
My Email server is "Godaddy.com".
host is smtpout.secureserver.net
port is : 25
when I use gmail(smtp.gmail.com) it works fine, but using godaddy I can't send mail
this is my code:
-----------------------------------------------------------------------
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
Properties props = new Properties();
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.host", "relay-hosting.secureserver.net");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", "25");
props.put("mail.smtp.socketFactory.port", "25");
//props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
props.setProperty("mail.smtp.quitwait", "false");
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator()
{
protected PasswordAuthentication getPasswordAuthentication()
{ return new PasswordAuthentication("username@xx.com","pass"); }
});
MimeMessage message = new MimeMessage(session);
message.setSender(new InternetAddress("vinoth@clss.in"));
message.setSubject("test");
message.setContent("Hi pon", "text/html");
message.setRecipient(Message.RecipientType.TO, new InternetAddress("xxxx@clss.in"));
Transport.send(message);
---------------------------------------------------------------------------------------------------------------------------------------------------------
I get Error message like this:
--------------------------------------
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, relaying denied from your location [115.117.232.45] (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1835)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at Mailing.SendMail.clss_sendMail(SendMail.java:107)
at Mailing.SendMail.main(SendMail.java:31)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 553 sorry, relaying denied from your location [115.117.232.45] (#5.7.1)
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1686)
... 5 more
any idea please?