aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes email not reaching recipient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "email not reaching recipient" Watch "email not reaching recipient" New topic
Author

email not reaching recipient

albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
i solve all the error already. But when i do the testing for my send mail application, the email cannot reach the recipient. here i post my code, if i code something wrong please tell me thank you.
Form Code:


this is my form code. i need to go in to this page to do my key in address message body and so on and i using smtp.mail.yahoo.com as my host.

send.jsp:

the jsp will call the bean file to send out the message. in the jsp will pass in the relevent information to sending message.

BEAN CODE:


this is the bean file that use to send out the message to the recipient.
please help me to figure out the problem i know you are the expert and experience in java field. i'm just the trainee in a company that first time using the java to do a program. Please Help Me Please....
[ February 13, 2006: Message edited by: Bear Bibeault ]

JAVA the only can called technology
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61232
    
  66

albert, please read this and in the future, use a more meaningful subject for your posts. "PleaseHELP Me !!!~~~" doesn't convey one iota of information about your problem.

I have adjusted the subject line of this topic to better suit the question.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61232
    
  66

You'd be best served to factor all that Java code out of your JSP and into a bean or servlet.

But in any case, the JavaMail API is best discussed in the Other Java APIs forum, so this topic has been moved there.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41899
    
  63
the email cannot reach the recipient.

What does this mean? Can you connect to the email server? Is the email sent? What do you see in the log files of the email server?


Ping & DNS - my free Android networking tools app
albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
for testing purpose, i try to use the yahoo smtp host that is smtp.mail.yahoo.com. i try to send out my mail to my another account, but when i sending out and i go to check with my account, the message is not there that's mean i haven' t can send out the message. my coding is on upthere so can you please help me to check that what the problem is and should i have anything to add in to make i'm can send out the message?

thank you

Best regards,
albert
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41899
    
  63
Stuff like this is hard to get right in a JSP; I'd advise to follow Bears suggestion of using a bean or a servlet. You could also use one of any number of SMTP classes that are available on the web, instead of writing your own.

And just to nitpick: the fact that no message arrives at your account does not mean that no message was sent. That's why it's helpful to use a mail server you control for testing purposes, so you can check the log files.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Originally posted by albert sie:
for testing purpose, i try to use the yahoo smtp host that is smtp.mail.yahoo.com.
Yahoo doesn't do relaying. They don't want to have people using their accounts to send out spam.

You're testing an application? So when it goes live, will you be using some other server? If so, that will be a server where you can work with the administrator to make sure it will send out your e-mail messages, right? You should get together with that administrator sooner rather than later to learn the facts of life with respect to Internet e-mail.

Otherwise your project may be in trouble. Administrators of e-mail servers don't open their systems to everybody in the world. They need to know who you are, and they need to know that you won't be sending spam. Yahoo can't do that.
albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
that mean we need to setup a mail server in order to know what the error within sending ?
 
wood burning stoves
 
subject: email not reaching recipient