Send mail thru a weblogic application

Hello,
I'd like to know what is the best way to send mails, possibly many mails, from a web application, using weblogic8.
Actually I use :
      try {
        URL u = new URL("mailto: ...");
        URLConnection c = u.openConnection();
        c.setDoInput(false);
        c.setDoOutput(true);
        c.connect();
        PrintWriter out = new PrintWriter(new OutputStreamWriter(c.getOutputStream()));
        out.println("From: ...");
        out.println("To: ... ");
        out.println("...");
        out.close();
      catch (Exception ex)
         ex.printStackTrace();
      }But when I do load tests, many of the mails send are not delivered...
Thanks a lot !
And sorry for my poor english.

You have to go for JavaMail API to send the mails.

Similar Messages

  • Can't send any mailcan't send mail thru

    Using 10.4.11
    called my isp, that didn't help. with my isp account i got this message"5.1.0 Authentication required"
    can't send mail thru any of my domains eithers

    Who is your ISP, and who are your email providers? What are the specific settings for the Incoming and Outgoing mail servers, including account type (POP or IMAP), port numbers, authentication method, and whether or not SSL is enabled for either? More details.
    Mulder

  • Send Mail from Essbase Custom Application

    Can we send mail from custom Essbase application ? If yes then how?
    Plz help on it.

    I don't think you need the jdk but just a jvm. Essbase installs one as part of it's intall process (I'm not sure if this happens in 6.5). You could use vbscript or vb to create a mail routine. Search the internet, I'll bet you find one pretty quick. if you can one shareware called BLAT is quite popular and you don't have to build your own code.
    The nice thing avout the JCF(JAva Custom Function) is you can create a calc script and actually pass values in the message. things like division totals or how much the out of balance is.

  • Send Mail Thru Form 6i

    Hi everybody
    I am using oracle 9i and form 6i i want send mail thru form 6i.
    can anybody help me how can i send mail.
    your advise always apreciated
    with thanx

    As statet before. You can do it from the database.
    There are java classes you could load in the database and I think there is also a database package utl_smtp.
    Marcos

  • Sending mail thru external ISP, authentication problem

    Hello all,
    i have a little problem that im sure some of you can help me fix. I have a mail server running on a Xserve G5 with 10.4.6. It runs on a local (private) network, mails a polled with fetchmail. Everything works fine except that i can't send mails thru my ISP. Heres what the smtp protokoll says:
    May 4 08:56:58 mediatelserver postfix/smtp[3231]: 94CD148774: to=<[email protected]>, relay=smtp.serverkompetenz.de[81.169.163.72], delay=0, status=bounced (host smtp.serverkompetenz.de[81.169.163.72] said: 550 Anmeldung erforderlich / Authentication required (in reply to MAIL FROM command))
    Due to the fact that my ISP doesn't support SMTP AUTH or TLS, i have to authenticate with plain user/password. My question is, how can i do this?
    Heres the postconf -n output. I've done some "testing" on it
    alias_database = hash:/etc/postfix/aliases
    alias_maps = hash:/etc/postfix/aliases
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debugpeerlevel = 2
    enableserveroptions = yes
    inet_interfaces = all
    mail_owner = postfix
    mailbox_transport = cyrus
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    messagesizelimit = 0
    mydomain = mediatel.private
    mydomain_fallback = localhost
    myhostname = mediatelserver.mediatel.private
    mynetworks = 127.0.0.1/32,10.10.10.0/24
    mynetworks_style = subnet
    newaliases_path = /usr/bin/newaliases
    queue_directory = /private/var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    relayhost = smtp.serverkompetenz.de
    sample_directory = /usr/share/doc/postfix/examples
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpdpw_server_securityoptions = plain
    smtpdrecipientrestrictions = permitsasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
    smtpdsasl_authenable = yes
    smtpdsenderrestrictions = hash:/etc/postfix/access
    smtpduse_pwserver = yes
    unknownlocal_recipient_rejectcode = 550
    Thanks in advance
    WISKY

    I see the problem, as we had exactly the same problems. We have a XServe fetching the mails from a ISP with POP. The clients however connect to the Xserve with IMAP. There are clients with 7GB of mailbox size. So, once more: that is the recieving and hosting part.
    If the client sends a mail, it sends it with SMTP to the XServe. But then: why to SMTP to the ISP instead of SMTP to the final destination directly? This has nothing to do with the client, because in both cases, the client connects only to the XServe.
    So: deactivate this checkbox "Alle Nachrichten über diesen Host weiterleiten" and have fun!! At least: give it a try.
    cheers

  • Send mail from a weblogic web application

    Hello,
    I'd like to know what is the best way to send mails, possibly many mails, from a web application, using weblogic8.
    Actually I use :
          try {
            URL u = new URL("mailto: ...");
            URLConnection c = u.openConnection();
            c.setDoInput(false);
            c.setDoOutput(true);
            c.connect();
            PrintWriter out = new PrintWriter(new OutputStreamWriter(c.getOutputStream()));
            out.println("From: ...");
            out.println("To: ... ");
            out.println("...");
            out.close();
          catch (Exception ex)
             ex.printStackTrace();
          }But when I do load tests, many of the mails send are not delivered...
    Thanks a lot !
    And sorry for my poor english !

    The best way is to use a SMTP server and the JavaMail API...

  • Problem in sending mail thru SAP.

    Hi All
    I have typical problem in sending Purchase order thru mail to vendor.
    We are sending Purchase Order to our vendor thru mail and copy of purchase order as attachment in pdf file.
    I am sending Purchase Order number 45XXXX01, vendor is getting something else say 45XXXX03. But when I checked the same in outbox in SAP business workplace then it is found correct i.e. Purchase Order number 45XXXX01 but when vendor open his attachment then he is found Purchase Order number 45XXXX03.
    Following FMu2019s are used in y-program to send mail.
    CONVERT_OTF u2013 To convert into pdf.
    SO_DOCUMENT_SEND_API1 u2013 To send mail.
    I do not understand why it is happening.
    Kindly suggest something to overcome this.
    Regards,
    Rajesh Vasudeva

    Hey do as follow
    1 > When you send the mail , after running ur program , you furst open the sent data from SOST or SCOTT etc. and see is it a correct data.
    2 > Try sending the mail to urself , also try to mention ur id along with vendors Id and see what do u get also same time check what r u sending.
    Hopefully it will give you some idea.
    Regards,
    Uma Dave

  • Sending mail thru ABAP pgm

    Hi experts,
    Can any body tell me what settings need to be done in SAP System while sending an email thru an ABAP pgm.
    Regards

    HI,
    *& Report  ZLAXMI_ALVMAIL2                                             *
    REPORT  ZLAXMI_ALVMAIL2   MESSAGE-ID ZZ       .
    TABLES: MARA, MAKT.
    DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
    DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
    DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    *DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
    DATA: DOC_CHNG LIKE SODOCCHGI1.
    DATA: TAB_LINES LIKE SY-TABIX.
    *creation of document to be sent.
    DOC_CHNG-OBJ_NAME = 'Mailing List'.
    DOC_CHNG-OBJ_DESCR = 'Materials report'.
    *type declarations
    *To store material data
    TYPES: BEGIN OF T_MARA,
            MATNR TYPE MARA-MATNR,
            PSTAT TYPE MARA-PSTAT,
            MTART TYPE MARA-MTART,
            MBRSH TYPE MARA-MBRSH,
            MEINS TYPE MARA-MEINS,
          END OF T_MARA.
    *--To store Material Description
    TYPES: BEGIN OF T_MAKT,
             MATNR TYPE MAKT-MATNR,            " Material Number
             MAKTX TYPE MAKT-MAKTX,            " Material Description
           END OF T_MAKT.
    TYPES: BEGIN OF T_FINAL,
            MATNR TYPE MARA-MATNR,
            MAKTX TYPE MAKT-MAKTX,
            PSTAT TYPE MARA-PSTAT,
            MTART TYPE MARA-MTART,
            MBRSH TYPE MARA-MBRSH,
            MEINS TYPE MARA-MEINS,
           END OF T_FINAL.
    *Internal table declarations.
    *--Internal Table to store Material Description
    DATA: IT_MAKT TYPE STANDARD TABLE OF T_MAKT,
    *--Internal Table to store Material details
          IT_MARA TYPE STANDARD TABLE OF T_MARA,
          IT_OBJTXT TYPE STANDARD TABLE OF SOLISTI1 ,    "object text
          IT_OBJPACK TYPE STANDARD TABLE OF SOPCKLSTI1 ,
                                                   " attachment table
          IT_OBJBIN TYPE STANDARD TABLE OF SOLISTI1  ,
                                                   " binary table
          IT_OBJHEAD TYPE STANDARD TABLE OF SOLISTI1  ,
                                                   " object header table
    *--Internal Table to hold Final records to download/display
          IT_FINAL TYPE STANDARD TABLE OF T_FINAL.
    DATA: IT_RECLIST TYPE STANDARD TABLE OF SOMLRECI1. "Workarea for internal table
    DATA:  X_MAKT  TYPE T_MAKT,         "Work area for IT_MAKT
           X_MARA  TYPE T_MARA,         "Work area for IT_MARA
           X_FINAL TYPE T_FINAL,       "Work area for IT_FINAL
           V_TEXT(255) TYPE C.
    *--Work area for all the internal tables used
    DATA :    WA_OBJPACK TYPE SOPCKLSTI1,
              WA_OBJHEAD TYPE SOLISTI1  ,
              WA_OBJBIN TYPE SOLISTI1   ,
              WA_OBJTXT TYPE SOLISTI1   ,
              WA_RECLIST TYPE SOMLRECI1 .
    CONSTANTS: C_TAB  TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    *selection screen.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
    SELECTION-SCREEN: END OF BLOCK B1.
    *at selection screen.
    *AT SELECTION-SCREEN.
    PERFORM VALIDATE_SCREEN.
    *start of selection.
    START-OF-SELECTION.
      PERFORM GET_MARA_DETAILS.
      PERFORM GET_MAKT_DETAILS.
      PERFORM FINAL_DATA.
    *end of selection
    END-OF-SELECTION.
      PERFORM SEND_MAIL_DATA.
      PERFORM DISPLAY_DATA.
    *&      Form  validate_screen
          text
    -->  p1        text
    <--  p2        text
    *FORM VALIDATE_SCREEN .
    DATA: LV_MATNR TYPE MARA-MATNR.
    IF NOT S_MATNR[] IS INITIAL.
       SELECT MATNR INTO
             LV_MATNR
             UP TO 1 ROWS
             FROM MARA
             WHERE MATNR IN S_MATNR.
       ENDSELECT.
    ENDIF.
    IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'Invalid material'.
    ENDIF.
    *ENDFORM.                    " validate_screen
    *&      Form  get_mara_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MARA_DETAILS .
      SELECT MATNR
             PSTAT
             MTART
             MBRSH
             MEINS
             INTO TABLE IT_MARA
             FROM
             MARA WHERE
              MATNR IN S_MATNR.
      IF SY-SUBRC <> 0.
        MESSAGE I000 WITH 'No doc found'.
      ENDIF.
      SORT IT_MARA BY MATNR.
      DELETE ADJACENT DUPLICATES FROM IT_MARA COMPARING MATNR.
    ENDFORM.                    " get_mara_details
    *&      Form  get_makt_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MAKT_DETAILS .
      SELECT MATNR
             MAKTX
           FROM MAKT
           INTO TABLE IT_MAKT
           FOR ALL ENTRIES IN IT_MARA
           WHERE MATNR = IT_MARA-MATNR AND
                 SPRAS = SY-LANGU.
    ENDFORM.                    " get_makt_details
    *&      Form  final_data
          text
    -->  p1        text
    <--  p2        text
    FORM FINAL_DATA .
      LOOP AT IT_MARA INTO X_MARA.
        CLEAR X_FINAL.
        READ TABLE IT_MAKT INTO X_MAKT WITH KEY MATNR = X_MARA-MATNR.
        IF SY-SUBRC = 0.
          X_FINAL-MAKTX = X_MAKT-MAKTX.
        ENDIF.
        X_FINAL-MATNR = X_MARA-MATNR.
        X_FINAL-PSTAT = X_MARA-PSTAT.
        X_FINAL-MTART = X_MARA-MTART.
        X_FINAL-MBRSH = X_MARA-MBRSH.
        X_FINAL-MEINS = X_MARA-MEINS.
        APPEND X_FINAL TO IT_FINAL.
      ENDLOOP.
    ENDFORM.                    " final_data
    *&      Form  send_mail_data
          text
    -->  p1        text
    <--  p2        text
    FORM SEND_MAIL_DATA .
      WA_RECLIST-REC_TYPE = 'B'.
      WA_RECLIST-EXPRESS  = 'X'.
      WA_RECLIST-RECEIVER = 'DEV02'.
      APPEND WA_RECLIST TO IT_RECLIST.
      CONCATENATE 'MATERIAL DATA'(021)
                 SY-DATUM INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
    *--Mail body
      CONCATENATE 'MATERIAL DESCRIPTION'(022) 'ATTACHMENT' INTO WA_OBJTXT SEPARATED BY SPACE.
      APPEND WA_OBJTXT TO IT_OBJTXT.
      DESCRIBE TABLE IT_OBJTXT LINES TAB_LINES.
      READ TABLE IT_OBJTXT INTO WA_OBJTXT INDEX TAB_LINES .
      DOC_CHNG-DOC_SIZE =
                     ( TAB_LINES - 1 ) * 255 + STRLEN( WA_OBJTXT ).
    *-populate packing list for body text
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 0.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = TAB_LINES.
      WA_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR WA_OBJPACK.
    *--for attachment
    *--Populate Column headings
      CONCATENATE TEXT-040   " Material Number
                  TEXT-041   " Material Description
                  TEXT-042   " Maintenence status
                  TEXT-043   " Material type
                  TEXT-044   " Industry sector
                  TEXT-045   " Base unit of measure
                  INTO V_TEXT SEPARATED BY C_TAB.
    CONCATENATE V_TEXT
                 C_CR_LF
                 INTO V_TEXT.
      WA_OBJBIN = V_TEXT.
      APPEND WA_OBJBIN TO IT_OBJBIN.
      CLEAR  WA_OBJBIN.
    *--Populate Data to the attachment
      LOOP AT IT_FINAL INTO X_FINAL.
        CONCATENATE X_FINAL-MATNR
                    X_FINAL-MAKTX
                    X_FINAL-PSTAT
                    X_FINAL-MTART
                    X_FINAL-MBRSH
                    X_FINAL-MEINS
                   INTO V_TEXT SEPARATED BY C_TAB.
    *--Go to next line after this record.
       CONCATENATE V_TEXT
                   C_CR_LF
                   INTO V_TEXT.
        WA_OBJBIN = V_TEXT.
        APPEND WA_OBJBIN TO IT_OBJBIN.
        CLEAR  WA_OBJBIN.
      ENDLOOP.
    CLEAR : TAB_LINES.
      DESCRIBE TABLE IT_OBJBIN LINES TAB_LINES.
    *1ST ATTACHMENT :  MAT 5000 PLANT
    *2ND ATT        : MAT 5010 PLANTS
      SORT IT_FINAL BY MEINS.
      DATA : V_BEGIN TYPE SY-TABIX,
             V_END   TYPE SY-TABIX.
      LOOP AT IT_FINAL INTO X_FINAL.
        AT END OF MEINS.
          IF V_BEGIN IS INITIAL.
            V_BEGIN = 1.
          ELSE.
            V_BEGIN = V_END + 1.
          ENDIF.
          V_END = SY-TABIX.
          WA_OBJPACK-TRANSF_BIN = 'X'.
          WA_OBJPACK-HEAD_START = 1.
          WA_OBJPACK-HEAD_NUM = 1.
          WA_OBJPACK-BODY_START = V_BEGIN.
          WA_OBJPACK-BODY_NUM = V_END.
          WA_OBJPACK-DOC_TYPE = 'RAW' .
          WA_OBJPACK-OBJ_NAME = 'MATERIAL'.
          WA_OBJPACK-OBJ_DESCR = 'attachment'.
          WA_OBJPACK-DOC_SIZE = TAB_LINES * 255.
          APPEND WA_OBJPACK TO IT_OBJPACK.
        ENDAT.
      ENDLOOP.
    *-populate object header(attachment name)
      WA_OBJHEAD = 'MATERIAL DETAILS'.
      APPEND WA_OBJHEAD TO IT_OBJHEAD.
      CLEAR  WA_OBJHEAD.
    *-packing list for attachment
      WA_OBJPACK-TRANSF_BIN = 'X'.
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 1.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = TAB_LINES .
      WA_OBJPACK-DOC_TYPE = 'RAW' .
      WA_OBJPACK-OBJ_NAME = 'MATERIAL'.
      WA_OBJPACK-OBJ_DESCR = 'ATTACHMENT DESCRIPTION'.
      WA_OBJPACK-DOC_SIZE = TAB_LINES * 255.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR  WA_OBJPACK.
    *-Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = DOC_CHNG
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = IT_OBJPACK
          OBJECT_HEADER              = IT_OBJHEAD
          CONTENTS_BIN               = IT_OBJBIN
          CONTENTS_TXT               = IT_OBJTXT
          RECEIVERS                  = IT_RECLIST
        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.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'Error occurred in sending mail'(039).
      ELSE.
        MESSAGE I000 WITH 'Mail sent'(010).
      ENDIF.
    ENDFORM.                    " send_mail_data
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_DATA .
      WRITE :/ SY-ULINE.
      WRITE:/1 SY-VLINE,
              2 'Material No'(024),
             19 SY-VLINE,
             20 'Material Description'(025),
             61 SY-VLINE,
             62 'Maintainence Status'(026),
             71 SY-VLINE,
             72 'Material type'(027),
             89 SY-VLINE,
             90 'Industry sector'(028),
             107 SY-VLINE,
             108 'Base unit of measure'(029),
             125 SY-VLINE.
      WRITE:/1 SY-VLINE,
             19 SY-VLINE,
             61 SY-VLINE,
             71 SY-VLINE,
             89 SY-VLINE,
             107 SY-VLINE,
             125 SY-VLINE.
      WRITE :/ SY-ULINE.
    ENDFORM.                    " DISPLAY_DATA
    Regards,
    Laxmi.

  • Outlook 2010 Terminal Services; Error when sending mail "Content within this application coming... "About:Internet"

    Hi All,
    We have Outlook 2010 running on Terminal Services for one of our clients. Frequently users experience an error when trying to send mail.  A message pops up stating the follow (sorry I cannot post pictures or links yet which would make this much easier)
               "Content within this application coming from the website listed below is being blocked by Internet Explorer Enhanced Security Configuration."    About:Internet
    If I try to add this to the Trusted Sites zone it tells me that I have already done so.  All users are experiencing this issue. Not sure what can be done from our end to alleviate this problem.  Any advice?

    Either remove this "About:Internet" or disable Internet Explorer Enhanced Security Configuration on the terminal server:
    To disable IE ESC for all users
    Close all instances of Internet Explorer.
    Click Start, point to Administrative Tools, and then click
    Server Manager.
    If a User Account Control dialog box appears, click Continue.
    Under Security Summary, click Configure IE ESC.
    Under Administrators, click Off (Recommended).
    Under Users, click Off (Recommended).
    Click OK.
    Worked for me. Thanks!

  • Cannot send mail thru Blackberry Pro Software

    Hi
    I have a BlackberryPro installation on n Exchange 2003 svr with a few Blackberry PDAs connecting thru it.  And one of the phones is a 8330 and I was able to get it to sync to the BB Pro svr, but if I attempt to send mail from the phone it fails immediately and just puts the message in teh sent Items folder on the phone.  It recvs new messages, but cannot send mail to anyone in my organization or outside it.  Can anyone give me an idea of where to look for logs or anything to see what I have setup wrong?
    thanks

    when you send it and ir fails, open the failed message and scroll UP, there should be an error
    also make sure the device has allt he appropriate service books for your BES server

  • Problem in Sending mail thru gmail........

    i am new to Java mail API,can any one help me out...
    i have gmail a/c named [email protected] and it is smtp enabled.
    now i want to send mail from my application.so, i write the following code....but it give some error as describe follow.....
              /**************** Code **************/
    package mailsend;
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    Mahesh Dave. 9960497637
    public class Main {
         static String msgText1 = "This is a message body.\nHere's line two.";
         static String msgText2 = "This is the text in the message attachment.";
    /** Creates a new instance of Main */
    public Main() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    String to = "[email protected]";
              String from = "[email protected]";
              String host = "smtp.gmail.com";
              boolean debug = Boolean.valueOf(false).booleanValue();
              // create some properties and get the default Session
              Properties props = new Properties();
              props.put("mail.smtp.host", host);
              Session session = Session.getInstance(props, null);
              session.setDebug(debug);
              try
                   // create a message
                   MimeMessage msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(from));
                   InternetAddress[] address = {new InternetAddress(to)};
                   msg.setRecipients(Message.RecipientType.TO, address);
                   msg.setSubject("JavaMail APIs Multipart Test");
                   msg.setSentDate(new Date());
                   // create and fill the first message part
                   MimeBodyPart mbp1 = new MimeBodyPart();
                   mbp1.setText(msgText1);
                   // create and fill the second message part
                   MimeBodyPart mbp2 = new MimeBodyPart();
                   // Use setText(text, charset), to show it off !
                   mbp2.setText(msgText2, "us-ascii");
                   // create the Multipart and its parts to it
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(mbp1);
                   mp.addBodyPart(mbp2);
                   // add the Multipart to the message
                   msg.setContent(mp);
                   // send the message
                   Transport.send(msg);
              catch (MessagingException mex)
                   mex.printStackTrace();
                   Exception ex = null;
                        if ((ex = mex.getNextException()) != null)
                             ex.printStackTrace();
                   /*************** Error **************/
    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Administrator\My Documents\MailSend\build\classes
    compile:
    run:
    javax.mail.NoSuchProviderException: smtp
    at javax.mail.Session.getService(Session.java:768)
    at javax.mail.Session.getTransport(Session.java:708)
    at javax.mail.Session.getTransport(Session.java:651)
    at javax.mail.Session.getTransport(Session.java:631)
    at javax.mail.Session.getTransport(Session.java:686)
    at javax.mail.Transport.send0(Transport.java:166)
    at javax.mail.Transport.send(Transport.java:98)
    at mailsend.Main.main(Main.java:81)
    BUILD SUCCESSFUL (total time: 7 seconds)
    So can any one help to solve above probs........and also i want to made atachement inform of file.....anyone have any idea about this, can help.....
    Thank you in advance.....

    You've read the JavaMail FAQ, right? If not, please do now.
    You've also found and tried the many sample programs that
    come with JavaMail, right?
    javax.mail.NoSuchProviderException: smtp
    This error is often a result of not using mail.jar directly but instead extracting
    the classes from mail.jar and adding them to your application. Don't do that.
    If that's not what you did, I need more information about your environment,
    such as your CLASSPATH setting.

  • Not able to send mail thru Oracle

    Hi all,
    I am using Oracle 9.2.0.6 on RHEL platform.....
    I am using the below procedure to send mail from oracle
    CREATE or REPLACE PROCEDURE SimpleTextMessage IS
        mailHOST    VARCHAR2(64) := '10.0.1.2';
        mailFROM    VARCHAR2(64);
        mailTO      VARCHAR2(64);
        mailCONN    utl_smtp.connection;
        mailDATE    VARCHAR2(20);
        vreply      utl_smtp.reply;
        vreplies    utl_smtp.replies;
        i           number;
    BEGIN
        mailFROM := '[email protected]';
        mailTO   := '[email protected]';
        SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS') INTO mailDATE FROM dual;
          dbms_output.put_line('open_connection');
          dbms_output.put_line('---------------');
          vreply := utl_smtp.open_connection(mailHOST, 25, mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
          dbms_output.put_line('help');
          dbms_output.put_line('----');
          vreplies := utl_smtp.help(mailCONN, 'HELP');
          for i in 1..vreplies.count loop
            dbms_output.put_line( 'code = ' || vreplies(i).code );
            dbms_output.put_line( 'text = ' || vreplies(i).text );
          end loop;
    vreply := utl_smtp.open_data(mailCONN);
          utl_smtp.write_data(mailCONN, 'Subject: '|| 'A subject' || chr(13));
          utl_smtp.write_data(mailCONN, 'From:    '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN, 'Date:    '||mailDATE     || chr(13));
          utl_smtp.write_data(mailCONN, 'To:      '||mailTO       || chr(13));
          utl_smtp.write_data(mailCONN, 'CC:      '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN, 'BCC:     '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN,                              chr(13));
          utl_smtp.write_data(mailCONN, 'Hello Friend.'           || chr(13));
          utl_smtp.write_data(mailCONN, 'Drop me an e-mail.'      || chr(13));
          dbms_output.put_line('close_data');
          dbms_output.put_line('----------');
          vreply := utl_smtp.close_data(mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
          dbms_output.put_line('quit');
          dbms_output.put_line('----');
          vreply := utl_smtp.quit(mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
    END;
    /At the time of compilation i am not getting any error but when i call that proc i am getting the below error:
    SQL> exec cadata3.simpletextmessage();
    BEGIN cadata3.simpletextmessage(); END;
    ERROR at line 1:
    ORA-29277: invalid SMTP operation
    ORA-06512: at "SYS.UTL_SMTP", line 43
    ORA-06512: at "SYS.UTL_SMTP", line 279
    ORA-06512: at "CADATA3.SIMPLETEXTMESSAGE", line 29
    ORA-06512: at line 1can asomebody throw some light on the same....

    Still getting the same problem
    CREATE or REPLACE PROCEDURE SimpleTextMessage IS
        mailHOST    VARCHAR2(64) := '10.0.1.2:8443';
        mailFROM    VARCHAR2(64);
        mailTO      VARCHAR2(64);
        mailCONN    utl_smtp.connection;
        mailDATE    VARCHAR2(20);
        vreply      utl_smtp.reply;
        vreplies    utl_smtp.replies;
        i           number;
    BEGIN
        mailFROM := '[email protected]';
        mailTO   := '[email protected]';
        SELECT TO_CHAR(SYSDATE,'MM/DD/YYYY HH24:MI:SS') INTO mailDATE FROM dual;
          dbms_output.put_line('open_connection');
          dbms_output.put_line('---------------');
          vreply := utl_smtp.open_connection(mailHOST, 25, mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
          dbms_output.put_line('help');
          dbms_output.put_line('----');
          vreplies := utl_smtp.help(mailCONN, 'HELP');
          for i in 1..vreplies.count loop
            dbms_output.put_line( 'code = ' || vreplies(i).code );
            dbms_output.put_line( 'text = ' || vreplies(i).text );
          end loop;
    vreply := utl_smtp.close_data(mailCONN);
          utl_smtp.write_data(mailCONN, 'Subject: '|| 'A subject' || chr(13));
          utl_smtp.write_data(mailCONN, 'From:    '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN, 'Date:    '||mailDATE     || chr(13));
          utl_smtp.write_data(mailCONN, 'To:      '||mailTO       || chr(13));
          utl_smtp.write_data(mailCONN, 'CC:      '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN, 'BCC:     '||mailFROM     || chr(13));
          utl_smtp.write_data(mailCONN,                              chr(13));
          utl_smtp.write_data(mailCONN, 'Hello Friend.'           || chr(13));
          utl_smtp.write_data(mailCONN, 'Drop me an e-mail.'      || chr(13));
          dbms_output.put_line('close_data');
          dbms_output.put_line('----------');
          vreply := utl_smtp.close_data(mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
          dbms_output.put_line('quit');
          dbms_output.put_line('----');
          vreply := utl_smtp.quit(mailCONN);
          dbms_output.put_line( 'code = ' || vreply.code );
          dbms_output.put_line( 'text = ' || vreply.text );
    END;
    /error
    SQL> exec cadata3.simpletextmessage();
    BEGIN cadata3.simpletextmessage(); END;
    ERROR at line 1:
    ORA-29277: invalid SMTP operation
    ORA-06512: at "SYS.UTL_SMTP", line 43
    ORA-06512: at "SYS.UTL_SMTP", line 303
    ORA-06512: at "CADATA3.SIMPLETEXTMESSAGE", line 28
    ORA-06512: at line 1Edited by: user00726 on Jul 31, 2009 4:14 AM

  • While sending mails thru my report, Iam getting popups - how to avoid popus

    How ever when I execute the program I am able to send mails successfully and but I am getting two popups.
    One pop up says its title as u2018SAP connect Send Process : List of sent objectsu2019 and it is showing the list in popup.
    When I press u2018ENTERu2019 on above pop up u2026
    Another pop up says its title as u2018SAP office express infou2019 and in the popup there is F8 button followed Express document u201CCannot be sent: Errors of EDI 869 input file" received from auu201D and then pop has buttons as enter, choose inbox buttons.
    My functional consultant donu2019t want these popups as he want to run this program in background mode.
    How can I remove popus ?
    How can I remove popus ?
    Do I need to comment
    PERFORM initiate_mail_execute_program. in my code ?
    Please suggest me ?
    FORM initiate_mail_execute_program.
    WAIT UP TO 2 SECONDS.
    IF gd_error EQ 0.
    SUBMIT rsconn01 WITH mode = 'INT'
    WITH output = 'X'
    AND RETURN.
    ENDIF.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    OR what else can I do - inorder to riun my program in background mode.
    Thanks IN ADVANCE.

    > One pop up says its title as u2018SAP connect Send Process : List of sent objectsu2019 and it is showing the list in popup.
    > When I press u2018ENTERu2019 on above pop up u2026
    This is coming from  SUBMIT RSCONN01 you pass output = ' '. instead of 'X'
    > Another pop up says its title as u2018SAP office express infou2019 and in the popup there is F8 button followed Express document u201CCannot be sent: Errors of EDI 869 input file" received from auu201D and then pop has buttons as enter, choose inbox buttons.
    >
    second one is express document.
    check you might marked that as 'X' make it  ' '.
    RECEIVERS-SNDEX = ' '. <===this is incase of SO_OBJECT_SEND
    RECEIVERS-EXPRESS = ' '. "<==== this is incase of SO_NEW_DOCUMENT_ATT_SEND_API1
    check which function you are using accordingly you need to make that express = ' '.

  • Function for Sending Mail Thru SAP

    Please let me know if there is any function available in SAP thru wich I can send Emails to other mail box . Please give me some example code if any available.

    Kindly refer the below code  to send a fiel as an attachment via MAil from SAP -
    *& Report  ZGILL_SENDMAIL_PDF                                          *
    REPORT  ZGILL_SENDMAIL_PDF                      .
    INCLUDE ZGILL_INCMAIL.  "SEE BELOW FOR INCLUDE PROGRAM CODE.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case DEFAULT '[email protected]'.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY DEFAULT 'C:\TEMP\SALARY_SLIP1.PDF'.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    *********************iNCLUDE pROGRAM********************************************
    *&  Include           ZGILL_INCMAIL                                    *
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc <> 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    OBJECT_PARA =
    object_parb =
    receivers = reclist
    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
    IF sy-subrc <> 0.
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    **********************INCLUDE END********************************

  • Default acrobat xi pro send mail to default email application and remember my choice 2008R2 remote desktop server

    I have 2008R2 Remote Desktop Servers with Adobe Acrobat XI pro.  When a new user tries to send a pdf via email, it pops up a message "How would you like to send this email"  they have to pick "Default email application (Microsoft Outlook) and Remember my choice.  Then the next time they try to send an email, the get a warning "This email will be sent using "Default email application (Microsoft Outlook)".  Click on 'Change Preferences' to change your default account settings.  They have to Click Do not Show this message again, and then continue.  (actually I have a couple of users that have to go through this process Every time they sign on to the remote desktop server),
    I downloaded the group policy adm pack and I can not find any settings to default this for a user.
    Is there any group policy settings or a registry entry I can make on the remote desktop server to default these settings?
    Thank you in advance

    Distiller is a different product. The prefs should go under  Adobe Acrobat.
    BTW, are you familiar with the Admin Guide and the Pref Ref? Acrobat-Reader Enterprise Toolkit Home
    Examples:
    [HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert]
    [HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert\cCheckbox]
    "iDigSigSaveAsCertified"=dword:00000001
    "iAppDoNotTakePDFOwnershipAtLaunch"=dword:00000001
    "iavARMNoAutoUpdateWarning"=dword:00000002
    "iDontShowWarn"=dword:00000000
    "iSendMailDefaultAccountAlert"=dword:00000001
    [HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert\cCheckbox\cAnnots]
    "iEmailCollisionConfirm"=dword:00000001
    "iSharedReviewConfirm"=dword:00000001
    "iSendForReviewConfirm"=dword:00000001

Maybe you are looking for

  • We need to open the connection each time you read a message from the queue?

    Hi I have a doubt regarding my queue read data that contains those I create a session and connection. Whenever I do this or you can create a connection and get all data from the queue and then close the connection and session eg. I have 1000 files in

  • Report for "ROUGH GRs"

    "ROUGH GR" is created, changed and displayed by tcode vl41, vl42 and vl43 respectively. Is there any report which is in any way related to Rough GRs?? Is there any way to view the list of Rough GRs against which Actual GRs have not been posted yet?

  • Unwanted Pause?

    Hello Everyone, I would like to ask you for your help.I am building a DVD with motion Menus but there seems to be a problem.When it transition from Motion video to the menu there is a unwanted pause which makes the menu look like it is 2 parts(which

  • Documentation for using Adobe Document Services

    Hi, Is there any documentation available on how to use Adobe Document Services? I have installed Adobe Document Services for Netweaver 2004. But I am not able to use the services as I do not know how to access them (is it like Adobe Document Services

  • Blocking an e-mail sender

    How do you block a person from sending you e-mails? I know it has something do with "rules".