Error in Campaign while sending e-mail

Hi All,
I have created the mktg and campaign scenerio and assigning the target group and in segment I hace done segment group to channel. But while sending the mail to the target group for checking the status is having error. Even if I cheked in Tcode SOST the status also coming in error. Can anybody answer me this.
Second thing I want to maintain budget plan for this. And also I want to create lead from this campaign and to do campaign execution. Any body is having doc can u send it to my mail id at
[email protected]    or
[email protected]
Thanx in Advance
Saravana

Hi Saravana,
For your first question:e-mails ending in error -
1. Check the communication method used for sending e-mails in the channel settings in your campaign.
2. Check the scot configuration as whether the host assigned to the SMTP service is public i.e whether can you send the e-mails outside your network.To test this you can do channel test for the e-mail form you created for campaign. If the e-mails are not going out then check with your basis or system admin for the correct ip.
3. Check what is the error on sost.
4. Finally check the address in the BP for e-mail.
Reward points if helpful
Shridhar

Similar Messages

  • I'm getting an exception while sending a mail . .

    i'm get an excpetion while sending a mail, example i'm getting
    this particular error
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
    at MailTest.<init>(MailTest.java:25)
    at MailTest.main(MailTest.java:42)
    this is my code
    pls help me out
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class MailTest
         String mailHost = "mail.business-functions.com";
         String to = "[email protected]";
         String from = "[email protected]";
         String subject = "This is Test Mail Thru Java Mail API";
         String body = "This is Test Mail to check whether the Java Mail APi is Working or not. This is prototype developed by Snehal K gandhi of Business Functions Software Solutions Pvt Ltd.";
         Provider provider;
         public MailTest()
              try
                   Properties props = System.getProperties();
                   props.put("mail.smtp.host", mailHost);
                   Session session = Session.getInstance(props,null);
                   Message message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                   message.setRecipients(Message.RecipientType.TO,new InternetAddress[]{new InternetAddress(to)});
                   message.setSubject(subject);
                   message.setContent(body, "text/plain");
                   Transport.send(message);
                   System.out.println("Mail has been Sent");
              catch(MessagingException me)
                   System.out.println("2. Error While Sending the Mail and the exception is : " + me.toString());
         public static void main(String arg[])
              new MailTest();
    ***********************************************************************/

    <sigh>
    You need activation.jar in your classpath and or
    import javax.activation.*;
    See the JavaMail Readme for more info.
    If you haven't got JAF get it here
    http://java.sun.com/products/javabeans/glasgow/jaf.html
    Rgds,
    SH

  • Blind copy while sending a mail...

    Hi Friends,
    How to set a recipient under the blind copy recipient list (BCC) while sending a mail using the function module SO_DOCUMENT_SEND_API1. I have checked the flag <b>blind_copy</b> but not seeing that recipient under the bcc list. Some body please help in this.
    Thanx in advance.
    Ram

    See the example program :
    TABLES: SOLI.
       Data Declarations
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: SAPID     RADIOBUTTON GROUP ADDR,
                EMAIL_ID  RADIOBUTTON GROUP ADDR.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS: ID  FOR SOLI-LINE NO INTERVALS.
    SELECT-OPTIONS: CC  FOR SOLI-LINE NO INTERVALS.
    SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
    *PARAMETERS:     SENDER LIKE SOUD-USRNAM.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
    PARAMETERS: SUB_LINE(60) TYPE C.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
    SELECT-OPTIONS:  TEXT1 FOR SOLI-LINE NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK B4.
    SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT-009.
    SELECTION-SCREEN BEGIN OF LINE.
    parameters: P_ATTACH as checkbox.
    selection-screen comment 3(30) text-010.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B5.
    DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
          SUBJECT_LINE LIKE SOOD1-OBJDES.
       Start of program processing
    START-OF-SELECTION.
    Get the Body of the Message from the selection screen or from
    calling program
      LOOP AT TEXT1.
        MOVE   TEXT1-LOW TO MAIL_CONTENT-LINE.
        APPEND MAIL_CONTENT.
      ENDLOOP.
    Subject of the Message
      MOVE  SUB_LINE TO SUBJECT_LINE.
    call a routine to send the workflow message
      PERFORM SEND_EMAIL
              TABLES MAIL_CONTENT
              USING  SUBJECT_LINE.
    *&      Form  SEND_EMAIL
    Send Workflow message
    FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
                    USING  TITLE   LIKE SOOD-OBJDES.
      DATA: RECEIVERS LIKE SOOS1 OCCURS 0 WITH HEADER LINE,
            TSOOD1 LIKE SOOD1,
            PACKING_LIST LIKE SOXPL OCCURS 0 WITH HEADER LINE,
            OBJCONT1 LIKE MAIL_CONTENT OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF AT_HEADER OCCURS 1.
              INCLUDE STRUCTURE SOLI.
      DATA: END OF AT_HEADER.
      CLEAR: TSOOD1,
             RECEIVERS.
      REFRESH RECEIVERS.
      MOVE:  SY-LANGU       TO TSOOD1-OBJLA,
             'Email Notice' TO TSOOD1-OBJNAM,
             'C'            TO TSOOD1-OBJSNS,
             TITLE          TO TSOOD1-OBJDES.
           'SCHIAVONIR'   TO TSOOD1-OWNNAM.
    loop through each ID and move them to recipient table
      LOOP AT ID.
        TRANSLATE ID-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 ID-LOW      TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                ID-LOW       TO RECEIVERS-RECEXTNAM.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    loop through each CC and move them to recipient table
      LOOP AT CC.
        TRANSLATE CC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 CC-LOW      TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX,
                'X'          TO RECEIVERS-SNDCP.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                CC-LOW       TO RECEIVERS-RECEXTNAM,
                'X'          TO RECEIVERS-SNDCP.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
    loop through each BCC and move them to recipient table
      LOOP AT BCC.
        TRANSLATE BCC-LOW TO UPPER CASE.
        IF SAPID = 'X'.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                ' '          TO RECEIVERS-RECESC,
                 BCC-LOW     TO RECEIVERS-RECNAM,
                'X'          TO RECEIVERS-SNDEX,
                'X'          TO RECEIVERS-SNDBC.
        ELSE.
          MOVE: SY-DATUM     TO RECEIVERS-RCDAT,
                SY-UZEIT     TO RECEIVERS-RCTIM,
                'U'          TO RECEIVERS-RECESC,
                'U-'         TO RECEIVERS-RECNAM,
                BCC-LOW      TO RECEIVERS-RECEXTNAM,
                'X'          TO RECEIVERS-SNDBC.
        ENDIF.
        APPEND RECEIVERS.
        CLEAR RECEIVERS.
      ENDLOOP.
      AT_HEADER = SY-DATUM.
      APPEND AT_HEADER.
      AT_HEADER = SY-UZEIT.
      APPEND AT_HEADER.
    IF SENDER EQ SPACE.
       SENDER = SY-UNAME.
    ENDIF.
      IF P_ATTACH EQ 'X'.
        PACKING_LIST-HEAD_START = 1.
        PACKING_LIST-HEAD_NUM   = 2.
        PACKING_LIST-BODY_START = 1.
        PACKING_LIST-BODY_NUM   = 9999.
        PACKING_LIST-FILE_EXT   = 'TXT'.
        APPEND PACKING_LIST.
        CLEAR  PACKING_LIST.
        APPEND LINES OF OBJCONT TO OBJCONT1.
        REFRESH OBJCONT.
      ENDIF.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                OBJECT_HD_CHANGE           = TSOOD1
                OBJECT_TYPE                = 'RAW'
           TABLES
                OBJCONT                    = OBJCONT
                RECEIVERS                  = RECEIVERS
                ATT_HEAD                   = AT_HEADER
                ATT_CONT                   = OBJCONT1
                PACKING_LIST               = PACKING_LIST
           EXCEPTIONS
                ACTIVE_USER_NOT_EXIST      = 1
                COMMUNICATION_FAILURE      = 2
                COMPONENT_NOT_AVAILABLE    = 3
                FOLDER_NOT_EXIST           = 4
                FOLDER_NO_AUTHORIZATION    = 5
                FORWARDER_NOT_EXIST        = 6
                NOTE_NOT_EXIST             = 7
                OBJECT_NOT_EXIST           = 8
                OBJECT_NOT_SENT            = 9
                OBJECT_NO_AUTHORIZATION    = 10
                OBJECT_TYPE_NOT_EXIST      = 11
                OPERATION_NO_AUTHORIZATION = 12
                OWNER_NOT_EXIST            = 13
                PARAMETER_ERROR            = 14
                SUBSTITUTE_NOT_ACTIVE      = 15
                SUBSTITUTE_NOT_DEFINED     = 16
                SYSTEM_FAILURE             = 17
                TOO_MUCH_RECEIVERS         = 18
                USER_NOT_EXIST             = 19
                X_ERROR                    = 20
                OTHERS                     = 21.
    ENDFORM.                               " SEND_EMAIL
    text elements
    BCC     Blind CC
    CC     Copy to
    EMAIL_ID     Email ID
    ID     ?...
    P_ATTACH     Send as Attachment?
    SAPID     SAP ID
    SUB_LINE     Subject
    TEXT1     Message

  • 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

  • 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 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));

  • Either there is no default mail client or the current mail client cannot fulfill the messaging request" error message when you send e-mail from Office 2010 in Outlook

    Hi,
    If save and send as attachment used in MS Office 2010 then outlook 2010 displays error "Either
    there is no default mail client of the current mail client cannot fulfill the messaging request-----error Outlook 2010"
    Windows 7 32 bit Enterprise edition and Offoce Professional plus 2010 32 bit is installed in the machine.
    I have followed the below troubleshooting steps but still getting the same error.
    Method 1:
    Followed the  Microsoft fix
    http://support.microsoft.com/kb/813745
    1. On the Windows taskbar, click
    Start > Run.
    2. In the Open box, type the following text:
    3. regedit
    4. Press Enter.
    5. Go to the following registry key:
    6. HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail
    7. In the right pane, right-click
    the following registry value:
    8. PreFirstRun
    9. Click Delete
    10. Click Start, and then click Run.
    11. In the Open box, type regedit, and then pressENTER.
    12. InRegistry Editor, locate the followingsubkey in the registry:
    13. HKEY_LOCAL_MACHINE\Software\Clients\Mail\Microsoft Outlook
    14. Select thesubkey, and then pressDELETE.
    15. Click
    Yes.
    Method 2:
    Repaired Office
    Method 3:
    fixmapi.exe. Mapi32.dll
    Method 4:
    Created the below registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Offlce\15.0\Outlook
    Create the following String value if it does not exist: Bitness Set the String value for Bitness to the following if it is not already set to x86
    Method 5:
    Compared the installed applications
    Uninstalled the below program :Microsfot Visuall C++ 2008 Redistributable - x86 - KB2467175" and installed "Microsfot Visuall C++ 2008 Redistributable - x86  - 9.0.21022"
    Please help to solve the issue.
    Regards,
    Boopathi S

    Hi,
    Do you mean Send as Attachment button under File>Save & Send>Sending Using E-mail
    in Office applications, like Excel or Word?
    Is this an issue that come up recently? Have you ever made any changes to your system?
    If you have installed multiple e-mail programs on the same computer, please try to make Outlook the default mail client and then try again:
    http://office.microsoft.com/en-us/outlook-help/make-outlook-the-default-program-for-email-messages-contacts-and-calendar-HP010355552.aspx
    http://support.microsoft.com/kb/223877
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Urgent : - Some Error in code while sending attachment thru SAP

    hiii,
    i have posted a problem in the following thread.
    How to send PDF file thru SAP
    at some extent Surpreet is able to solve  the problem, but now we r stuck to this that email is coming with attachment but not the exact that i am attching and trying to send the mail.
    can any one check this code and rectify if any error is there.
    REPORT YBALTEST.
    DATA: gd_cnt TYPE i,
    gd_sent_all(1) TYPE c,
    gd_doc_data LIKE sodocchgi1,
    gd_error TYPE sy-subrc.
    DATA: it_message LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    it_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    it_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    * Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0,
    row(255).
    DATA: END OF it_pdf_output.
    START-OF-SELECTION.
    perform send_email_message .
    *& Form SEND_EMAIL_MESSAGE
    * Send email message
    FORM send_email_message.
    DATA: tab_lines LIKE SY-TABIX.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'C:test.pdf'
    filetype = 'BIN'
    TABLES
    data_tab = it_pdf_output .
    * Populate the subject/generic message attributes
    concatenate 'Attached is the '
    ' are waiting for.' into it_message.
    append it_message.
    DESCRIBE TABLE it_message LINES tab_lines.
    READ TABLE it_message INDEX tab_lines.
    gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
    gd_doc_data-obj_langu = sy-langu.
    gd_doc_data-obj_name = 'SENDFILE'.
    gd_doc_data-obj_descr = 'Attachement'.
    gd_doc_data-sensitivty = 'O'.
    describe table it_pdf_output lines tab_lines.
    * Describe the body of the message
    CLEAR it_packing_list-transf_bin.
    it_packing_list-head_start = 1.
    it_packing_list-head_num = 0.
    it_packing_list-body_start = 1.
    it_packing_list-doc_type = 'RAW'.
    it_packing_list-body_num = tab_lines.
    APPEND it_packing_list.
    describe table it_pdf_output lines tab_lines.
    CLEAR it_packing_list.
    it_packing_list-transf_bin = 'X'.
    it_packing_list-head_start = 1.
    it_packing_list-head_num = 1.
    it_packing_list-body_start = 1.
    it_packing_list-doc_type = 'RAW'.
    it_packing_list-body_num = tab_lines.
    it_packing_list-doc_size = tab_lines * 255.
    it_packing_list-OBJ_DESCR = ' object '.
    it_packing_list-obj_name = 'MAIL'.
    APPEND it_packing_list.
    it_receivers-receiver = '[email protected]'.
    it_receivers-rec_type = 'U'.
    it_receivers-com_type = 'INT'.
    APPEND it_receivers .
    * Call the FM to post the message to SAPMAIL
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = gd_doc_data
    * put_in_outbox = 'X'
    commit_work = 'X'
    * IMPORTING
    * sent_to_all = gd_sent_all
    TABLES
    packing_list = it_packing_list
    contents_txt = it_message
    contents_bin = it_pdf_output
    receivers = it_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.
    ENDFORM. " SEND_EMAIL_MESSAGE
    thanx
    abhishek suppal

    just unreadable
    like this
    €¥ä™„ã„ã˜®â”î¢íà¨ãˆ±ãŒ¸ã€ æ¼ æ©¢ã° â¼¼æ¥Œæ•®ç‰¡ç©©æ‘¥ã„ ä°¯ãŒ ã”²ã˜²â¼¶âãˆ±ãœ¸ä”¯ã ã¤·ã´ä¸¯ãˆ â¼¹â”ã¤²ã”¹ã€´ä ¯å¬ ã„ ã˜µâ€·ãˆ¹å´¶ã¸¾æ”æ‘®æ‰¯àµªâ€ â€ â€ â€ â€ à¨ç‰¸æ™¥à¨ãˆ±ãŒ¸ã˜ à´±ã€Šã€°ã€°ã€°ã„°â€¶ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ°ã¤¶â€¹ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ°ãŒ¸â€·ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ãœ±â€³ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ãŒ³â€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ã µâ€°ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ã„¶â€¸ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ã€¸â€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ°ã ¸â€°ã€°ã€°â€°àµ®ã€Šã€°ã€°ã˜°ã”µâ€±ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ´ãµâ€¹ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ´ãˆ¶â€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ´ã€·â€³ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ´ã˜¸â€¶ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ´ãˆ¹â€°ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ´ã °â€´ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ´ãŒ±â€¸ã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ´ã³â€µã€°ã€°â€°àµ®ã€Šã€°ã€°ãŒ´ã„µâ€¸ã€°ã€°â€°àµ®
    《〰〰㌴㜵′〰〰‰൮《〰〰㌴㐷‸〰〰‰൮《〰〰㌴㐹‵〰〰‰൮《〰〰㐴〱‶〰〰‰൮《〰〰㐴㘱‰〰〰‰൮《〰〰㐴㌳‶〰〰‰൮《〰〰㐴㌴‹〰〰‰൮《〰〰㐴㤴′〰〰‰൮《〰〰㐴㤵‴〰〰‰൮《〰〰㐴㌶‶〰〰‰൮《〰〰㐴㘷‴〰〰‰൮《〰〰㐴ㄸ‸〰〰‰൮《〰〰㔴㈰‴〰〰‰൮《〰〰㔴㔲‰〰〰‰൮《〰〰㔴㠳‶〰〰‰൮《〰〰㔴㐴‰〰〰‰൮《〰〰㔴㜵‷〰〰‰൮《〰〰㔴㌶‱〰〰‰൮《〰〰㔴㠶‵〰〰‰൮《〰〰㔴㌷‹〰〰‰൮《〰〰㔴〹‷〰〰‰൮《〰〰㔴㘹‱〰〰‰൮《〰〰㘴〲‸〰〰‰൮《〰〰㘴㘲′〰〰‰൮《〰〰㘴〵‷〰〰‰൮《〰〰㘴㘵
    â€±ã€°ã€°â€°àµ®ã€Šã€°ã€°ã˜´ãŒ·â€¶ã€°ã€°â€°àµ®ã€Šã€°ã€°ã˜´ã¤·â€°ã€°ã€°â€°àµ®ã€Šã€°ã€°ã˜´ã˜¹â€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã„°â€¶ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ãœ°â€°ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ãˆ±â€´ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã ²â€¸ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã³â€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ãœ´â€¸ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ãŒµâ€²ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ãŒ·â€·ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã¤·â€±ã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã¸â€µã€°ã€°â€°àµ®ã€Šã€°ã€°ãœ´ã¤¸â€¹ã€°ã€°â€°àµ®ã€Šã€°ã€°ãˆ°ã¤´â€³ã€°ã€°â€°àµ®ã€Šã€°ã€°ã„°ã˜µâ€·ã€°ã€°â€°àµ®çŠæ…²æ±©ç‰¥à¨ã°¼åŒ¯ç©©â¥ãŒ±ã´å€¯æ•²â¶ã¤²ã”¹ãœ²å ¯æ•’å¦æµ´ãˆ ã¤´â¼³æ½’ç‘¯ã„ ã ²â€µâ€°â½’æ¹…ç‰£ç¹â´ãˆ±ã¸ã€ åˆ ä¤¯æ™®â¯ã˜²â€³â€°â½’ä‘‰ã±›ã‰†ã„·ã€µã„±ãˆ²ã†ä•‚ä‘ƒä‰„ãœµä„³äŒ¸ãˆ¹ã„°ãˆ±ä˜±ã°¾ã”°ã¤°äŒ±ã…ãäŒ¹ãœ³äˆ´ä‰ã™‚ä´äŒµãœ·ä‘‚ãä™å´¾ã¸¾à¨ç‘³ç‰¡ç¡´æ•²àµ¦ã€Š
    à¨â”¥ä½…àµ†â€Šâ€ â€ â€ â€ â€ â€ â€ â€ â€ â€ â€ â€ à´ ã„Šã³â€³â€°æ‰¯ã±ªâ¼¼æ•Œæ®æ¡´ã  ã„²äŒ¯ã„ ãˆ³â¼·æ¥†ç‘¬ç‰¥ä˜¯æ…¬æ•´æ•„æ½£æ•¤ä¤¯ã„ ã´â¼²âŒãŒ±ã„±ä¼¯ã„ ã¤²â¼µâ“ã”¹ã¸¶çŒ¾ç‰´æ…¥àµ#풜鷾姐å‘)Ὕ됑盿##Ἵ슂Ⓑꖓ⎇↦⮍憺஌펙#ëŸ¼ë´ ä·ä¦“îŒˆë½‰ìš°Ø‰æ‚©ë¶£èµ¤èŒ¾é™à·å‡‡á®€à§ªê™«é¢ë‘„åª¸ì¯¨ä¶”â£‚î¡ä”텆䓗鿦콛æžáŠé®½î‹™äŠæŸ¾ï‰ä˜šî ‚ã¥ªæ±£ï…¯ç±½é¡ƒç¨•âªˆä»ê‰ç„“ï·–ä¤˜à³®äŸœé§‚ãƒè©ä ƒæ¡¸î„¦â›³îºç©·ë†¿äŠ¹êŒêºž×¥æ£êŠ½îºŽ#絥쇒뀁劒혣긤㏬䮧䉏㕴箨䔈鲝㟆ꃬ㮁層#個顃æŽå¯¶íž£ä–•à£ªå£ƒä˜â¬ç®²é¼¨í†äœ½é´”ïš·ï‹éƒ¶ì‹¥çŒ‘ë°‰ë°´â‚‡à¹¸é±¤ä‡é®‹æ®¢é”´ã€Šë±ä•»ï±ªÚ„ì·“ç”›ëŠ¢æ¿ á¼žå·»ë€¸âšë¯‡áµ¢æŠî€â¢®ï¥ì£¦î’ë¡¹ê’¼æ¾ é¢¹å‚‹äªè¨¹è‹ê·Žä‰½ì‘Äâ¤é»—î²±â‰æš£ë²¨è™„凾#辍ﮔ
    껆펽㥆⽛䆺㬸睲讀㤓꒜è
    regards
    Message was edited by: Surpreet Singh Bal

  • Problem  while sending the mail from sap

    Hi experts,
                     I am facing some problem while sending mail from sap to external mail.
    this is th code i am using but it is not working. plz check and tell me.
    REPORT  ZMAIL_DEMO.
    data: maildata type sodocchgi1.
    data: mailtxt type table of solisti1 with header line.
    data: mailrec type table of somlrec90 with header line.
    start-of-selection.
    break-point.
    clear: maildata, mailtxt, mailrec.
    refresh: mailtxt, mailrec.
    maildata-obj_name = 'TEST'.
    maildata-obj_descr = 'Test'.
    maildata-obj_langu = sy-langu.
    mailtxt-line = 'This is a test'.
    append mailtxt.
    mailrec-receiver = 'SOME MAIL ID'.
    mailrec-rec_type = 'U'.
    append mailrec.
    call function 'SO_NEW_DOCUMENT_SEND_API1'
    exporting
    document_data = maildata
    document_type = 'RAW'
    put_in_outbox = '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.   "( did not receive any mail) *
    write : 'mail sent'.
    endif.

    Hi,
    Please check with the following code.
    TABLES: KNA1.
    data for send function
    DATA DOC_DATA  LIKE SODOCCHGI1.
    DATA OBJECT_ID LIKE SOODK.
    DATA OBJCONT   LIKE SOLI OCCURS 10 WITH HEADER LINE.
    DATA RECEIVER  LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.
    SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.
      WRITE:/ KNA1-KUNNR, KNA1-ANRED.
    send data internal table
      CONCATENATE KNA1-KUNNR KNA1-ANRED
                             INTO OBJCONT-LINE SEPARATED BY SPACE.
      APPEND OBJCONT.
    ENDSELECT.
    insert receiver (sap name)
      REFRESH RECEIVER.
      CLEAR RECEIVER.
      MOVE: 'any_email'_ TO RECEIVER-RECEIVER,                " SY-UNAME
            'X'      TO RECEIVER-EXPRESS,
            'U'      TO RECEIVER-REC_TYPE.
      APPEND RECEIVER.
    insert mail description
      WRITE 'Sending a mail through abap'
                     TO DOC_DATA-OBJ_DESCR.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              DOCUMENT_DATA              = DOC_DATA
         IMPORTING
              NEW_OBJECT_ID              = OBJECT_ID
         TABLES
              OBJECT_CONTENT             = OBJCONT
              RECEIVERS                  = RECEIVER
         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.

  • Error when trying to send e-mail: javax.mail.MessagingException: can't dete

    Any help on the below error would be appreciated?
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: can't determine local email address
    at javax.mail.Transport.send0(Transport.java:218)
    at javax.mail.Transport.send(Transport.java:80)
    at com.rightworks.maildispatcher.MailDispatcher$SenderThread.sendMessage
    (MailDispatcher.java, Compiled Code)
    at com.rightworks.maildispatcher.MailDispatcher$SenderThread.run(MailDis
    patcher.java:536)
    Cannot send mail file s1io.d.xml : Sending failed;
    nested exception is:
    javax.mail.MessagingException: can't determine local email address

    Appears to be related to specifing the mail.from input.
    Works now.

  • Campaign automation sender e-mail

    hi experts,
    I have done the following,
    In the CA UI page,
    1) under the <i>Channels</i> tab, I select Channel as E-mail but as for the "<b><i>Sender E-mail</i></b>"  field, the number of words i want to type in seem to be limited, thus resulting in me not being able to type in the e-mail address for the sender. Why is this so?
    2) Let's say the Campaign Element here is for "Survey Registration Mail", how will i define the TGs for it? I am supposing that it is supposed to be done by the client themselves? am i right?

    Hi Noobie,
    The sender email address has to be maintained at
    IMGmp and cmpersonalized mail--maintain sender email address, here you to maintain the sender address and enter in the channel tab, then it will take full email address of the sender.
    You no need to define TG separetly for survey registation mail, according to ur client requirement, who are the customer they want to contact, create them as TG, and assign it to the particular campaign element where your survery registration mail is attached.
    once after G0-Live of the project, TG are created by end users only depending on their requirment.
    Regards
    Chandramohan
    Reward points if it helps......

  • Problem while sending a mail with smtp and ssl

    Hi all,
    I am new to java mail . I have downloaded one java program to send the mail. I have configured smt and port address.And my System firewall is also in off mode
    Still i am unable to send the mail
    The following code is my program import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.URLName;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import com.sun.mail.smtp.SMTPSSLTransport;
      To use this program, change values for the following three constants,
        SMTP_HOST_NAME -- Has your SMTP Host Name
        SMTP_AUTH_USER -- Has your SMTP Authentication UserName
        SMTP_AUTH_PWD  -- Has your SMTP Authentication Password
      Next change values for fields
      emailMsgTxt  -- Message Text for the Email
      emailSubjectTxt  -- Subject for email
      emailFromAddress -- Email Address whose name will appears as "from" address
      Next change value for "emailList".
      This String array has List of all Email Addresses to Email Email needs to be sent to.
      Next to run the program, execute it as follows,
      SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
    public class SendMailUsingAuthentication
    //private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
         private static final String SMTP_HOST_NAME = "smtp.gmail.com";
      private static final String SMTP_AUTH_USER = "admijn.ramd";
      private static final String SMTP_AUTH_PWD  = "hairamu";
      private static final int SMTP_PORT  = 465;
      private static final String emailMsgTxt      = "Online Order Confirmation Message. Also include the Tracking Number.";
      private static final String emailSubjectTxt  = "Order Confirmation Subject";
      private static final String emailFromAddress = "[email protected]";
      // Add List of Email address to who email needs to be sent to
      private static final String[] emailList = {"[email protected]", "[email protected]"};
      public static void main(String args[]) throws Exception
        SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
        smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
      public void postMail( String recipients[ ], String subject,
                                String message , String from)
           try{
        boolean debug = false;
         //Set the host smtp address
    //  Set the host smtp address
         Properties props = new Properties();
         props.put("mail.transport.protocol", "smtp");
         props.put("mail.smtp.port", SMTP_PORT);
         props.put("mail.smtp.starttls.enable","true");
         props.put("mail.smtp.host", SMTP_HOST_NAME);
         props.put("mail.smtp.auth", "true");
          props.put("mail.smtp.socketFactory.port", SMTP_PORT);
         props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
          props.put("mail.smtp.socketFactory.fallback", "false");
          SecurityManager security = System.getSecurityManager();
         Authenticator auth = new SMTPAuthenticator();
         Session session = Session.getDefaultInstance(props, auth);
         session.setDebug(debug);
         // create a message
         Message msg = new MimeMessage(session);
         // set the from and to address
         InternetAddress addressFrom = new InternetAddress(from);
         msg.setFrom(addressFrom);
         InternetAddress[] addressTo = new InternetAddress[recipients.length];
         for (int i = 0; i < recipients.length; i++) {
              addressTo[i] = new InternetAddress(recipients);
         msg.setRecipients(Message.RecipientType.TO, addressTo);
         // Setting the Subject and Content Type
         msg.setText(message);
         msg.setSubject(subject);
         msg.setContent(message, "text/plain");
         Transport.send(msg);
         }catch (MessagingException e) {
              // TODO: handle exception
              e.printStackTrace();
    * SimpleAuthenticator is used to do simple authentication
    * when the SMTP server requires it.
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication()
         try{
    String username = SMTP_AUTH_USER;
    String password = SMTP_AUTH_PWD;
    System.out.println("username "+ username+" Password"+password);
    return new PasswordAuthentication(username, password);
         }catch (Exception e) {
         return null;
    And i am getting the following exceptions
    javax.mail.MessagingException: Exception reading response;
      nested exception is:
         javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611)
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
         at javax.mail.Service.connect(Service.java:310)
         at javax.mail.Service.connect(Service.java:169)
         at javax.mail.Service.connect(Service.java:118)
         at javax.mail.Transport.send0(Transport.java:188)
         at javax.mail.Transport.send(Transport.java:118)
         at com.FutureSoft.org.SendingMail.SendMailUsingAuthentication.postMail(SendMailUsingAuthentication.java:123)
         at com.FutureSoft.org.SendingMail.SendMailUsingAuthentication.main(SendMailUsingAuthentication.java:70)
    Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
         at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
         at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589)
         ... 9 more                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi neuro11
    the following code is for sending mail its is working fine in my system, just change the
    SMTP_AUTH_USER = "tina.numi"; with u r email user name
    SMTP_AUTH_PWD = "abdcde"; u r gmail password
    emailFromAddress = "[email protected]"; ur gmail addres
    emailList = {"[email protected]"}; receipient list .
    and u must sure that u r internet is on and firewall should be off . some times firewall restricts you to communicate with gmail port number
    Please make u r firewall off and source code is
    package com.FutureSoft.org.SendingMail;
    Some SMTP servers require a username and password authentication before you
    can use their Server for Sending mail. This is most common with couple
    of ISP's who provide SMTP Address to Send Mail.
    This Program gives any example on how to do SMTP Authentication
    (User and Password verification)
    This is a free source code and is provided as it is without any warranties and
    it can be used in any your code for free.
    Author : Sudhir Ancha
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.URLName;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import com.sun.mail.smtp.SMTPSSLTransport;
      To use this program, change values for the following three constants,
        SMTP_HOST_NAME -- Has your SMTP Host Name
        SMTP_AUTH_USER -- Has your SMTP Authentication UserName
        SMTP_AUTH_PWD  -- Has your SMTP Authentication Password
      Next change values for fields
      emailMsgTxt  -- Message Text for the Email
      emailSubjectTxt  -- Subject for email
      emailFromAddress -- Email Address whose name will appears as "from" address
      Next change value for "emailList".
      This String array has List of all Email Addresses to Email Email needs to be sent to.
      Next to run the program, execute it as follows,
      SendMailUsingAuthentication authProg = new SendMailUsingAuthentication();
    public class SendMailUsingAuthentication
    //private static final String SMTP_HOST_NAME = "smtp.mail.yahoo.com";
         private static final String SMTP_HOST_NAME = "smtp.gmail.com";
      private static final String SMTP_AUTH_USER = "tina.numi";// gmail username
      private static final String SMTP_AUTH_PWD  = "abdcde";// gmail password
      private static final int SMTP_PORT  = 465;
      private static final String emailMsgTxt      = "Online Order Confirmation Message. Also include the Tracking Number.";
      private static final String emailSubjectTxt  = "Order Confirmation Subject";
      private static final String emailFromAddress = "[email protected]";// gmail id
      // Add List of Email address to who email needs to be sent to
      private static final String[] emailList = {"[email protected]"};
      public static void main(String args[]) throws Exception
        SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
        smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress);
      public void postMail( String recipients[ ], String subject,
                                String message , String from)
           try{
        boolean debug = false;
         //Set the host smtp address
    //  Set the host smtp address
         Properties props = new Properties();
         props.put("mail.transport.protocol", "smtp");
         props.put("mail.smtp.port", SMTP_PORT);
         props.put("mail.smtp.starttls.enable","true");
         props.put("mail.smtp.host", SMTP_HOST_NAME);
         props.put("mail.smtp.auth", "true");
          props.put("mail.smtp.socketFactory.port", SMTP_PORT);
         props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
          props.put("mail.smtp.socketFactory.fallback", "false");
          SecurityManager security = System.getSecurityManager();
         Authenticator auth = new SMTPAuthenticator();
         Session session = Session.getInstance(props, auth);
         session.setDebug(debug);
         // create a message
         Message msg = new MimeMessage(session);
         // set the from and to address
         InternetAddress addressFrom = new InternetAddress(from);
         msg.setFrom(addressFrom);
         InternetAddress[] addressTo = new InternetAddress[recipients.length];
         for (int i = 0; i < recipients.length; i++) {
              addressTo[i] = new InternetAddress(recipients);
         msg.setRecipients(Message.RecipientType.TO, addressTo);
         // Setting the Subject and Content Type
         msg.setText(message);
         msg.setSubject(subject);
         msg.setContent(message, "text/plain");
         Transport t = session.getTransport("smtps");
         try {
              t.connect(SMTP_HOST_NAME, SMTP_AUTH_USER, SMTP_AUTH_PWD);
              t.sendMessage(msg, msg.getAllRecipients());
         catch(Exception e){}
         finally
              t.close();
         }catch (MessagingException e) {
              // TODO: handle exception
              e.printStackTrace();
    * SimpleAuthenticator is used to do simple authentication
    * when the SMTP server requires it.
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication()
         try{
    String username = SMTP_AUTH_USER;
    String password = SMTP_AUTH_PWD;
    System.out.println("username "+ username+" Password"+password);
    return new PasswordAuthentication(username, password);
         }catch (Exception e) {
         return null;
    try this . all the best

  • Error getting while sending the Mails using 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    Hi ALL,
       I HAVE THE REQUIREMENT AS SEND A REPORT AS A MAIL. IAM USING FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' WHILE EXECUTING ITS NOT SHOWING ANY ERROR. BUT IAM NOT GETTING ANY MAIL. I CHECKED IN 'SOST' TCODE. THERE I SEE A MESSAGE LIKE 'CANNOT PROCESS THE MSG TYPE IN SAP SYSTEM'. PLS TELL ME THE WHAT IS THE PROBLE.

    Hi
    Please dont write in Capital letters, it considered as shouting. Hope you are aware of the forum rules.
    You can check if you have made anything wrong in coding by referring wiki link.
    [Sending Mails |http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage]
    Regards
    Abhii

  • 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 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

Maybe you are looking for