473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Send Mail through jsp

254 100+
I send a bunch of data from jsp to my email.
There following code is pieces from jsp.

It compiled with no error.
It runs successfully sent email to my email address, BUT sometimes it cannot.

why it cannot ? How to removed my ip address from blacklist ? how to solve this problem ?
Here is the message from console :
Exception --> javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 554 The IP Address of the sender (60.xx.22.oo) was found in a DNS blacklist database and was therefore refused.

Expand|Select|Wrap|Line Numbers
  1. String subject = "This is subject ";
  2. String message = "";
  3.  
  4. String to = "sheng@xxx.com.my";  
  5. String from = "info@yyy.com.my";
  6.  
  7.         try {
  8.  
  9.         Properties props = new Properties();
  10.         props.put("mail.smtp.host","mail.asiam.com.my");
  11.  
  12.         Session ss = Session.getDefaultInstance(props, null);
  13.  
  14.         MimeMessage msg = new MimeMessage(ss);
  15.  
  16.         InternetAddress addressfrom = new InternetAddress(from);
  17.           msg.setFrom(addressfrom);
  18.  
  19.         InternetAddress addressTo = new InternetAddress(to);
  20.         msg.addRecipient(Message.RecipientType.TO, addressTo);
  21.  
  22.  
  23.     message = "Name : " + name + 
  24.                 "\n" + "Address : " + address;
  25.  
  26.         msg.setSubject(subject);
  27.         msg.setContent(message, "text/plain");
  28.         Transport.send(msg);
  29.  
Aug 15 '07 #1
1 1850
you might wanna try http://member.dnsstuff.com/pages/tools.php

In IP tools you have spam database lookup and you can check which databases list your server. Then you can take actions... My guess is that all you need to do is send them a mail declaring that you've fixed the spam problem (but if you didn't chances are they'll list you again).

Maybe better option would be to switch server if possible...


May the source be with you!
Aug 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
6
by: John J. Hughes II | last post by:
I have a service that needs to send e-mail alerts. I have been attempting to use the System.Net.Mail function from .NET but this seems to require the IIS be installed and running. Since some of...
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
15
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.