Problem in sending mail-------- stop printing

Hi ABAPers,
I am trying to send pdf attachment from sap to outlook mail .
I am getting the mail but the problem is evertime before sending the atttachment to outlook mail,it is populating the printer for printing.
How can i stop the printing action.
Regards
Debjani
The code is given below:
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
    EXPORTING
      i_language    = 'E'
      i_application = 'SAPDEFAULT'
    IMPORTING
      e_devtype     = p_e_devtype.
  p_control_parameters-no_dialog = 'X'.
   p_control_parameters-preview = ' '.
   p_control_parameters-GETOTF = 'X'.
  p_output_options-xsfcmode = 'X'.
  p_output_options-xsf = space.
  p_output_options-xdfcmode = 'X'.
  p_output_options-xdf = space.
p_output_options-tdprinter = p_e_devtype.
   p_output_options-tdnewid = 'X'.
   p_output_options-TDNOPREV = 'X'.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
         formname                 = 'ZREQUEST_FORM'
      IMPORTING
        fm_name                  = frm
         EXCEPTIONS
           NO_FORM                  = 1
           NO_FUNCTION_MODULE       = 2
           OTHERS                   = 3
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION   frm                " '/1BCDWB/SF00000304'
                   EXPORTING
                     control_parameters         =  p_control_parameters
                     output_options             =  p_output_options
                     user_settings              = 'X'
                   IMPORTING
                     job_output_info            = p_job_output_info
          TABLES
            itab                       = itab
            it71                       = it71
                  EXCEPTIONS
                    FORMATTING_ERROR           = 1
                    INTERNAL_ERROR             = 2
                    SEND_ERROR                 = 3
                    USER_CANCELED              = 4
                    OTHERS                     = 5
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
spd = p_job_output_info-spoolids.
CLEAR spd1.
READ TABLE spd INTO spd1 INDEX 1.
IF sy-subrc = 0.
GD_SPOOL_NR = spd1.
ENDIF.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
  EXPORTING
   src_spoolid                    = GD_SPOOL_NR
   NO_DIALOG                      = c_no
   DST_DEVICE                     = c_device
IMPORTING
   PDF_BYTECOUNT                  = gd_bytecount
TABLES
   PDF                            =  it_pdf_output
EXCEPTIONS
   ERR_NO_OTF_SPOOLJOB            = 1
   ERR_NO_SPOOLJOB                = 2
   ERR_NO_PERMISSION              = 3
   ERR_CONV_NOT_POSSIBLE          = 4
   ERR_BAD_DSTDEVICE              = 5
   USER_CANCELLED                 = 6
   ERR_SPOOLERROR                 = 7
   ERR_TEMSEERROR                 = 8
   ERR_BTCJOB_OPEN_FAILED         = 9
   ERR_BTCJOB_SUBMIT_FAILED       = 10
   ERR_BTCJOB_CLOSE_FAILED        = 11
   OTHERS                         = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  LOOP AT it_pdf_output.
    TRANSLATE it_pdf_output USING ' ~'.
    CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
  ENDLOOP.
  TRANSLATE gd_buffer USING '~ '.
  DO.
    it_mess_att = gd_buffer.
    APPEND it_mess_att.
    SHIFT gd_buffer LEFT BY 255 PLACES.
    IF gd_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
  PERFORM process_email.
    IF sy-sysid = c_dev.
      wait up to 5 seconds.
      SUBMIT rsconn01 WITH mode   = 'INT'
                      WITH output = 'X'
                      AND RETURN.
    ENDIF.
CHECK NOT ( p_email1 IS INITIAL ).
  REFRESH it_mess_bod.
Default subject matter
  gd_subject         = 'Subject'.
  gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
  it_mess_bod        = 'Message Body text, line 1'.
  APPEND it_mess_bod.
If no sender specified - default blank
  IF p_sender EQ space.
    gd_sender_type  = space.
  ELSE.
    gd_sender_type  = 'INT'.
  ENDIF.
Send file by email as .xls speadsheet
  PERFORM send_file_as_email_attachment
                               tables it_mess_bod
                                      it_mess_att
                                using p_email1
                                                  'Request Form for Transport'
                                      'PDF'
                                      gd_attachment_name
                                      gd_attachment_desc
                                      p_sender
                                      gd_sender_type
                             changing gd_error
                                      gd_reciever.
FORM send_file_as_email_attachment tables it_message
                                          it_attach
                                    using p_email
                                          p_mtitle
                                          p_format
                                          p_filename
                                          p_attdescription
                                          p_sender_address
                                          p_sender_addres_type
                                 changing p_error
                                          p_reciever.
  DATA: ld_error    TYPE sy-subrc,
        ld_reciever TYPE sy-subrc,
        ld_mtitle LIKE sodocchgi1-obj_descr,
        ld_email LIKE  somlreci1-receiver,
        ld_format TYPE  so_obj_tp ,
        ld_attdescription TYPE  so_obj_nam ,
        ld_attfilename TYPE  so_obj_des ,
        ld_sender_address LIKE  soextreci1-receiver,
        ld_sender_address_type LIKE  soextreci1-adr_typ,
        ld_receiver LIKE  sy-subrc.
data:   t_packing_list like sopcklsti1 occurs 0 with header line,
        t_contents like solisti1 occurs 0 with header line,
        t_receivers like somlreci1 occurs 0 with header line,
        t_attachment like solisti1 occurs 0 with header line,
        t_object_header like solisti1 occurs 0 with header line,
        w_cnt type i,
        w_sent_all(1) type c,
        w_doc_data like sodocchgi1.
  ld_email   = p_email.
  ld_mtitle = p_mtitle.
  ld_format              = p_format.
  ld_attdescription      = p_attdescription.
  ld_attfilename         = p_filename.
  ld_sender_address      = p_sender_address.
  ld_sender_address_type = p_sender_addres_type.
Fill the document data.
  w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
  w_doc_data-obj_langu = sy-langu.
  w_doc_data-obj_name  = 'SAPRPT'.
  w_doc_data-obj_descr = ld_mtitle .
  w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
  CLEAR w_doc_data.
  READ TABLE it_attach INDEX w_cnt.
  w_doc_data-doc_size =
     ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
  w_doc_data-obj_langu  = sy-langu.
  w_doc_data-obj_name   = 'SAPRPT'.
  w_doc_data-obj_descr  = ld_mtitle.
  w_doc_data-sensitivty = 'F'.
  CLEAR t_attachment.
  REFRESH t_attachment.
  t_attachment[] = it_attach[].
Describe the body of the message
  CLEAR t_packing_list.
  REFRESH t_packing_list.
  t_packing_list-transf_bin = space.
  t_packing_list-head_start = 1.
  t_packing_list-head_num = 0.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE it_message LINES t_packing_list-body_num.
  t_packing_list-doc_type = 'RAW'.
  APPEND t_packing_list.
Create attachment notification
  t_packing_list-transf_bin = 'X'.
  t_packing_list-head_start = 1.
  t_packing_list-head_num   = 1.
  t_packing_list-body_start = 1.
  DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
  t_packing_list-doc_type   =  ld_format.
  t_packing_list-obj_descr  =  ld_attdescription.
  t_packing_list-obj_name   =  ld_attfilename.
  t_packing_list-doc_size   =  t_packing_list-body_num * 255.
  APPEND t_packing_list.
Add the recipients email address
  CLEAR t_receivers.
  REFRESH t_receivers.
  t_receivers-receiver = ld_email.
  t_receivers-rec_type = 'U'.
  t_receivers-com_type = 'INT'.
  t_receivers-notif_del = 'X'.
  t_receivers-notif_ndel = 'X'.
  APPEND t_receivers.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = w_doc_data
            put_in_outbox              = 'X'
           sender_address             = ld_sender_address
           sender_address_type        = ld_sender_address_type
            commit_work                = 'X'
       IMPORTING
            sent_to_all                = w_sent_all
       TABLES
            packing_list               = t_packing_list
            contents_bin               = t_attachment
            contents_txt               = it_message
            receivers                  = t_receivers
       EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
Populate zerror return code
  ld_error = sy-subrc.
Populate zreceiver return code
  LOOP AT t_receivers.
    ld_receiver = t_receivers-retrn_code.
  ENDLOOP.

Hi Debjani
Please add this line while populating your Recievers table,
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-no_print = 'X'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
Hope this helps !
~ Ranganath

Similar Messages

  • Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send..

    Problem: Cannot send mail unless Password is transmitted insecurely & Port is set to 587.. Can receive mail but can't send Code 501..
    Need help with T-bird.. My OS is Win XP-64..Have been using Mozilla for about 10 years with little or no problems.. This happened when I upgraded to 3.17.. Spent hours on T-Bird diagnostics web site.. Called Comcast & talked to a net tech.. he ran some tests on his end & had me log into my Comcast e-mail account & all worked well,, so he concluded the problem was in T-Bird.. He had me change my port to 587 & disable connection security & authentication to none & I was able to send mail.. That was all he could do.. Comcast was working.. the problem is in T-Bird.. Can any one help with this problem.. I don't want to send mail with my password transmitted insecurely..
    Thanks
    Richard

    It was not intended to be "snide". You said two separate things that at face value would be out of the ordinary.
    I considered if it might be a typo for 31.7. Since 31.5 is the current formal release, I would have to thank you for volunteering to test a pre-release beta version. If it was truly 3.1.7 then it would appear that you have chosen, or have become stuck with a somewhat ancient version. In either case it's harder to reach out to you with any meaningful comments or advice. However I do watch various other sites and newsgroups and I don't see a clamour of distressed users, so it seems fair to suppose that this feature isn't actually broken in 31.7.
    And you said XP 64. XP is obsolete and no longer supported and if there is a 64-bit version, then again you have set yourself apart from the mainstream.
    I had a look at the comcast site and found some puzzling recommendations. Some users come here asking how to set up a secured connection in Thunderbird when it isn't offered by the server. Comcast are different, in that they mention the ports 143 and 587, and also 993 and 465. So far so good, in that security is actually on offer, but they also suggest that you enable SSL, regardless of which port is being used. It would be unusual and unconventional to offer TLS or SSL on ports 143 and 587. STARTTLS would be more credible on these ports.
    Have you tried IMAP on 993 and SMTP on 465? SMTP on 587 with SSL, or TLS, is not impossible, but is improbable.

  • Problem in sending mails to multiple persons

    Hi,
    I have a problem in sending mails to multiple people....
    My mail is using the local smtp server...The mail is to be send to multiple addresses in to and cc.
    for e.g the to address will have --> [email protected];[email protected]
    cc address will have --> [email protected];[email protected]
    How do this i.e set multiple to and cc address...
    My function that sends mail from my ejb looks like this...
    // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         Session session = Session.getDefaultInstance(props, null);
         try{
         Message msg = new MimeMessage(session);
         msg.setFrom(new InternetAddress(from));
    //I HAVE TO SET MULTIPLE "TO" ADDRESSES HERE INSTEAD OF JUST 1
         InternetAddress[] address = {new InternetAddress(to)};
         msg.setRecipients(Message.RecipientType.TO, address);
    //I HAVE TO SET MULTIPLE "CC" ADDRESSES HERE INSTEAD OF JUST 1
    InternetAddress[] addresscc = {new InternetAddress(cc)};
         msg.setRecipients(Message.RecipientType.CC, addresscc);
         msg.setSubject(msgSubj);
         msg.setSentDate(new java.util.Date());
         msg.setText(msgText);
         Transport.send(msg);
         }catch (MessagingException ex) {
    System.out.println("\nException handling in javaMail.java :" + ex);
    Please help me out with a solution!!!Thanks in advance.
    Thanks
    Rahul

    Hi all,
    Got the solution...
    We have to use addRecipients method of the Message class to add as many receipts we want to set.
    example: Message.addRecipients(type,address).
    Thanks
    Rahul

  • Problem in sending mail from VF03

    Hi
    I am just getting a problem in sending mail to the recipient from script.
    please find the below code and let me know why there is no data in otf_tab table.
    DATA:  otf_tab TYPE TABLE OF itcoo WITH HEADER LINE.
    CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT  = i_itcpp
        TABLES
          otfdata = otf_tab
        EXCEPTIONS
          OTHERS  = 1.
    IF otf_tab[] IS NOT INITIAL.
          TRY.
              CREATE OBJECT mailer
                EXPORTING
                  i_nast = nast.
         mailer->get_mail_address( EXPORTING i_adrnr = vbdkr-adrnr ).
              mailer->get_mail_address( EXPORTING i_adrnr = vbdkr-adrnr
                                                     i_vkorg = vbdkr-vkorg
                                                    i_vtweg = vbdkr-vtweg ).
            zcl_sd_mail_output=>convert_otf_to_pdf( IMPORTING pdf_xstring =
            gv_pdf_string
                                                    CHANGING  otf_table   =
                                                    otf_tab[] ).
              mailer->build_and_send_email( EXPORTING pdf_xstring =
              gv_pdf_string ).
            CATCH zcx_sd_mail_no_mailid INTO error.
              error_txt = error->get_text( ).
              zcl_sd_mail_output=>protocol_update( msg_id = 'VN'
                                                   msg_nr = '902'
                                                   msg_ty = 'E'
                                                   msg_v1 = error_txt ).
              retcode = 1.
              CLEAR error_txt.
          ENDTRY.
        ENDIF.
    Since my OTf_tab is initial i am unable to send mails.

    Hi,
    If the OTF Data table is blank then you might have missed the parameter "GETOTFDATA" at the time of calling "OPEN_FORM". Please pass field TDGETOTF = "X" in paramter "OPTIONS" when you are calling "OPEN_FORM".
    You can also visit this link for more information.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556?QuickLink=index&overridelayout=true
    Cheers,

  • Problem in sending mail

    Hi all,
    I'm having some problem in sending mail. I did all configuration regarding this. After that when i tried to send mail, its giving some error, tht is, "SendMailService is not available".
    Can anybody help me on this.
    Thanks,
    Raj

    Hi Raj,
    Go to System Administrator > System Configuration > Knowledge Management > Content Management > Global Services > Mailing Service and make active option true, then restart your portal. Hope it'll work fine.
    Regards,
    Ganpati Jha

  • Problem in sending mail through dynamics actions

    Hi Friends,
    I have a problem in sending mail through dynamics actions . In this  we pass a subroutine in dynamics actions which send an mail when promotion action occured.
    Problem is that sometimes it will  send an mail or sometimes not. I have no idea to solve this problem.
    Can anyone suggest me .
    Thanks ,
    Anish
    Moderator message : Duplicate post locked.
    Edited by: Vinod Kumar on Sep 5, 2011 9:45 AM

    Hi,
    Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
    thank You

  • PROBLEM IN SENDING MAIL TO POSITIONS THROUGH SEND MAIL STEP

    Hi Experts,
    I am facing some problems in sending mail to positions from the organization structure from the send mail step.When I am using user as the recipient type it is working fine...but when i am choosing S position as the recipient type it is giving the error in the workflow log stating that method SENDTASKDESCRIPTION cannot be executed.
    I need to find a solution urgently...any suggestion would be sincerely appreciated.
    thanks.
    Narsingh

    Well you have probably tried this.. but just a recheck.
    1 . send email setep select Organizational Object
    2. Recipient Type Organizational Unit
    3. Here do an F4 and then select the Unit...
    Try this SAP behaves weirdly at times...
    after this do Refresh Buffers.. and Org Unit...
    Let us know if this works

  • Problem of sending mail with MTA

    Hi,
    I have installed Sun Messaging Server, but I have a problem to send mail to other SMTP server over internet, like gmail, hotmail... So I have tried to send an email using javamail and I get this exception "530 5.7.1 Relaying not allowed", that mean that I don't have a Relay SMTP to routing the messages. But the idea that I have, is that the MTA installed with Messaging Server play the role of SMTP Relay.
    So this idea is true, so I think is can be I problem of configuration, and I need to have may own SMTP Relay and don't using ISP Relay.
    and I thank you for your help,
    Mabrouk.

    GS1-Tunisia wrote:
    21-Nov-2008 17:32:31.58 tcp_local                 Q 1 [email protected] rfc822;[email protected] [email protected] TCP active open: Failed connect()    Error: Connection timed out
    This indicates that Messaging Server is unable to connect to the yahoo mail servers.
    I have configured my server to use mydomain.com with ip 41.x.x.xHow did you configure your server to achieve this -- what settings did you add/change?
    but when I see this log [email protected] is converted to [email protected] and 192.168.3.2 is mailhost which is behind firewall in DMZ, So it may be the problem of NAT, I don't know!!!
    Given that Messaging Server cannot connect to the yahoo mail servers, the problem appears to be at the networking level so the firewall is most likely blocking the outgoing port 25 connection.
    When you are on the Messaging Server system, what output do you get for the following command:
    telnet a.mx.mail.yahoo.com. 25Regards,
    Shane.

  • Problem with sending mail throgh java mail api

    hi folks,
    We are having problem regarding sending mail using java mail api.
    we are using msgsendsample.java file from demo folder contained in javamail-1.3.3_01 folder.
    we are using following command at dos prompt.:
    java msgsendsample [email protected] [email protected] smtp.mail.yahoo.com false
    It gives following Exception:
    --Exception handling in msgsendsample.java
    com.sun.mail.smtp.SMTPSendFailedException: 530 authentication required - for hel
    p go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1
    333) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:535)
    at javax.mail.Transport.send0(Transport.java:151)
    at javax.mail.Transport.send(Transport.java:80)
    at msgsendsample.main(msgsendsample.java:93)
    ** ValidUnsent Addresses
    [email protected]
    Thanking in Advance...
    Please give us guidance to any alternate solution if exists.

    hi
    the smtp server u are using should allow u to send mail to other smtp server like if u r sending mail to yahoo account u have to use yahoo smtp server only .....
    bye

  • Problem in sending mail using java mail api

    This is the pogram I am using as of now to send a mail to yahoo id.
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SendingMail2
    public SendingMail2()
    try
    String from = "ravikiran_sunrays";
    String to = "[email protected]";
    String subject = "the subject u wanna send ";
    String cc="[email protected]";
    String bcc="[email protected]";
    String text="the matter that u wanna send ";
    java.util.Properties prop = System.getProperties();
    prop.put("mail.smtp.host","mail.yahoo.com");
    //prop.put("http.proxyHost",System.getProperty("http.proxyHost"));
    //prop.put("http.proxyPort","8080");
    //prop.put("http.proxyPort",System.getProperty("http.proxyPort"));
    //prop.put("http.proxyHost","172.19.48.201");
    //System.getProperties().setProperty("http.proxyPort","8080");
    //System.getProperties().setProperty("http.proxyHost","172.19.48.201");
    Session ses = Session.getInstance(prop,null);
    MimeMessage message = new MimeMessage(ses);
    try
    Address fromAddress = new InternetAddress(from);
    message.setFrom(fromAddress);
    message.setSubject(subject);
    Address[] toAddress = InternetAddress.parse(to);
    Address[] cc_address=InternetAddress.parse(cc);
    Address[] bcc_address=InternetAddress.parse(bcc);
    message.setRecipients(Message.RecipientType.TO,toAddress);
    message.setRecipients(Message.RecipientType.CC,cc_address);
    message.setRecipients(Message.RecipientType.BCC,bcc_address);
    message.setSentDate(new java.util.Date());
    message.setText(text);
    Transport.send(message);
    System.out.println("Mail Successfully Sent");
    catch(Exception e)
    System.out.println("Problem " + e);
    catch(Exception e)
    System.out.println("Problem " + e);
    public static void main(String[] args)
    SendingMail2 sendingMail2 = new SendingMail2();
    This is the exception I am getting when I try 2 execute that program.
    avax.mail.SendFailedException: Sending failed;
    nested exception is:
         javax.mail.MessagingException: Unknown SMTP host: mail.yahoo.com;
    nested exception is:
         java.net.UnknownHostException: mail.yahoo.com

    listen buddy
    this is a class i made it is easy to understand it sends mails and check inbox just adduser from telnet with remote manager in james create the three accounts i am using and then use this class and its methods
    also the next class that contains the mails test my class and what i am saying
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class MailClient
    extends Authenticator
    public static final int SHOW_MESSAGES = 1;
    public static final int CLEAR_MESSAGES = 2;
    public static final int SHOW_AND_CLEAR =
    SHOW_MESSAGES + CLEAR_MESSAGES;
    protected String from;
    protected Session session;
    protected PasswordAuthentication authentication;
    public MailClient(String user, String host)
    this(user, host, false);
    public MailClient(String user, String host, boolean debug)
    from = user + '@' + host;
    authentication = new PasswordAuthentication(user, user);
    Properties props = new Properties();
    props.put("mail.user", user);
    props.put("mail.host", host);
    props.put("mail.debug", debug ? "true" : "false");
    props.put("mail.store.protocol", "pop3");
    props.put("mail.transport.protocol", "smtp");
    session = Session.getInstance(props, this);
    public PasswordAuthentication getPasswordAuthentication()
    return authentication;
    public void sendMessage(
    String to, String subject, String content)
    throws MessagingException
    System.out.println("SENDING message from " + from + " to " + to);
    System.out.println();
    MimeMessage msg = new MimeMessage(session);
    msg.addRecipients(Message.RecipientType.TO, to);
    msg.setSubject(subject);
    msg.setText(content);
    Transport.send(msg);
    public void checkInbox(int mode)
    throws MessagingException, IOException
    if (mode == 0) return;
    boolean show = (mode & SHOW_MESSAGES) > 0;
    boolean clear = (mode & CLEAR_MESSAGES) > 0;
    String action =
    (show ? "Show" : "") +
    (show && clear ? " and " : "") +
    (clear ? "Clear" : "");
    System.out.println(action + " INBOX for " + from);
    Store store = session.getStore();
    store.connect();
    Folder root = store.getDefaultFolder();
    Folder inbox = root.getFolder("inbox");
    inbox.open(Folder.READ_WRITE);
    Message[] msgs = inbox.getMessages();
    if (msgs.length == 0 && show)
    System.out.println("No messages in inbox");
    for (int i = 0; i < msgs.length; i++)
    MimeMessage msg = (MimeMessage)msgs;
    if (show)
    System.out.println(" From: " + msg.getFrom()[0]);
    System.out.println(" Subject: " + msg.getSubject());
    System.out.println(" Content: " + msg.getContent());
    if (clear)
    msg.setFlag(Flags.Flag.DELETED, true);
    inbox.close(true);
    store.close();
    System.out.println();
    ====================================
    testing this class
    =======================================
    public class JamesConfigTest
    public static void main(String[] args)
    throws Exception
    // CREATE CLIENT INSTANCES
    MailClient redClient = new MailClient("red", "localhost");
    MailClient greenClient = new MailClient("green", "localhost");
    MailClient blueClient = new MailClient("blue", "localhost");
    // CLEAR EVERYBODY'S INBOX
    redClient.checkInbox(MailClient.CLEAR_MESSAGES);
    greenClient.checkInbox(MailClient.CLEAR_MESSAGES);
    blueClient.checkInbox(MailClient.CLEAR_MESSAGES);
    Thread.sleep(500); // Let the server catch up
    // SEND A COUPLE OF MESSAGES TO BLUE (FROM RED AND GREEN)
    redClient.sendMessage(
    "blue@localhost",
    "Testing blue from red",
    "This is a test message");
    greenClient.sendMessage(
    "blue@localhost",
    "Testing blue from green",
    "This is a test message");
    Thread.sleep(500); // Let the server catch up
    // LIST MESSAGES FOR BLUE (EXPECT MESSAGES FROM RED AND GREEN)
    blueClient.checkInbox(MailClient.SHOW_AND_CLEAR);
    =======================================================
    it suppose to print this
    Clear INBOX for red@localhost
    Clear INBOX for green@localhost
    Clear INBOX for blue@localhost
    SENDING message from red@localhost to blue@localhost
    SENDING message from green@localhost to blue@localhost
    Show and Clear INBOX for blue@localhost
    From: green@localhost
    Subject: Testing blue from green
    Content: This is a test message
    From: red@localhost
    Subject: Testing blue from red
    Content: This is a test message
    thanks a lot
    but i need ur help plzzzzzzzzzzzz
    i can create account from telnet
    but how i can create a new account from java .. a jsp page that i made to create a new account on the server
    plzzzzzzzz help me
    bye

  • PROBLEM WHILE SENDING MAILS TO MUTILPLE RECIPIENTS

    hi,
    while sending mails to multiple recipients,if any one of the mail id is invalid the mail is not being send to other valid mailids,how can this problem be resolved , so that other than the invalid recipient mail has to be send to other valid mailids

    COULD YOU PLEASE STOP SHOUTING?
    CAN YOU TALK LOUDER, I CAN'T HEAR YOU!

  • Problem wiht sender mail adapter.

    Hello.
    I have a mail to RFC scenario.
    There sender mail adapter fails if the mails in the inbox is encoded in specific formats.
    I think the mail adapter does not understand this encoding.
    Below is the error i got.
    error occured: [2008-09-08T08:22:25Z] 5 new messages found; processing message 1exception caught during processing mail message[1]; java.io.UnsupportedEncodingException: utf-7; processing message 2exception caught during processing mail message[2]; java.io.UnsupportedEncodingException: utf-7; processing message 3exception caught during processing mail message[3]; java.io.UnsupportedEncodingException: utf-7; processing message 4exception caught during processing mail message[4]; java.io.UnsupportedEncodingException: utf-7; processing message 5exception caught during processing mail message[5]; java.io.UnsupportedEncodingException: utf-7; action[s] taken
    Is there a solution 2 overcome this problem.
    I tries to use a module called "TextCodepageConversionBean" but it was not of much use.
    Please help.
    Thanks,
    Vignesh

    HI
    Mail adapter does not understand "UTF-7" as shown in the error.
    Mail adapter supports only
    base64
    Quoted-Printable
    http://help.sap.com/saphelp_nw70/helpdata/EN/23/c093409c663228e10000000a1550b0/content.htm
    If you want to make your adapter more than this. Then create a custom module using open libraries that will allow you to read many Encoding standards.
    Thanks
    Gaurav

  • Problem with Sender Mail Adapter

    Hi experts,
    I'm developing a Mail-XI-RFC scenario and have a problem in the mapping. I have created a MI based in the structure of the attachment of the mail. I have a mapping that does xml->RFC and tests OK. When I send a mail to the account of the sender adapter, the system generates two payloads, the 'MailMessage' and the 'MailAttachment-1' that is the xml to map, but I have an error in SXM_MONI 'Cannot produce target element /ns0:...RFC name'.
    The Sender Adapter configuration uses message protocol XIPAYLOAD, I have checked Mail Package, base 64 and keep Attachments. Interface namespace is the same as the xml and default interface name is the message interface created of type my xml.
    What is wrong?
    Best Regards,
    Alfredo Lagunar.

    In this case you need to use payloadswap bean for swapping the payload and attachment
    http://help.sap.com/saphelp_nw04/helpdata/en/70/f3cbad30ee479cb15672219f3405f0/frameset.htm
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step check this
    Rajesh
    Edited by: Rajesh on Feb 4, 2009 2:52 PM

  • Problem in sending mail from REPORT BUILDER...HELP ...PLS ....URGENT

    Hi All,
    I added the mailserver part in the rwbuilder.conf file.This is how it looks
    <pluginParam name="mailServer">smtp.xxx.com</pluginParam>
    The smtp server of our company is working fine.
    Now when i am sending mail frm report builder i am getting the error.
    Pls tell me .....
    Do i have to configure any other file?
    Should the smtp server be running in my local machine?WHAT IS THE SOLUTION ...FOR THIS PROBLEM?
    Please someone give me some guidance..
    regards,
    ashok

    Hi,
    Pls give some idea ......
    your reply will be greatly appreciated.
    regards,
    ashok

  • Problem to send mails

    I've installed the OCS R1 Singlebox on a windows 2000 server.
    But now I have the problem to send Email. The "Mailer-Daemon" send me the following message back.
    Von: "Mail Delivery Subsystem" <[email protected]>
    An: <[email protected]>
    Cc:
    Betreff: Could not deliver mail: see transcript for details
    Datum: Nov 12, 2003 11:17 PM
    Priorit�t: NORMAL
    Mime-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status; BOUNDARY="----ORCL_ES6_BOUNCE_1062----"
    Anh�nge:
    ----- The following addresses had delivery problems -----<[email protected]> (unrecoverable error)
    From: "Mail Delivery Subsystem" <[email protected]>To: [email protected]: 1.0Content-Type: multipart/report; report-type=delivery-status; BOUNDARY="----ORCL_ES6_BOUNCE_1062----"Date: Thu, 13 Nov 2003 00:17:05 +0200Subject: Could not deliver mail: see transcript for details------ORCL_ES6_BOUNCE_1062----Content-Type: text/plain ----- The following addresses had delivery problems -----<[email protected]> (unrecoverable error)------ORCL_ES6_BOUNCE_1062----Content-Type: message/delivery-statusReporting-MTA: dns; server1-hecht.hecht.comReceived-From-MTA: DNS; server1-hecht.hecht.comFinal-Recipient: RFC822; [email protected]: failedStatus: 5.0.1Diagnostic-Code: SMTP; 501 5.5.4 Invalid AddressRemote-MTA: DNS; bluewin.chLast-Attempt-Date: Thu, 13 Nov 2003 00:17:05 +0200------ORCL_ES6_BOUNCE_1062----Content-Type: message/rfc822Return-Path: <[email protected]>Received: from server1-hecht.hecht.com by server1-hecht.hecht.com with ESMTP id 10621068678981; Thu, 13 Nov 2003 00:16:21 +0200Message-ID: <2076777.1068678981559.JavaMail.SYSTEM@server1-hecht>Date: Thu, 13 Nov 2003 00:16:21 +0100 (CET)From: [email protected]: [email protected]: Mime-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: quoted-printableX-Priority: 3X-Mailer: Oracle Webmail Client(UIX)------ORCL_ES6_BOUNCE_1062------
    Please help me
    Thanks

    u should configer the relay server in the smtp_out on the um_messageing

Maybe you are looking for

  • User decision step prob

    Hi, In my workflow user decision step have 2 approvers. if one of the approver opening the work item ,remaining approvers relevent work item(User decision) deleted from sap inbox. i want to keep all approvers work items  alive upto getting decision f

  • Set Font to the JTextArea Problem

    Hi all, i've got a problem in setting the font for my JTextArea. Here is my piece of code. Display.append(Message.getText()); Display.setFont(selected_font)); Display is JTextArea, Message is String. The problem is i whenever i do this, everytime i c

  • Difference of the results more than 1000

    I have to write a procedure where if the results of the following result set varies by more than 1000 than it should sent out a paramter YES COUNT(1)     TABLE_NM 42986     A_TBL 539     B_TBL 42986     C_TBL 42986     AD_TBL so if the difference bet

  • Importing web Services in CAF application

    Hi friends, I am involved in desgining a CAF application which makes use of some web services, After importing and deploying the application when I run that webservice through service Browser by creating a record, it gives me an<b> error: "Invalid ad

  • Is it possible to Install Net weaver 7.3  as  Dual Stack (ABAP +JAVA+EP+BI)

    Hi All, I am trying to install the NW 7.3 as Abap+Java stack, But I could not find any option to install as dual stack. If any one Know the solution, please inform to me. Thank you very much in Advance. Regards, Amar.