Sorry, POP3 access is for retrieving and reading email only.  SMTP is how
you send email...

The "mail.smtp.host" is telling the system what property you are setting.
You must set this to a smtp server name that you have access to.  You can
not use a POP3 server to send mail.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Supreme Being
Sent: Thursday, May 31, 2001 10:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] jrun:sendmail


Jim,

thank you very much Sir. i guess finally i've understood everything u're
trying to tell me.

I have a few things though i'd like to clear out. For sending mails, i can
use a POP3 account as well, instead of an SMTP one?
Now if that is the case, how do i insert it into my code....

props.put("mail.smtp.host", "smtp.jspinsider.com");

This is the code that connects to the SMTP server. If i replace this with

props.put("mail.smtp.host", "mypop3.com");

but what do i do with "mail.smtp.host" and where & how do i put in the
username & password that is needed to access my POP3 account. In fact, for
that matter, even if i do have an SMTP account, how do give the user/pwd?
There is another line of code that mentions SMTP :

transport = sendMailSession.getTransport("smtp");
transport.send(newMessage);

What will i have to change in this "smtp" in order for my POP3 account to
function?

I'm sorry for constant questions. I'm new to both JSP and Mail servers.

Thanks a lot,
Cheers & Glory,
SupremeBeing

>From: "Jim Rueschhoff" <[EMAIL PROTECTED]>
>To: "Supreme Being" <[EMAIL PROTECTED]>
>SUBJECTDate: Thu, 31 May 2001 09:43:46 -0700
>
>You can use any mail provider you want including internet mail but you must
>have pop3, imap and/or smtp access to the mail servers.  A mail server
>provided by your internet service provider would be fine but you must have
a
>mail server to connect to from java mail.
>
>The javamail package is a java extention and as such should be installed in
>the d:\Allaire\JRun\lib\ext directory to be consistant with the other javax
>files.  You could install them elsewhere but you would have to change the
>import paths, etc. to get it to work.  Your error message seems to indicate
>that the system is finding them however.
>
>The java container (server) you are using is JRun from you other answers.
>
>Your code shows you are trying to send the email through the
>smtp.jspinsider.com email server.  You need to change this to an email
>server that you have permission to use.  I am not sure what servers you
have
>available but for instance if you were an earthlink customer you would use
>something like mail.earthlink.net as an email server.  I didn't check it
>closely but it appears to me that the rest of your code is ok.
>
>I have not seen the exact error you are getting before but I think it may
>mean that the smtp.jspinsider.com email server is rejecting your attempt to
>use it because your domain name is not authorized to send email through
that
>server.
>
>Perhaps someone here that has seen this error before can confirm it.
>
>I hope that helps.
>
>-----Original Message-----
>From: Supreme Being [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 31, 2001 8:48 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: jrun:sendmail
>
>
>Jim,
>
>I'm not having any email server installed on my system. In fact i use
>Internet Mail (Yahoo, Hoboe) etc. Apart from JSP, i use PHP and ASP for my
>Server Programming. PHP has the in-built mail() function and ASP uses
either
>the CDONTS component or JMail. So i never faced any such problem with them.
>However, now with JSP, i'm having these problems sending mail.
>
>>JavaMail and JAF works fine.  How do you have it installed.  In which
>>directories did you put all the .jar files.
>
>I've placed all these files in D:\Allaire\JRun\servers\lib
>In fact, they are also in D:\Allaire\JRun\lib
>cause on person told me they should go there.
>
>>What java container are you using?
>This, i don't understant.
>
>>When you say it doesn't work, what do you mean?
>Well this the error that i get when i click my "Send" button :
>
>javax.mail.SendFailedException: Sending failed; nested exception is:
>javax.mail.SendFailedException: Invalid Addresses; nested exception is:
>javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of
>allowed rcpthosts (#5.7.1)
>
>And if you wanna see ... this is the code that i'm using :
>
><%@ page
>  import=" javax.mail.*, javax.mail.internet.*,
>javax.activation.*,java.util.*"
>  %>
><%
>
> try{
>   Properties props = new Properties();
>   Session sendMailSession;
>   Store store;
>   Transport transport;
>
>  props.put("mail.smtp.host", "smtp.jspinsider.com");
>  sendMailSession = Session.getInstance(props, null);
>  Message newMessage = new MimeMessage(sendMailSession);
>  newMessage.setFrom(new InternetAddress(request.getParameter("from")));
>  newMessage.setRecipient(Message.RecipientType.TO, new
>InternetAddress(request.getParameter("to")));
>  newMessage.setSubject(request.getParameter("subject"));
>  newMessage.setSentDate(new Date());
>  newMessage.setText(request.getParameter("text"));
>
>  transport = sendMailSession.getTransport("smtp");
>  transport.send(newMessage);
>   %>
><P>Your mail has been sent.</P>
><%
>  }
> catch(MessagingException m)
>  {
>  out.println(m.toString());
>  }
>%>
>
>Anything else you need to know?
>
>Thanks,
>SupremeBeing
>
>
>
>******************
>From my right-eye i create all for myself, from the left-eye i accept all
>that there is otherwise. It is nothing more than what i deserve, for i am
>the Supreme Being
>******************
>
>------------------------------------------------------------
>Are you a Hoboe?  Hobnob at http://www.hoboe.com
>Click here -> http://www.hoboe.com Global Mail Access



******************
>From my right-eye i create all for myself, from the left-eye i accept all
that there is otherwise. It is nothing more than what i deserve, for i am
the Supreme Being
******************

------------------------------------------------------------
Are you a Hoboe?  Hobnob at http://www.hoboe.com
Click here -> http://www.hoboe.com Global Mail Access

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to