Pallav
What are the requirements for this program to work...
I have given the yahoo id , password , from , to ids...
But i get the error as cudnt connect to pop.mail.yahoo.com..
what cud be the problem..?
Viju

> ----------
> From:         pallav[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology.
> Sent:         Tuesday, March 19, 2002 12:25 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Mailing using java
>
> here's my code for mailing..u need to setup pop access in yahoo under web
> access and pop forwarding...
>
>   Properties props = new Properties();
>   Session ses = Session.getDefaultInstance(props,null);
>   Store store = ses.getStore("pop3");
>   store.connect("pop.mail.yahoo.com","yahooID","password");
>   MimeMessage message = new MimeMessage(ses);
>   Address to = new InternetAddress(" [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>");
>   Address from = new InternetAddress(" [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>");
>   String person = req.getParameter("first") + " " +
> req.getParameter("last");
>   Address replyTo = new InternetAddress(req.getParameter("replyto"),
> person);
>   Address[] replyArr = {replyTo};
>   Address[] toArr = {to};
>   message.setFrom(from);
>   message.addRecipients(Message.RecipientType.TO, toArr);
>   message.setReplyTo(replyArr);
>   message.setSubject("Feedback");
>   message.setText(req.getParameter("comments"));
>   message.setSentDate(new Date());
>   message.saveChanges();
>   Transport.send(message);
>   store.close();
>
> for java stuf..goto <http://pallav.cjb.net>
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to