cfmail and JavaMail
Hi All,
My applicatoin needs to send some email notifications with some registration codes included to my customers. So they can register an account by using this code to verify that the owns the email addresses. In my local machine, I try to implement the email functionality. I encountered some problems, however. 5 hours are gone for such a beautify Saturday. I am alittle tired. So I come here for help again. Greatly appreciated for any help offered. Here are two of my questions.
1. cfmail does not work in Developer's edition?
Of course cfmail tag is the simplest way to do emailing. In Administrator page I have entered "smtp.gmail.com" (without quotation) as the Mail Server, and my gmail user name and password as the authentication. Then I try cfmail tag in ColdFusion page. It does not work, neither does it display any error message. Also, in Administrator page I am not able to check "Verify mail server connection" checkbox. If I check it and click "submit changes" button, the checkbox remains unchecked and the check mark I put them disappear. I suspect that cfmail tag does not work in Developer edition, right?
2. Second question: I went ahead try to write a program myself using JavaMail. I have done so before in some Java project. So it did not take me long to reuse some code from before. After fully tested it, I moved the Java class files to C:\ColdFusion9\wwwroot\WEB-inf\classes. Then I invoked this Java class in ColdFusion page, the system gave me this error message below. I did try to find the solution myself. But it turned out to be far more complited than I thought. Someone suggests removing activation.jar file in C:\ColdFusion9\lib folder. But if I do this, my java program would not work at all. I know the error below is caused by different classloader version. Yet I have no idea how to and where to tweak it. Anyone has experience in this or related problems before? Much much Thanks!!
Error casting an object of type com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
com.sun.mail.handlers.text_plain cannot be cast to javax.activation.DataContentHandler |
