PL/SQL (MOSC)

MOSC Banner

POP3 Exchange Server - adding carriage return and line feeds to a message

edited Aug 13, 2009 11:52AM in PL/SQL (MOSC) 8 commentsAnswered
Hi,

I found the code below in a forum to permit me to read Emails from a POP3 server.  The procedure reads the Emails, but appears to add carriage returns and line feeds to the message body.  The message body contains XML data and the carriage returns in the middle of a metatag make processing it impossible.

Can someone tell me how to modify the code so carriage returns and line feeds are not inserted?

Thanks,

Andrew  

CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED ReceiveMail AS
  import javax.mail.*;
  import javax.mail.internet.*;
  import java.util.*;
  import java.io.*;
  import java.sql.*;
  import sqlj.runtime.*;
  import oracle.sql.BLOB;
public class ReceiveMail
{
  static void getAttachments(Message message, int incidentNo)
  throws MessagingException, IOException, SQLException {
    //String attachments = "";
    Object content = message.getContent();
    if (content instanceof Multipart)
    {
      // -- Multi part message which may contain attachment
      Multipart multipart = (Multipart)message.getContent();
      //

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center