• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

email not reaching recipient

 
albert sie
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
albert sie
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20171
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that mean we need to setup a mail server in order to know what the error within sending ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic