Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Losing mails Between SendMail and exchange

David Rocks
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am hoping that someone could help me discover why my mail program using sendmail on solaris cannot seem to send mails to an exchange server. I can send mail to hotmail and other such addresses. It must be a flag that gets set in the message but i cannot work out what it is. This is the method that i use.
public synchronized void sendMessage( String sendTo , String subject , String contents , String from , String replyTo ) throws Exception {

// create a message
MimeMessage msg = new MimeMessage( session );
InternetAddress[] address = { new InternetAddress( sendTo ) };

msg.setRecipients( Message.RecipientType.TO, address );
msg.setFrom( new InternetAddress( from ) );
InternetAddress intAddressArray[] = { new InternetAddress( replyTo ) } ;
msg.setReplyTo( intAddressArray ) ;
msg.setSubject( subject );
msg.setSentDate( new Date() );

MimeBodyPart mbp1 = new MimeBodyPart();
mbp1.setText( contents );

// create the Multipart and its parts to it
Multipart mp = new MimeMultipart();


// send
If anyone has even a small suggestion it would be much appreciated
David Raid
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic