setReplyTo
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Java_Developer
Posted On:   Monday, April 30, 2001 10:00 AM

If you use setReplyTo(replyaddress) and send a email to invalid email address, does the bounced email automatically sent to address specified in setReplyTo(replyaddress) method. In other I want to direct the bounced emails to administrator for all invalid addresses and I am wondering, if setReplyTo would take care of it or not? MimeMessage msg = new MimeMessage ( Session.getInstance ( properties, (Authenticator) null) ); msg.addFrom ( iaFrom ); msg.setRecipients ( Message.RecipientType.TO , iaTo ); msg.setRecipients ( Message.RecipientType.CC , iaCc ); msg.setRecipients ( Message.RecipientType.BCC, iaBcc ); //sets the reply to address msg.setReplyTo(new InternetAddress[] { new InternetAddress(&qu   More>>

If you use setReplyTo(replyaddress) and send a email to invalid email address, does the bounced email automatically sent to address specified in setReplyTo(replyaddress) method. In other I want to direct the bounced emails to administrator for all invalid addresses and I am wondering, if setReplyTo would take care of it or not?
MimeMessage msg = new MimeMessage (
Session.getInstance ( properties, (Authenticator) null) );

msg.addFrom ( iaFrom );
msg.setRecipients ( Message.RecipientType.TO , iaTo );
msg.setRecipients ( Message.RecipientType.CC , iaCc );
msg.setRecipients ( Message.RecipientType.BCC, iaBcc );
//sets the reply to address
msg.setReplyTo(new InternetAddress[] { new InternetAddress("sample@sample.com") });

msg.setSubject ( mdo.getSubject() );

msg.setDataHandler ( new javax.activation.DataHandler(new ByteArrayDataSource( mmsg, mimeStr)) );
System.out.println("Just before Transport.send ( msg )");

Transport.send ( msg );

You get the idea. This is sample code of what I am doing.
Does the setReplyTo directs bounced emails(invalid address emails) to address specified in msg.setReplyTo(new InternetAddress[] { new InternetAddress("sample@sample.com") });

   <<Less

Re: setReplyTo

Posted By:   John_Zukowski  
Posted On:   Monday, April 30, 2001 11:28 AM

Why don't you try it and see? This isn't something too hard to test.
About | Sitemap | Contact