File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Error: Send a test email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Error: Send a test email" Watch "Error: Send a test email" New topic
Author

Error: Send a test email

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Guys!!!

I'm at Administration Screen - Configurations:

Sender: mymail@gmail.com
SMTP Server: smtp.gmail.com
Authorization: Yes
SMTP Username: mymail@gmail.com
SMTP Password: abcdefghijkl
Send a test email: myothermail@yahoo.com.br

When I click at button [Send a test email], the following error splashes:

TypeError: DWREngine._handleServerError is not a function

Anybody has any idea?

I would like to use Gmail as my SMTP mail server, would it be possible normally?

I know there is a tip about the port, but the Search feature of JForum.net's JForum is not working properly...
So, I can't find an old Gmail topic discuting this configuration...
Suggestions would be very welcome!!!

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
This problem is already fixed in the cvs.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I am using jForum 2.1.6 and am getting exactly the same error. What should I do ?
[originally posted on jforum.net by vdprao]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Wait for the next version, or get the fixed code from the cvs

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:This problem is already fixed in the cvs.

Rafael


Hi Guys!!!

redhand helped me to download all the CVS's files at the following topic:
http://www.coderanch.com/t/576143

Now I know the bug cited above is already corrected at CVS and, plus, I have all the newest CVS version.

What exactly should I do? Cut + Paste the correct(s) file(s) over the buggy file(s)?

Tips and recomendations would be very appreciated!!!

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Yes, a copy & paste should do the job.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:Yes, a copy & paste should do the job.

Rafael


TKS Rafael!

Just a simple question: what should be these files?

(About this specific bug, of course. You could please tell the path OR a way which I could find it by myself: independencing...)

[ ]'s :lol:
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
And I would like to add another question: the CVS files are *.java, while the JForum are *.class. In this specific case I imagine that the path which the files must be changed is the following:

C:\tomcat\webapps\jforum\WEB-INF\classes\net\jforum\util\mail


So, I copied the *.java from CVS to the same folder where are the *.class and tried to compile them: lots of errors appeared!

By now, I really don't know what to do, but would appreciate any help!

[ ]'s

[EDIT]redhand helped me with this specific question at CVS for Dummies Help topic. Now I already changed the files from this path, but the error cited above, at the 1st message, is the same!

:?: The Great Question already exists: what are the files I must change to correct this bug? :?: [/EDIT]
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Guys!!!

I already made the following steps:

1. Renamed the \templates\default\post_form.htm to \templates\default\post_form.htm.BKP
2. Copied the \cvs\jforum\templates\default\post_form.htm to \templates\default\post_form.htm
3. Renamed the \templates\default\admin\config_list.htm to \templates\default\admin\config_list.htm.BKP
4. Copied the \cvs\jforum\templates\default\admin\config_list.htm to \templates\default\admin\config_list.htm
5. Renamed the \WEB-INF\classes to \WEB-INF\classes-BKP
6. Copied the \cvs\jforum\WEB-INF\classes to \WEB-INF\classes

The \WEB-INF\config\SystemGlobal.properties has the following SMTP about lines:


The \WEB-INF\config\jforum-custom.conf has the following SMTP about lines (not in sequence, but searching we can discover them mixed with the other lines):


When at Configuration screen, if I try to Send a test email to myyahoouser@yahoo.com.br, I press [Send a test email] button. It changes to [Sending...] "forever". So, if I click [Refresh] or even if I click at another link, the following error message appears:

[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE)
[nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS
frame :: http://localhost:8080/jforum/dwr/engine.js?1150309795578 :: anonymous :: line 530"
data: no]


:?: The SMTP mechanism already doesn't works!!! Some suggestion??? :?:
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Why does mail.sender and username contains HTML data?

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:Why does mail.sender and username contains HTML data?

Rafael


I asked me it too! :O
I don't know why, but be sure that it wasn't added by me! It must be JForum's AI...
Anyway, what do you think is happening with the SMTP mechanism? It doesn't work in any combination of tries I already did!
My JForum is running without this feature...
Helps?
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Guys!!!

Take a look:

\WEB-INF\config\SystemGlobal.properties


\WEB-INF\config\jforum-custom.conf


The key mail.smtp.port = 25 isn't present at jforum-custom.conf file!

My question is: could we manually add this (and/or any other) line to jforum-custom.conf, or if I want change the GMail's SMTP port to 465 (or 587) I have to change it at SystemGlobal.properties?

Shortly: how do I change the SMTP port?

[ ]'s

[EDIT]Rafael, try to edit this message... you'll see that the content posted by me is a few different of what appears!!! I didn't post any mailto, for example... take a look![/EDIT]
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
jforum-custom, as the name says, is a customization file. Any key there present will have priority over SystemGlobals.properties.

If the key does not exists on jforum-custom.conf, JForum will get it from SystemGlobals.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
jforum-custom, as the name says, is a customization file. Any key there present will have priority over SystemGlobals.properties.

If the key does not exists on jforum-custom.conf, JForum will get it from SystemGlobals.

Rafael


Hi Rafael!!! (I see you are online now... :- )

TKS for more this tip! However, my SMTP engine doesn't work yet!

I really don't know what more to do...

Configured both the configuration files, tried original 2.1.6 version, CVS from 20060609, CVS from 20060622... nothing! :?

Maybe something essencial has passed... any idea?

And more: you sad that "If the key does not exists on jforum-custom.conf, JForum will get it from SystemGlobals". In this case, I created the key on jforum-custom.conf! It doesn't exist in anyplace there.

I know that GMail has different ports to SMTP service, so I tried to change it! Anyway, I did, redid, don't did... and not happens different of alternating error messages when I click [SEND MAIL] :-)

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Leandro,

Could you pls tell me if you have send mail running (Send a test e-mail)? Having the same error.


Thanks.
carlos.bergueira@gmail.com
[originally posted on jforum.net by bergueira]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
bergueira wrote:
Hi Leandro,

Could you pls tell me if you have send mail running (Send a test e-mail)? Having the same error.


Thanks.
carlos.bergueira@gmail.com


Hi Guy!

If I send an email from Yahoo! Mail, it goes ahead! But if I send one from GMail, it "crashes" JForum!

I think it's a port problem... but I "resolved" using Yahoo

If somebody discover how to do it from GMail, I would be pleasured!

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello Leandro,

you say that you got SMTP mechanism of JForum working with yahoo mail server. So what was the actual problem which cased TypeError: .... message when sending test email?

Thanks,
Andrew Stepanenko.
[originally posted on jforum.net by andrew.stepanenko]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
andrew.stepanenko wrote:you say that you got SMTP mechanism of JForum working with yahoo mail server. So what was the actual problem which cased TypeError: .... message when sending test email?


It depends...

In GMail's case, for example, I think it's the SMTP port! The default SMTP port usually is setted as 25, but GMail uses other.

JForum, however, has in the /WEB-INF/config/SystemGlobals.properties the tag mail.smtp.port = 25!

So, we could over set it at /WEB-INF/config/jforum-custom.conf, anyway, I tested it a lot, trying to make different combinations... it didn't work!

Maybe somebody have a tip! ;-)

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
In my case,

I compiled the latest CVS source tree and substituted WEB-INF/classes directory of existing JForum installation with newly compiled .class files and it has send a test email message using our local network SMTP server.

But another problem appeared. When a user now logs in, JForum forwards it to /forums/list.page but for some reasons omits the context name (/jforum/), so I get HTTP 404 Not found error.
Strange, in template files looks like it uses everywhere JForumContext.encodeURL() method but the context name is not added to URL in the case of login form (I'm speaking about redirect to /forums/list.page after successful login).

Andrew.

[originally posted on jforum.net by andrew.stepanenko]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
HHmm.. strange.

Which servlet container are you using? if possible, please attach the configuration here, so we can take a look.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello,

we use Tomcat 5.0.28 configured behind Apache mod_proxy (AFAIK). We're behind the University firewall and serve unf.tane.edu.ua domain from a computer with local IP.

Basically, it worked well before I substituted WEB-INF/classes with latest CVS snapshot dating July 31.

I managed to get a quick and dirty workaround for this problem by adding a hard coded /jforum/ context name to redirect part of net.jforum.view.forum.UserAction.validateLogin(). Then things started to work. Of course, substituting just classes directory and not the whole jforum webapp directory maybe bad practice, but July 31 CVS snapshot didn't even worked for me when deployed entirely. It showed some complains about missing tables in database etc. (Attempt to process an empty result set.). The last was tried both with tomcat 5.0.28 and 5.5.16.

The above problem with redirect maybe very specific to our install, and I understand that, as we have ROOT app being our custom main app which is served after unf.tane.edu.ua domain is resolved. But we also have some other webapps on the same server and they work well when the URL contains the appropriate context name.

Rafael, I can send you our server.xml to your email if you want.

Regards,
Andrew Stepanenko

[originally posted on jforum.net by andrew.stepanenko]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Please send it, and as much information as possible about your environment - we'll try to reproduce it here.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I just upgraded to 2.1.6 ... now I see this error as well. This has ben VERY painful upgrading just to fix an attachment problem.

Do I now have to upgrade again to the latest cvs branch??

What other major problems will I run into then?
[originally posted on jforum.net by conquest]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello,

has anyone solved the problem with Gmail?

Thanks.
[originally posted on jforum.net by AnotherGuest]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Not yet.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Could you provide a list of files that were updated because of this fix?

I don't want to use the full cvs version of the forum, I just want the email fix for the 2.1.6 release. Or can you point me to a place where I can find this out myself? I searched the JIRA thing, but couldn't find the issue.

Thanks,
Robert


[originally posted on jforum.net by coolste]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
That's going to be hard to find at this point. Sorry.

Support for gmail and all other servers that require ssl are now done in the development version, and an upgrade of just these parts it's not really an option.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error: Send a test email