Error in sending mail (mail exception error)

HI guys,
I used smtp method to send mail in the java application. If i am trying through outlook it's working. but if i used in the application it's throwing this error. can anyone help me?
I am using SMTP
(org.springframework.mail.javamail) method to send the mail.
below is the code i used to implement this,
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
MailDO mailDO = new MailDO();
mailDO.setTo(To_email);
mailDO.setFrom(From_email);
mailDO.setCc(Cc_email);
mailDO.setSubject(Subject);
Properties prop = new Properties();
prop.put("mail.smtp.auth", "true");
mailSender.setHost("smtp.domain.co.in");
mailSender.setUsername("[email protected]");
mailSender.setPassword("password");
mailSender.setProtocol("smtp");
mailSender.setPort(25);
mailSender.setJavaMailProperties(prop);
MimeMessage message = mailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(message);
helper.setFrom(mailDO.getFrom());
helper.setCc(ccAddColl);
helper.setSubject(mailDO.getSubject());
helper.setTo(mailDO.getTo());
helper.setText(mailDO.getBody(),true);
try{
mailSender.send(message);
catch(MailException ex) {
System.err.println(ex.getMessage());
ex.printStackTrace();
But i am getting following error :-
Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: smtp
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: smtp
javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:760)
at javax.mail.Session.getTransport(Session.java:685)
at javax.mail.Session.getTransport(Session.java:628)
at javax.mail.Session.getTransport(Session.java:608)
Edited by: arkhit on Oct 16, 2007 11:05 PM

I do not know org.springframework.mail.javamail but if it is a framework, a wrapper around a mail provider, like the standard JavaMail one, the latter must be on the classpath too and maybe it must be registered somehow.
But it is just a guess - I don't know the stuff.

Similar Messages

  • Error in sending external mail

    hi ..
    while sending mail using BCS objects .... i am geting error
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    ....i too configured SCOT transaction wit port number 25 , mail host and also given the internet email id for mailing user....
    plz do help me ...

    This error occurs when you send a mail via the SMTP node and can have several causes:
    1. Default domain not set
    2. Default code page not set (only with multi-codepage systems)
    3. Code page not suitable for sending mail
    4. COMMIT WORK is missing (programming error)
    5. Workplace plug-in is missing
    Solution
    Activate the SAPconnect trace and resend the document if necessary. The next time the SAPconnect send job is running, search for the entries marked in red in the SAPconnect trace of the document. The applicable solutions, depending on these entries, are listed below:
    1. Default domain not set
    Trace entries:
    BCS->MIME_MESSAGE_GENERATE
    Sender Address Not Found 80
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: SENDER_BCS
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    or:
    BCS->MIME_MESSAGE_GENERATE
    Error during MIME Flow Generation
    BCS->MIME_MESSAGE_GENERATE
    Error During Automatic Determinaton of Default Internet Domain
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MIME_BCS
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must set the domain of the SAP System (Settings --> Default Domain).
    2. Default code page not set (only with multi-codepage systems)
    Trace entries:
    CL_BCOM_MIME->GET_CODEPAGE
    Termination: Multi-Codepage Systems Not Supported
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must specify a code page on the SMTP node.
    3. Code page not suitable for sending mail
    Trace entries:
    CL_BCOM_MIME->GET_CHARSET
    Termination: Charset Cannot Be Determined for SAP Code Page
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution: In the SAPconnect Administration (transaction SCOT), you must specify a code page (an entry is available in table TCP00A) that is suitable for sending mail on the SMTP node.
    4. COMMIT WORK is missing (programming error)
    Trace entries:
    SO_OBEJECT_MIME_GET
    No Send Order Exists -> Termination
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    Solution: See note 429427 for the correction.
    5. Configuration for the sending of Business Objects
    An attempt is made to send a document of type OBJ to an external recipient. This requires a conversion to TXT/HTML format, but the necessary modules are not configured correctly.
    Trace entries:
    SX_OBJECT_CONVERT_OBJ_HTM
    Converting Document Format from OBJ to TXT/HTML
    SO_OBEJECT_MIME_GET
    No MIME Document Received. Error Code: MNA_DOC
    SX_GENERATE_NDR
    Internal Error: SO_OBJECT_MIME_GET Exception: 0
    or
    SX_GENERATE_NDR
    Internal error: SO_OBJECT_MIME_GET Exception: 2
    Solution:
    Please refer to Note 530932.
    1. You can refer to SAP Note 487754.
    2. Error in Sending External Mail
    3. Re: BWCCMS: send email if process chain fails?
    Hope this will solve your issue.
    Re: Send mails
    Re: SCOT Setup
    Reward points..

  • Error while sending E-Mail -- 501 Syntax error in parameters or arguments

    Dear Friends,
    I was trying to send E-Mail using the NTLM Authentication mechanism using the below program:
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.mail.PasswordAuthentication;
    import java.util.Date;
    import com.sun.mail.smtp.*;
    public class MailerWithAuthentication
         private String     smtpServer;
         private String      fromEmailId;
         private String      toEmailId;
         private String      ccEmailId;
         private String      bccEmailId;
         private String      subject;
         private String      message;
         private String host;
         public MailerWithAuthentication(String toemail, String msg,String sub,String fromId,String host)
              this.toEmailId = toemail;;
              this.subject = sub;
              this.message = msg;
              this.fromEmailId=fromId;
              this.host=host;
    public void sendMail()
              String mailContent = "";
              try
                   Authenticator authenticator = new Authenticator();
                   Properties props = new Properties();
              props.put("mail.smtp.host",this.host );
              props.put("mail.smtp.port", "25");
              props.put("mail.smtp.auth", "true");
              props.put("mail.smtp.auth.mechanisms", "NTLM");
              props.put("mail.smtp.auth.ntlm.flags", "0x00000200");          
              props.put("mail.smtp.auth.ntlm.domain","sal.ad");
              props.put("mail.debug", "true");
              Session session = Session.getDefaultInstance(props,authenticator);
    Message msg = new MimeMessage(session);          
              MimeMessage message = new MimeMessage(session);
              message.setContent("This is a test", "text/plain");
              message.setFrom(new InternetAddress(this.fromEmailId));
              message.addRecipient(Message.RecipientType.TO,new InternetAddress(this.toEmailId));
              Transport.send(message);
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println("Exception in MailerThread : run: " + e.getMessage());               
    private class Authenticator extends javax.mail.Authenticator {
              private PasswordAuthentication authentication;
              public Authenticator() {
                   String username= "sal.ad\mailuser";
                   String password = "mail@123";          
                   authentication = new PasswordAuthentication(username, password);
              protected PasswordAuthentication getPasswordAuthentication() {
                   return authentication;
    public static void main(String args[])
              try
                   System.out.println(" Usage : java MailerWithAuthentication <To-Email> <Message> <Subject> <From-Email> <Mail-Server-IP>");
                   MailerWithAuthentication mailer = new MailerWithAuthentication (args[0],args[1],args[2],args[3],args[4]);
                   mailer.sendMail();
              catch(Exception e)
                   e.printStackTrace();
    Following is the output while running the program:
    DEBUG: JavaMail version 1.4ea
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.providers (No such file or directory)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.address.map (No such file or directory)
    Mechanishm = NTLM
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: trying to connect to host "192.168.14.6", port 25, isSSL false
    220 ****************************************************************************
    DEBUG SMTP: connected to host "192.168.14.6", port: 25
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    javax.mail.MessagingException: 501 Syntax error in parameters or arguments -
    =================================
    The error is :
    EHLO
    501 Syntax error in parameters or arguments -
    HELO
    501 Syntax error in parameters or arguments -
    =================================
    Please tell me what went wrong here. Is it due to any mistake in the program ?
    Thanks in advance.

    hello Anirudh Pucha,
    thanks for your message,
    i'm downloading all the files you advised and one more doubt regarding SOA installation,
    i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
    if possible please send me a details in word documents to my mail "[email protected]".
    Thanks again

  • Getting error when sending SMTP mail using javamail api

    hi all
    i am new to javamail api...and using it first-time....i'v used the following code
    <%
    String mailHost="mail.mastsale.com";
    String mailText="Hello this is a test msg";
    String to="<a href="mailto:[email protected]">[email protected]</a>";
    String subject="jsp test mail";
    try
    String from="<a href="mailto:[email protected]">[email protected]</a>";
    String mailhost = "mail.mastsale.com";
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailhost);
    // Get a Session object
    Authenticator auth = new SMTPAuthenticator( "<a href="mailto:[email protected]">[email protected]</a>", "abcd" );
    Session session1 = Session.getInstance(props,auth);
    //Session.setDebug(true);
    //construct message
    Message msg = new MimeMessage(session1);
    msg.setFrom(new InternetAddress(from,"Your Name"));
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
    msg.setSubject(subject);
    msg.setText(mailText);
    //msg.setHeader("X-Mailer",mailer);
    msg.setSentDate(new Date());
    msg.saveChanges();
    //Send the message
    out.println("Sending mail to " + to);
    Transport.send(msg);
    catch (MessagingException me)
    out.println("Error in sending message for messaging exception:"+me);
    %>
    and
    SMTPAuthenticator.java
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SMTPAuthenticator extends javax.mail.Authenticator {
    private String fUser;
    private String fPassword;
    public SMTPAuthenticator(String user, String password) {
    fUser = user;
    fPassword = password;
    public PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(fUser, fPassword);
    Now getting error as: Error in sending message for messaging exception:javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550-(host.hostonwin.com) [208.101.41.106] is currently not permitted to relay 550-through this server. Perhaps you have not logged into the pop/imap server 550-in the last 30 minutes or do not have SMTP Authentication turned on in your 550 email client.
    Can anyone help me?

    i got the following error while using the below code,
    -----------registerForm----------------
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    :::::::::::::::::::::::::::::::::<FONT SIZE=4 COLOR="blue"> <B>Error : </B><BR><HR> <FONT SIZE=3 COLOR="black">javax.mail.AuthenticationFailedException<BR><HR>
    -----------registerForm----------------
    public class SendMailBean {
    public String send(String p_from, String p_to, String p_cc, String p_bcc,
    String p_subject, String p_message, String p_smtpServer,String FilePath) {
    String l_result = "";
    // Name of the Host machine where the SMTP server is running
    String l_host = p_smtpServer;
    //for file attachment
    String filename = FilePath;
    // Gets the System properties
    Properties l_props = System.getProperties();
    // Puts the SMTP server name to properties object
    l_props.put("mail.smtp.host", l_host);
    l_props.put("mail.smtp.auth", "true");
    // Get the default Session using Properties Object
    Session l_session = Session.getDefaultInstance(l_props, null);
    l_session.setDebug(true); // Enable the debug mode
    try {
    MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
    // Setting the "To recipients" addresses
    l_msg.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse(p_to, false));
    // Setting the "Cc recipients" addresses
    l_msg.setRecipients(Message.RecipientType.CC,
    InternetAddress.parse(p_cc, false));
    // Setting the "BCc recipients" addresses
    l_msg.setRecipients(Message.RecipientType.BCC,
    InternetAddress.parse(p_bcc, false));
    l_msg.setSubject(p_subject); // Sets the Subject
    // Create and fill the first message part
    MimeBodyPart l_mbp = new MimeBodyPart();
    //123
    ///////l_mbp.setText(p_message);
    l_mbp.setContent(p_message,"text/html");
    // Create the Multipart and its parts to it
    Multipart l_mp = new MimeMultipart();
         //l_mp.setContent(html,"text/html");
    l_mp.addBodyPart(l_mbp);
    // Add the Multipart to the message
    l_msg.setContent(l_mp,"text/html");
    // Set the Date: header
    l_msg.setSentDate(new Date());
    //added by cibijaybalan for file attachment
         // attach the file to the message
    //Multipart l_mp1 = new MimeMultipart();
         if(!filename.equals(""))
                   String fname = filename;
                   MimeBodyPart mbp2 = new MimeBodyPart();
                   FileDataSource fds = new FileDataSource(fname);
                   mbp2.setDataHandler(new DataHandler(fds));
                   mbp2.setFileName(fds.getName());
                   l_mp.addBodyPart(mbp2);
              // add the Multipart to the message
              l_msg.setContent(l_mp);
    //ends here
         l_msg.setSentDate(new java.util.Date());
    // Send the message
    Transport.send(l_msg);
    // If here, then message is successfully sent.
    // Display Success message
    l_result = l_result + "Mail was successfully sent to : "+p_to;
    //if CCed then, add html for displaying info
    //if (!p_cc.equals(""))
    //l_result = l_result +"<FONT color=green><B>CCed To </B></FONT>: "+p_cc+"<BR>";
    //if BCCed then, add html for displaying info
    //if (!p_bcc.equals(""))
    //l_result = l_result +"<FONT color=green><B>BCCed To </B></FONT>: "+p_bcc ;
    //l_result = l_result+"<BR><HR>";
    } catch (MessagingException mex) { // Trap the MessagingException Error
    // If here, then error in sending Mail. Display Error message.
    l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
    "<FONT SIZE=3 COLOR=\"black\">"+mex.toString()+"<BR><HR>";
    } catch (Exception e) {
    // If here, then error in sending Mail. Display Error message.
    l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
    "<FONT SIZE=3 COLOR=\"black\">"+e.toString()+"<BR><HR>";
    e.printStackTrace();
    }//end catch block
    //finally {
    System.out.println(":::::::::::::::::::::::::::::::::"+l_result);
    return l_result;
    } // end of method send
    } //end of bean
    plz help me

  • Error when sending a Mail (SUBSTITUTE_NOT_DEFINED in SO_OBJECT_SEND)

    Hello,
    we want to send an e-mail from ABAP during the inbound processing of IDocs. We use the function module SO_OBJECT_SEND. During the perform CHECK_USER_ROLE the exception SUBSTITUTE_NOT_DEFINED is raised. Because of this error the mail is not sent. What does this mean? What do we have to do to finally send the mail?
    Best regards,
    David

    this might help:
    http://help.sap.com/saphelp_nw70/helpdata/EN/8d/25f558454311d189430000e829fbbd/frameset.htm
    Or, go to your (or the person responsible in the Idoc processing) SAP inbox (SBWP transaction). Via the menu you can maintain a substitute (Menu->Settings->Workflow settings->Maintain Substitute.

  • Error when sending e-mails...

    Hello experts,
    We are currently testing our report that lets users create new customers and then send e-mails
    to specfified user's e-mail address located in a custom table. Now, we always get this error:
    Database error for <ADDR_PERS_COMP_COMM_GET> <0>
    We cannot pinpoint exactly whatcauses this error. Really need help on this guys and thank you very much.

    Hi Ong,
    I am using FM SO_NEW_DOCUMENT_API1. Here is my code:
    START-OF-SELECTION.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE it_zts0001
        FROM zts0001
        WHERE kunnr = p_kunnr.
      SELECT * FROM zshipto_email
      INTO TABLE it_zshipto_email.
    *if p_flag = 'A'.
      IF p_flag = 'A'.
        v_title = 'Add Information'.
        SORT it_zts0001 BY cdseq DESCENDING.
        READ TABLE it_zts0001 INDEX 1.
        IF sy-subrc EQ 0.
          v_seq = it_zts0001-cdseq + 1.
        ELSE.
          v_seq = 1.
        ENDIF.
        REFRESH it_zts0001.
        CLEAR it_zts0001.
        MOVE: p_kunnr  TO it_zts0001-kunnr,
              v_seq    TO it_zts0001-cdseq,
              p_addr   TO it_zts0001-zaddress,
              p_pers   TO it_zts0001-zcperson,
              p_numb   TO it_zts0001-zcnumber,
              sy-uname TO it_zts0001-zcreated_by,
              sy-datum TO it_zts0001-zchanged_date.
        MOVE-CORRESPONDING it_zts0001 TO it_zts_stpgeoloc.
        APPEND: it_zts0001, it_zts_stpgeoloc.
        CLEAR:  it_zts0001, it_zts_stpgeoloc.
        INSERT zts_stpgeoloc FROM TABLE it_zts_stpgeoloc.
        INSERT zts0001 FROM TABLE it_zts0001.
        IF sy-subrc EQ 0.
          maildata-obj_name = 'New Ship-To parties for processing'.
          maildata-obj_descr = 'New Ship-To parties for processing'.
          maildata-obj_langu = sy-langu.
    *code to send messages for e-mails found in table ZSHIPTO_EMAIL
    *message body is dependent on field ZEVENT
          LOOP AT it_zshipto_email.
          for controllers
            IF it_zshipto_email-zevent = 1.
              mailtxt-line = 'You have new Ship-To parties for processing.'.
              APPEND mailtxt.
              CLEAR mailtxt.
              CONCATENATE: 'Kindly activate the ship-to party in table'
                           'ZTS0001'
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
              APPEND mailtxt.
            dealer code and name
              CONCATENATE: 'Dealer :' p_kunnr '-' p_name1
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            ship-to code
              CONCATENATE: 'Ship-To:' v_seq
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            address
              CONCATENATE: 'Address:' p_addr
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            contact person
              CONCATENATE: 'Contact person:' p_pers
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            contact number
              CONCATENATE: 'Contact number:' p_numb
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
              APPEND mailtxt.
         for handling cost admins
            ELSE.
              mailtxt-line = 'You have new Ship-To parties for processing.'.
              APPEND mailtxt.
              CONCATENATE: 'Kindly assign the geographical location'
                           'in table ZTS_STPGEOLOC'
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
              APPEND mailtxt.
            dealer code and name
              CONCATENATE: 'Dealer :' p_kunnr '-' p_name1
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            ship-to code
              CONCATENATE: 'Ship-To:' v_seq
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            address
              CONCATENATE: 'Address:' p_addr
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            contact person
              CONCATENATE: 'Contact person:' p_pers
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
            contact number
              CONCATENATE: 'Contact number:' p_numb
                           INTO v_contents
                           SEPARATED BY space.
              mailtxt-line = v_contents.
              APPEND mailtxt.
              CLEAR: mailtxt, v_contents.
              APPEND mailtxt.
            ENDIF.
            mailrec-receiver = it_zshipto_email-zemail.
            TRANSLATE it_zshipto_email-zemail TO LOWER CASE.
            mailrec-rec_type  = 'U'.
            APPEND mailrec.
            CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                 EXPORTING
                      document_data              = maildata
                      document_type              = 'RAW'
                      put_in_outbox              = 'X'
                      commit_work                = 'X'
                 TABLES
                      object_header              = mailtxt
                      object_content             = mailtxt
                      receivers                  = mailrec
                 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 sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
            CLEAR:    mailtxt,  mailrec.
            REFRESH:  mailtxt, mailrec.
          ENDLOOP.
          WRITE:/ 'Record Added' COLOR 1.
          SKIP 1.
          WRITE:/05 'Customer Number     :', p_kunnr,
                /05 'Code                :', v_seq,
                /05 'Address             :', p_addr,
                /05 'Contact Person      :', p_pers,
                /05 'Contact Number      :', p_numb.
        ENDIF.

  • Error while sending a mail using UTP_MAIL package in Oracle 10g

    Hi,
    We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
    SQL> connect sys/password as sysdba
    Connected.
    SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
    Package created.
    Synonym created.
    SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
    Package body created.
    SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
    System altered..
    Now we try the code
    begin
    utl_mail.send(
    sender => 'sender's mail',
    recipients => 'receiver mail',
    CC => 'optional',
    subject => 'Testing utl_mail',
    message => 'Test Mail'
    end;
    But we get the following error...
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "SYS.UTL_MAIL", line 405
    ORA-06512: at "SYS.UTL_MAIL", line 594
    ORA-06512: at line 2
    We also tried connecting to the mail server through telnet .But it is not getting connected..
    Please help us to solve the issue.

    From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
    On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
    "Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID:      Note:4083461.8"
    This was fixed on 10gR2 base and on 9.2.0.8.0
    ~ Madrid

  • Error while sending E-Mail Notification

    hi,
    when i tried to send mail from BPEL i faced error, where i configured the outlook with gmail server its working fine,here i paste the ns-emails.xml and the error code is server.
    ns_emails.xml
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="ALL">
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>my name</FromName>
    <FromAddress>my email address</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>smtp.gmail.com</SMTPHost>
    <SMTPPort>587</SMTPPort>
         <AuthenticationRequired>true</AuthenticationRequired>
    <UseTLS>true</UseTLS>
    </OutgoingServerSettings>
    <IncomingServerSettings>
    <Server>pop.gmail.com</Server>
    <Port>995</Port>
    <Protocol>pop3</Protocol>
    <UserName>my email address</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">my password</Password>
    <UseSSL>true</UseSSL>
    <Folder>Inbox</Folder>
    <PollingFrequency>1</PollingFrequency>
    <PostReadOperation>
    <MarkAsRead/>
    </PostReadOperation>
    </IncomingServerSettings>
    </EmailAccount>
    </EmailAccounts>
    Error in server:
    javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS
    command first. a4sm326251tib.11
    at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTran
    sport.java:1020)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTranspor
    t.java:716)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTrans
    port.java:388)
    at oracle.tip.pc.services.notification.email.EmailDriver
    .sendMessage(EmailDriver.java:215)
    at oracle.tip.pc.services.notification.email.EmailDriver
    .send(EmailDriver.java:185)
    at oracle.tip.pc.services.notification.DefaultNotificati
    onServiceImpl.sendEmailNotification(DefaultNotificationServiceImpl.java:251)
    at oracle.tip.pc.services.notification.NotificationServi
    ceImpl.sendEmailNotification(NotificationServiceImpl.java:271)
    at oracle.bpel.services.notification.queue.sender.MDBCon
    sumer.deliverNotification(MDBConsumer.java:256)
    at oracle.bpel.services.notification.queue.sender.MDBCon
    sumer.onMessage(MDBConsumer.java:137)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
    ethod)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet
    hodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg
    atingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoin
    PointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.DMSInterce
    ptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.interceptor.system.SetContext
    ActionInterceptor.invoke(SetContextActionInterceptor.java:44)
    at com.evermind.server.ejb.interceptor.InvocationContext
    Impl.proceed(InvocationContextImpl.java:119)
    at com.evermind.server.ejb.InvocationContextPool.invoke(
    InvocationContextPool.java:55)
    at com.evermind.server.ejb.MessageDrivenConsumer.onMessa
    ge(MessageDrivenConsumer.java:347)
    at com.evermind.server.ejb.MessageDrivenConsumer.process
    Messages(MessageDrivenConsumer.java:233)
    at com.evermind.server.ejb.MessageDrivenConsumer.run(Mes
    sageDrivenConsumer.java:169)
    at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    please help me out to resolve the issue.
    thanks in Advance
    Aswath Thaniga

    hello Anirudh Pucha,
    thanks for your message,
    i'm downloading all the files you advised and one more doubt regarding SOA installation,
    i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
    if possible please send me a details in word documents to my mail "[email protected]".
    Thanks again

  • Error in sending OUTLOOK mail step

    Hi ,
    Here is the design of sending the mail.
    From the OUTLOOK MAIL TO INITIATOR step i m getting the required mail id to whom mail should be sent from SAP system regarding the errors.
    then on moving to the send mail step i m encountering the error ,below is the data elements i maintained in the send mail step.
    But when a workflow is triggered i m getting the below error-->

    Hi Ranjith
    In your email step, the Type ID should be U - Email Address and not G - Org Object
    Specify the recipient type as Email and then select the container element which contains the email ID.
    Type ID G - is for org objects and to send directly to email IDs ... you need to use type U
    regards,
    Modak

  • E61i error when sending e-mail

    I am trying to send e-mail messages from my brand new E61i. I have verified the configuration is OK. The Internet connection works for all applications, including retrieving e-mails.
    When I try to send an e-mail, the phone connects to the remote SMTP server, which rejects the message. On the phone, I get a saying that the sending failed.
    The interesting part is actually on the SMTP server side: the log file shows that the recipient address has been replaced by the phone with the string "ReceiptAddress". Strangely, this is exactly matching the name of a string value in the
    SymbianOS library.
    Here is the relevant extract from the SMTP server log file (which I manage). The data has been anonymized, but I am willing to provide the original logs by private e-mail.
    Aug 31 08:20:52 myhost postfix/smtpd[26867]: 4281F9C014: reject: RCPT from ip-12-34-56-78.dyn.dsl.myisp.com[12.34.56.78]: 550 5.1.1 <ReceiptAddress>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<ReceiptAddress> proto=ESMTP helo=<[192.168.0.101]>
    FWIW, the software version on my phone is 1.0633.22.05 from 15-02-07 RM-227
    Note to the support or development team: If I can help in any way to debug this problem, please let me know.
    If there is a fix, of course it is even better.

    I do agree, my E61i has the same trouble. I think we need a fix
    for this...
    and OTOH there is another big email problem: the classical
    header prefixes like Re:, Fwd: and so on are replaced following
    the phone language, so for Italian you get R: and I:, that are
    totally bogus and, I think, non-rfc compliant.
    I suppose that for German you'll get something like Aw: for replies
    This MUST be fixed, with the standard values!
    Bye

  • Error while sending the mail( Database error for ADDR_PERS_COMP_COMM_GE)

    Hello guys,
    I am facing the error    " Database error for <ADDR_PERS_COMP_COMM_GET> <0> " as a pop-up message.
    below is my program.
    types: BEGIN OF t_p0002,
            pernr type PERSNO,       "Personnel number
            nachn TYPE PAD_NACHN,    "Last Name
            VORNA TYPE PAD_VORNA,    "First Name
            gbdat TYPE gbdat,        "Date of Birth
          END OF t_p0002.
    *******************Data of an object which can be changed**************************************
    data   S_maildata type SODOCCHGI1.
    *******************Text field length 255: texts***********************************************
    data : IT_MAILTXT1 type table of SOLISTI1 ,  "Internal table will contain texts of mail header
           WA_MAILTXT1 TYPE SOLISTI1,
           IT_MAILTXT2 type table of SOLISTI1 ,  "Internal table will contain texts of contents in the mail
           WA_MAILTXT2 TYPE SOLISTI1.
    *******************Structure of the API Recipient List*****************************************
    data : IT_MAILREC type table of SOMLRECI1,
           WA_MAILREC TYPE SOMLRECI1.
    DATA : it_pa0002 TYPE TABLE OF t_p0002,
           wa_pa0002 type t_p0002.
    data  Header_text type c LENGTH 15.
    CONSTANTS  content_text type c LENGTH 35 VALUE 'Tomorrow is the birthday of'.
    *******************Event start of selection***************************************************
    start-of-selection.
      PERFORM get_birthdate.   " will give birthday details
      PERFORM document_details. " will give text and mail details
    *&      Form  get_birthdate
          text : subroutine to get employee birthdate details
    form get_birthdate.
      data : l_date like sy-datum.
      refresh it_pa0002.
      l_date = sy-datum + 1.
      SELECT pernr nachn vorna gbdat
        from pa0002
        INTO TABLE it_pa0002
        where gbdat = '19650302'.
    ENDFORM.                    "get_birthdate
    *&      Form  document_details
          text : subroutine to get texts and mail details.
    FORM document_details.
      CLEAR: Header_text,
              wa_MAILREC.
      REFRESH  IT_MAILREC.
      S_maildata-obj_name = 'Birthday Reminder'.
      s_maildata-obj_descr = 'Birthday Reminder'.
      s_maildata-obj_langu = sy-langu.
      READ TABLE IT_MAILTXT1 INTO WA_MAILTXT1
      WITH KEY WA_MAILTXT1-line .
      WA_MAILTXT1-line = 'Birthday Reminder'.
      append WA_MAILTXT1 TO IT_MAILTXT1.
      CLEAR WA_MAILTXT1.
      LOOP at it_pa0002 INTO wa_pa0002.
        READ TABLE IT_MAILTXT2 INTO WA_MAILTXT2
         WITH KEY WA_MAILTXT2-line .
        CONCATENATE content_text ' ( ' wa_pa0002-pernr ' ) ' wa_pa0002-nachn wa_pa0002-vorna
        INTO  WA_MAILTXT2 SEPARATED BY ' '.
        append WA_MAILTXT2 TO IT_MAILTXT2.
        CLEAR WA_MAILTXT2.
        CLEAR wa_pa0002.
      ENDLOOP.
       LOOP AT IT_MAILREC INTO WA_MAILREC.
      WA_MAILREC-RECEIVER = 'Any mail id'.
      WA_MAILREC-rec_type = 'U'.
      append WA_MAILREC TO IT_MAILREC.
       ENDLOOP.
    ********************Function Mofule:To Send new Document*****************************************
      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
      EXPORTING
      document_data = S_maildata
      DOCUMENT_TYPE = 'RAW'
      PUT_IN_OUTBOX = ' '
      COMMIT_WORK = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
      tables
      OBJECT_HEADER = IT_MAILTXT1
      OBJECT_CONTENT = IT_MAILTXT2
    CONTENTS_HEX =
    OBJECT_PARA =
    OBJECT_PARB =
      receivers = IT_MAILREC
       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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "document_details
    After I pressed the exit button the program is getting terminated but still this mail is comming to sost transaction code.
    If I will comment the message code which is after sy-subrc the popup will not come and program will work without any interruption.
    Can anybody please solve this problem?

    Resolved

  • Error in sending ALV mail

    Hi,
    I am sending the ALV List through mail. But I am getting the error "MAXIMUM NUMBER OF INTERNAL SESSION REACHED".
    But without using the mail variant i am able to see the output. Mine mail functionality is not working

    Hi Can u send the code for that..
    I want to send a SAP mail to SAP Id with attachment as a Ouput of ALV_LIST_DISPLAY.
    please help..
    Thnks in Advance

  • Error when sending iCloud mail in Mavericks

    Trying to send an email in Mavericks Mail from iCloud account and got the following error: MCMailErrorDomain error 1032.
    Does this simply mean that iCloud had a hiccup (there was no outage reported at https://www.apple.com/support/systemstatus/), or is there something that I can do to prevent this from happening?

    What happens when you try to send the message via icloud.com? It should be in the Drafts folder.
    KOT

  • Error by sending a mail

    Hi Everybody,
    Can someone tell me what i m doing wrong in the following code , to send email:
    REPORT  ZTESTADEL2.
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF ty_pa0001,
              pernr TYPE persno,
              kostl TYPE KOSTL,
           END OF ty_pa0001.
    DATA: it_PA0001   TYPE STANDARD TABLE OF PA0001,
          wa_pa0001   TYPE ty_pa0001.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    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,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT pernr KOSTL
        FROM pa0001
        INTO CORRESPONDING FIELDS OF TABLE it_pa0001.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
            INTO it_attach SEPARATED BY ';'.
    CONCATENATE con_cret it_attach  INTO it_attach.
    APPEND  it_attach.
      LOOP AT it_pa0001 INTO wa_pa0001.
        CONCATENATE wa_pa0001-pernr wa_pa0001-kostl
               INTO it_attach SEPARATED BY ';'.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_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.
      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[] = pit_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.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.                    "
    The problem is that the FM 'SO_DOCUMENT_SEND_API1' returns sy-subrc = 2 ?
    it_attach = 279 rows .
    regards,

    what this means :
    FM SO_DOCUMENT_SEND_API1 gives the exception document_not_sent (sy-subrc = 2) ?

  • Error while sending a mail with pdf attachment

    Hai
    I am sending mail with an attachment of PDF document. While sending I am getting
    javax.activation.UnsupportedDataTypeException: application/pdf
    This is my code
    public static void setByteArrayAsAttachment(Message msg, byte[] attach)
    throws MessagingException {
    MimeBodyPart p1 = new MimeBodyPart();
    ByteArrayDataSource byteStr = new ByteArrayDataSource(attach,"application/pdf");
    p1.setContent(byteStr,"application/pdf");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    msg.setContent(mp);
    Can one one help me on this...
    Thanks
    Jithesh PM

    Change
    p1.setContent(byteStr,"application/pdf");
    to
    p1.setDataHandler(new DataHandler(byteStr));

  • Started having "smtp timeout error" when sending e-mail, after installing Thunderbird update on 1.4.15 .How to undo the update?

    Thank You!

    has you anti virus vendor sent their update yet to fix the problem?
    If not, turn off outgoing email scanning in your anti virus program.

Maybe you are looking for

  • Variable type Hierarchy, how to get the value from another similar variable

    Hi. We have created a variable, type hierarchy (using ORGEH hierarchy in HR based on 0ORGUNIT). Let's call this VAR1. We want to fill this with an User Exit, beacuse we want VAR1 to have the value from another variable, VAR2, which is also type hiera

  • Is it possible to install Lightroom 2.0 onto a Mac Book Pro running 10.8.5?

    I have a disc for LR 2.0 and I am trying to install it onto my Mac Book Pro running 10.8.5.   I have tried three times and the installation has failed with a message saying contact the manufacturer. I have managed to install Lightroom 1.0 from disc a

  • Applet function call from javascript

    Hi, I'm haveing a problem with accesing applet's functions from Javascript in Mozilla. IE works fine but in Mozilla I get the following error: Error: document.applets[0] has no properties The code used is: document.applets[0].test(); The applet has t

  • IPod won't display

    My iPod is connected to my powerbook g4 via USB - into the back of the laptop. The iPod is recharging - however it does not appear on either my desktop or iTunes. does anyone know how to rectify this - and what causes it?

  • Nedd Help with Sharing NAS box on Mac and XP machines

    Hello, I'm new to Macs and having a lot of trouble. I bought a Bason NAS box and hooked it up to my network of two XP machines and my Mac (OSX 10.4). The XP machines see it fine and I can access the box from them. The Mac shows the NAS with it's name