Actually he needs to substitute the smpt.jspinsider.com with his smtp
server. The "mail.smtp.host" is the property key.
I sent him a private note explaining his problems. I didn't think the whole
group needed to deal with it so I sent it directly to him.
Jim
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Shawn Zhu
Sent: Thursday, May 31, 2001 11:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] jrun:sendmail
If using CDONTS worked for you on the same machine, that means
you have a smtp server. now you just need to figure out what to put
in props.put("mail.smtp.host", "smtp.jspinsider.com");
You need to substitute "mail.smtp.host" to the hostname of your smtp
server.
> -----Original Message-----
> From: Supreme Being [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 31, 2001 8:48 AM
> To: [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
>
> ==============================================================
> =============
> 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
===========================================================================
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