File To Mail  - Error in sender CC

Hi All,
I am trying out a File to mail scenario following the Blog /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
I am getting the following error in the File Sender Comm Channel :
Mail: error occurred: com.sap.aii.af.mp.module.ModuleException caused by: com.sap.aii.messaging.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: java.io.IOException: no sender address specified
I could also see the payload is empty in the Receiver Mail CC
Now can anybody help getting me the mail ...
Thanks in advance

Hi Bhavesh,
I get a checkered flag in Moni ,
  But the response has only SOAP header and Body with out payload  , I Mail package is checked and base64 is selected ..
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--  Response
  -->
- <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">
  <Trace level="1" type="T">Party normalization: sender</Trace>
  <Trace level="1" type="T">Sender scheme external = XIParty</Trace>
  <Trace level="1" type="T">Sender agency external = http://sap.com/xi/XI</Trace>
  <Trace level="1" type="T">Sender party external =</Trace>
  <Trace level="1" type="T">Sender party normalized =</Trace>
  <Trace level="1" type="T">Party normalization: receiver</Trace>
  <Trace level="1" type="T">Receiver scheme external =</Trace>
  <Trace level="1" type="T">Receiver agency external =</Trace>
  <Trace level="1" type="T">Receiver party external =</Trace>
  <Trace level="1" type="T">Receiver party normalized =</Trace>
  <Trace level="1" type="B" name="CL_XMS_HTTP_HANDLER-HANDLE_REQUEST" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">XMB was called with URL /sap/xi/engine?type=entry</Trace>
  <Trace level="1" type="T">COMMIT is done by XMB !</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS" />
- <!--  ************************************
  -->
  <Trace level="1" type="B" name="CL_XMS_MAIN-SET_START_PIPELINE" />
- <!--  ************************************
  -->
  <Trace level="1" type="B" name="SXMBCONF-SXMB_GET_XMB_USE" />
  <Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV" />
  <Trace level="1" type="T">****************************************************</Trace>
  <Trace level="1" type="T">* *</Trace>
  <Trace level="1" type="T">* *</Trace>
  <Trace level="1" type="T">XMB entry processing</Trace>
  <Trace level="1" type="T">system-ID = XIL</Trace>
  <Trace level="1" type="T">client = 002</Trace>
  <Trace level="1" type="T">language = E</Trace>
  <Trace level="1" type="T">user = PIAFUSER</Trace>
  <Trace level="1" type="Timestamp">2006-09-14T09:48:04Z CET</Trace>
  <Trace level="1" type="T">* *</Trace>
  <Trace level="1" type="T">* *</Trace>
  <Trace level="1" type="T">****************************************************</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">Message-GUID = 1DC20B0043D611DBC937000D60D4EDB5</Trace>
  <Trace level="1" type="T">PLNAME = CENTRAL</Trace>
  <Trace level="1" type="T">QOS = EO</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_ASYNC" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">Get definition of external pipeline = CENTRAL</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
  <Trace level="1" type="T">Get definition of internal pipeline = SAP_CENTRAL</Trace>
  <Trace level="1" type="T">Queue name : XBTI0009</Trace>
  <Trace level="1" type="T">Generated prefixed queue name = XBTI0009</Trace>
  <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
  <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="T">Going to persist message</Trace>
  <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
  <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
  <Trace level="1" type="T">- Exit CALL_PIPELINE_ASYNC</Trace>
  <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
- <!--  ************************************
  -->
  <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
  <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
  <Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
  <Trace level="1" type="T">system-ID = XIL</Trace>
  <Trace level="1" type="T">client = 002</Trace>
  <Trace level="1" type="T">language = E</Trace>
  <Trace level="1" type="T">user = PIAFUSER</Trace>
  <Trace level="1" type="Timestamp">2006-09-14T09:48:04Z CET</Trace>
  <Trace level="1" type="T">----
</Trace>
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC">
  <Trace level="1" type="T">Get definition of external pipeline CENTRAL</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
  <Trace level="1" type="T">Corresponding internal pipeline SAP_CENTRAL</Trace>
- <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
- <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
  <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
  <Trace level="1" type="T">Cache Content is up to date</Trace>
  </Trace>
  </Trace>
  </Trace>
  </Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
- <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
- <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
  <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>
  <Trace level="1" type="T">Cache Content is up to date</Trace>
  </Trace>
  </Trace>
  </Trace>
  </Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
  <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT" />
- <!--  ************************************
  -->
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
  <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">number of receivers: 1</Trace>
  <Trace level="1" type="T">Single-receiver split case</Trace>
  <Trace level="1" type="T">Post-split internal queue name = XBTO3___0001</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="T">Persisting single message for post-split handling</Trace>
  <Trace level="1" type="T" />
  <Trace level="1" type="T">Going to persist message + call qRFC now...</Trace>
  <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
  <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
  <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
- <!--  ************************************
  -->
  <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
  <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
  <Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
  <Trace level="1" type="T">system-ID = XIL</Trace>
  <Trace level="1" type="T">client = 002</Trace>
  <Trace level="1" type="T">language = E</Trace>
  <Trace level="1" type="T">user = PIAFUSER</Trace>
  <Trace level="1" type="Timestamp">2006-09-14T09:48:04Z CET</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" />
- <!--  ************************************
  -->
  <Trace level="1" type="T">Get definition of external pipeline CENTRAL</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
  <Trace level="1" type="T">Corresponding internal pipeline SAP_CENTRAL</Trace>
  <Trace level="1" type="T">Start with pipeline element PLEL= 5EC3C53B4BB7B62DE10000000A1148F5</Trace>
- <Trace level="1" type="B" name="PLSRV_MAPPING_REQUEST">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
- <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV">
  <Trace level="1" type="T">Interface Mapping http://sap.com/xi/XI/Mail/30 GK_File2Mail_IM</Trace>
  </Trace>
  </Trace>
  </Trace>
  </Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
- <Trace level="1" type="B" name="PLSRV_OUTBOUND_BINDING">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
- <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
  <Trace level="1" type="B" name="CL_XMS_PLSRV_OUTBINDING-ENTER_PLSRV" />
  </Trace>
  </Trace>
  </Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
- <Trace level="1" type="B" name="PLSRV_CALL_ADAPTER">
  <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV" />
- <!--  ************************************
  -->
  <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
- <!--  ************************************
  -->
- <Trace level="1" type="B" name="CL_XMS_PLSRV_IE_ADAPTER-ENTER_PLSRV">
  <Trace level="1" type="B" name="CL_XMS_PLSRV_CALL_XMB-CALL_XMS_HTTP" />
  </Trace>
  </Trace>
  </Trace>
  </Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
  </Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="T">Async processing completed OK.</Trace>
  <Trace level="1" type="T">system-ID = XIL</Trace>
  <Trace level="1" type="T">client = 002</Trace>
  <Trace level="1" type="T">language = E</Trace>
  <Trace level="1" type="T">user = PIAFUSER</Trace>
  <Trace level="1" type="Timestamp">2006-09-14T09:48:05Z CET</Trace>
  <Trace level="1" type="T">----
</Trace>
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
- <!--  ************************************
  -->
  </SAP:Trace>

Similar Messages

  • Seeburger AS2 resent of files in state "Error on send, will be retried"

    Hi,
    I have a few AS2 files in state "Error on send, will be retried" in the Seeburger AS2 monitor, which does not seem to be sent.
    How can I trigger the files to be sent again or delete so we can resent the files from the backend.
    Daniel Graversen
    [Figaf|http://figaf.com]

    Hi,
    we have some messages in this status but none of them is displayed in the recovery monitor..
    Any other idea?
    Thank you,
    Peter

  • File to Mail error

    Hi,
      I am doing file to mail scenario. I got an error
    "failed to send mail: java.io.IOException: invalid content type for SOAP:
    TEXT/HTML"..
       How to solve.
    regards,
    Ansar.

    Hi Bhavesh,
       I done like that but still it is coming...
    This is the process of Communication channel
    2006-12-29 11:42:46 Success Mail: Receiver adapter entered with qos ExactlyOnce
    2006-12-29 11:42:46 Success Mail: calling the adpter for processing
    2006-12-29 11:42:46 Success Mail: call failed
    2006-12-29 11:42:46 Success Mail: sending a delivery error ack ...
    2006-12-29 11:42:46 Success Mail: sent a delivery error ack
    2006-12-29 11:42:46 Error Mail: error occured: java.io.IOException: invalid content type for SOAP: TEXT/HTML
    2006-12-29 11:42:46 Error Exception caught by adapter framework: Failed to call the endpoint
    2006-12-29 11:42:46 Error Delivery of the message to the application using connection AFW failed, due to: Failed to call the endpoint.
    2006-12-29 11:42:46 Success The message status set to WAIT.
    2006-12-29 11:42:46 Success The asynchronous message was successfully scheduled to be delivered at Fri Dec 29 11:47:46 GMT+05:30 2006.
    regards,
    Ansar.

  • E-mail error:  Cannot Send Mail:  The sender address was invalid

    I can receive e-mail but cannot send it. Everything goes to my outbox. I did not change any settings. Nothing has changed that I know of. For months I could send e-mail -- now I cannot. I even e-mailed myself, and it says the sender address is invalid. Can anyone help? Thanks!

    The "Recipient addresses are invalid" message is misleading.
    Most ISP's don't allow you to send email through their SMTP server unless you are A) on their network (e.g. connected via wi-fi to a cable connection provided by your ISP) or B) you authenticate to their SMTP server.
    On Blueyonder here in the UK (my ISP), you can send via their SMTP server from the iPhone over 3G as long as you authenticate to it. I setup my Mac mail to authenticate on outbound email sent via smtp.blueyonder.co.uk and it works fine. I then synced the mail settings to my iPhone and it works fine (although a little slow to send).
    Alternatively your cellular provider usually runs their own SMTP server to which you will also have to authenticate, and you can send through it. For the iPhone in the UK O2 are the exclusive provider, and they have the smtp.02.co.uk gateway.

  • File to SOAP,error in sender file adapter

    Hi,
    I am doing a scenario FILE to SOAP where In file adapter I am using Quality od service as Exactly once in order.I am getting the below error.It works fine when I use QOS=Exactly once.Not sure why,can you guys please help me.Can we really use QOS-EOIO for sender file adapter,where exacly do we use it.
    Thanks
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter  -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Edited by: guest xi on Apr 16, 2008 11:55 AM

    Hi,
    Thanks for your replies guys.I diid give the queue name ,I dont know what is causing the error.Now even QOS=EO which was working fine before is throwing an error.I am using the same file name for both
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter   -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • FTP to File scenario : Mail to be send on file transfer success

    Hi guys,
    I have a FTP Sender channel, which polls several files from a given folder. On the target system II have a FS Receiver channel, the scenario just transfer the files unchanged. What I want to achieve is to have a kind of email notification to specified recipient when the files are (being) transferred to the target system. Actually, I can put another Mail Receiver channel, but the mail will contain the payload files (XIPAYLOAD) - something that I would like to avoid - pure text notification is desired.
    Best Regards,
    Lalo

    Hi guys,
    Yep, I can send the email, but actually I am wondering how to avoid adding in the email the already read from the source FTP files, which are anyhow part of the payload. In Mail adapter settings, if I put XIALL, the whole envelope+payload will be put, in XIPAYLOAD - only the payload. What I want to achieve is to have only text mail without any attachments - is it possible ?
    BR,
    Lalo

  • How to attach a file to mail in iphone?

    what is the process involved in adding a file to mail which is send through iphone and how it is downloaded from it,pls any one help me..........

    its ok thanks for ur rply am not asking about how it is being send from iphone am asking how to send it from the
    mailcore framework which is added to iphone project whic h can be checked in the ios simulator.

  • Error While downloading the file A server Error has occurred, please try again later Downloading Yahoo mail Application Attachments  Trying to download My Photos and movie 3 items so i can delete them all

    I have icloud and a new iPhone5 ! They work good , took pictures and a few short movies, plugged in my phone to my iMac transfered Items to iPhoto then inported items to iMovie. when getting to know what i was doing i decided to delete pictures and movies i no longer wanted. when i looked for a few missing items i opend Finder and there some where buyt i had already trashed them and deleted the doubles. Still could not find missing pictures and movies 3 items and today after calling yahoo about a different complant with sending feed back for Yahoo mail Applications login . i opened up Attachments Not the Large Attachments just Attachments and there were the 3 items i had been hunting for to Trash and delete. the mail Attachments file does not have the Option to delet Files and photos and movies. When i tried to Download the 3 items a window shows up that says Error While Downloading the Files, A Server Error has occured, please Try Again later. nothing works how do i remove the Trapped photo and movie Blank Files and trash them?  Onece they get into my downloads i can do something with them as i understand.    That part of it kind of keeps me in Question also because why should i have to down load my own files of Attachments / Pictures and movies if they are comming from my iMac?    How much better is iLife11 then iPhoto08 and iMovie08 .  Thanks Greg

    Hello,
    Thank you for your post.
    This is a quick note to let you know that we are performing research on this issue.
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • Error while sending email to external mail - Urgent

    Hi All,
    I am getting error while sending email with attachement. The Error code is 02.
    I am not able to identify the error. bold Please help me in solving this problem.
    Is it anything wrong with the code or Any Configuration with SCOT/SOST.bold
    the code i am using is :
    REPORT YVR_F MESSAGE-ID XX .
    TABLES : EDIDC, EDIDS, EDPAR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS : P_STATUS LIKE EDIDC-STATUS DEFAULT '51'.
    SELECT-OPTIONS : S_DIRECT FOR EDIDC-DIRECT,
                     S_MESTYP FOR EDIDC-MESTYP,
                     S_CREDAT FOR EDIDC-CREDAT.
    SELECTION-SCREEN END OF BLOCK B1 .
    PARAMETER: P_EMAIL LIKE SOMLRECI1-RECEIVER,
               P_SENDER LIKE SOMLRECI1-RECEIVER no-display,
               P_DELSPL  AS CHECKBOX,
               P_ONLINE NO-DISPLAY.
    DATA : TB_EDIDC LIKE STANDARD TABLE OF EDIDC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_EDPAR LIKE STANDARD TABLE OF EDPAR INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_KNA1 LIKE STANDARD TABLE OF KNA1 INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_ADRC LIKE STANDARD TABLE OF ADRC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA: INT_PDF TYPE TABLE OF TLINE WITH HEADER LINE.
    DATA : BEGIN OF TB_ED OCCURS 0,
             SNDPRN LIKE EDIDC-SNDPRN,
             LOC    LIKE ADRC-BUILDING,
             DOCNUM LIKE EDIDC-DOCNUM,
             IDOCTP LIKE EDIDC-IDOCTP,
             MESTYP LIKE EDIDC-MESTYP,
             DIRECT LIKE EDIDC-DIRECT,
             CREDAT LIKE EDIDC-CREDAT,
             STATUS LIKE EDIDC-STATUS,
           END OF TB_ED.
    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.
    Job Runtime Parameters
    DATA: GD_EVENTID LIKE TBTCM-EVENTID,
          GD_EVENTPARM LIKE TBTCM-EVENTPARM,
          GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
          GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
          GD_JOBNAME LIKE TBTCM-JOBNAME,
          GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
          GD_ERROR    TYPE SY-SUBRC,
          GD_RECIEVER TYPE SY-SUBRC.
    DATA:  W_RECSIZE TYPE I,
           W_SPOOL_NR LIKE SY-SPONO.
          %_print LIKE pri_params.
    DATA: GD_SUBJECT   LIKE SODOCCHGI1-OBJ_DESCR,
          IT_MESS_BOD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          IT_MESS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          GD_SENDER_TYPE     LIKE SOEXTRECI1-ADR_TYP,
          GD_ATTACHMENT_DESC TYPE SO_OBJ_NAM,
          GD_ATTACHMENT_NAME TYPE SO_OBJ_DES.
    Spool to PDF conversions
    DATA: GD_SPOOL_NR LIKE TSP01-RQIDENT,
          GD_DESTINATION LIKE RLGRAP-FILENAME,
          GD_BYTECOUNT LIKE TST01-DSIZE,
          GD_BUFFER TYPE STRING.
    Binary store for PDF
    DATA: BEGIN OF IT_PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF IT_PDF_OUTPUT.
    DATA: GD_RECSIZE TYPE I.
    CONSTANTS: C_DEV LIKE  SY-SYSID VALUE 'DEV',
               C_NO(1)     TYPE C   VALUE ' ',
               C_DEVICE(4) TYPE C   VALUE 'LOCL'.
    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.
    DATA : MSTR_PRINT_PARMS LIKE PRI_PARAMS,
           MC_VALID,
           P_REPID LIKE SY-REPID,
           WF_ID  LIKE TSP01-RQIDENT,
           LOC_BYTECOUNT TYPE I.
    *start-of-selection.
    MSTR_PRINT_PARMS-PDEST = 'LOCL'.
    P_REPID = SY-REPID.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
        authority= ' '
       COPIES                       = '1'
       COVER_PAGE                   = SPACE
       DATA_SET                     = SPACE
       DEPARTMENT                   = SPACE
       DESTINATION                  = 'LP01'
       EXPIRATION                   = '1'
       IMMEDIATELY                  = 'X'
       LAYOUT                       = 'X_65_132'
       MODE                         = SPACE
       NEW_LIST_ID                  = 'X'
       NO_DIALOG                    = 'X'
       USER                         = SY-UNAME
    IMPORTING
       OUT_PARAMETERS               = MSTR_PRINT_PARMS
       VALID                        = MC_VALID
    EXCEPTIONS
       ARCHIVE_INFO_NOT_FOUND       = 1
       INVALID_PRINT_PARAMS         = 2
       INVALID_ARCHIVE_PARAMS       = 3
       OTHERS                       = 4.
         SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                          SPOOL PARAMETERS MSTR_PRINT_PARMS.
                          AND RETURN.
    NEW-PAGE PRINT ON NO DIALOG PARAMETERS
    MSTR_PRINT_PARMS.
    perform data.
    NEW-PAGE PRINT OFF. "This marks the end of the screen for which the
    *SPOOL NO WAS GENERATED.
    WF_ID = SY-SPONO.
    *converting spool to pdf
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
         EXPORTING
              SRC_SPOOLID              = WF_ID  "SPOOL NUMBER
              NO_DIALOG                = SPACE
              PDF_DESTINATION          = 'X'
         IMPORTING
              PDF_BYTECOUNT =
                 LOC_BYTECOUNT "NUMBER OF BYTES TRANSFERRED
         TABLES
              PDF                      = INT_PDF  "TABLE FOR PDF REPORT
         EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB     = 1
              ERR_NO_SPOOLJOB          = 2
              ERR_NO_PERMISSION        = 3
              ERR_CONV_NOT_POSSIBLE    = 4
              ERR_BAD_DESTDEVICE       = 5
              USER_CANCELLED           = 6
              ERR_SPOOLERROR           = 7
              ERR_TEMSEERROR           = 8
              ERR_BTCJOB_OPEN_FAILED   = 9
              ERR_BTCJOB_SUBMIT_FAILED = 10
              ERR_BTCJOB_CLOSE_FAILED  = 11
              OTHERS                   = 12.
    *CALL FUNCTION 'DOWNLOAD'
    *EXPORTING
    *bin_filesize = loc_bytecount "NO. OF BYTES
    *filename = 'C:/EMAILPDF.PDF'
    *filetype = 'BIN'
    **IMPORTING
    **act_filename = loc_filename
    *TABLES
    *data_tab = int_pdf.
    IF P_DELSPL EQ 'X'.
      PERFORM DELETE_SPOOL.
    ENDIF.
    Transfer the 132-long strings to 255-long strings
    LOOP AT INT_PDF.
      TRANSLATE INT_PDF USING ' ~'.
      CONCATENATE GD_BUFFER INT_PDF INTO GD_BUFFER.
    ENDLOOP.
    TRANSLATE GD_BUFFER USING '~ '.
    DO.
      IT_MESS_ATT = GD_BUFFER.
      APPEND IT_MESS_ATT.
      SHIFT GD_BUFFER LEFT BY 255 PLACES.
      IF GD_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    DESCRIBE TABLE IT_MESS_ATT LINES GD_RECSIZE.
    CHECK GD_RECSIZE > 0.
    PERFORM SENDMAIL USING P_EMAIL..
    *&      Form  sendmail
          text
    -->  p1        text
    <--  p2        text
    FORM SENDMAIL USING P_EMAIL.
      CHECK NOT ( P_EMAIL IS INITIAL ).
      REFRESH IT_MESS_BOD.
    Default subject matter
      GD_SUBJECT         = 'Subject'.
      GD_ATTACHMENT_DESC = 'IDOC LIST'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
    If no sender specified - default blank
      IF P_SENDER EQ SPACE.
        GD_SENDER_TYPE  = SPACE.
      ELSE.
        GD_SENDER_TYPE  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                   TABLES IT_MESS_BOD
                                          IT_MESS_ATT
                                    USING P_EMAIL
                                          'Document attachment'
                                          'PDF'
                                          GD_ATTACHMENT_NAME
                                          GD_ATTACHMENT_DESC
                                          P_SENDER
                                          GD_SENDER_TYPE
                                 CHANGING GD_ERROR
                                          GD_RECIEVER.
    ENDFORM.                    " sendmail
    *&      Form  DELETE_SPOOL
          text
    -->  p1        text
    <--  p2        text
    FORM DELETE_SPOOL.
      DATA: LD_SPOOL_NR TYPE TSP01_SP0R-RQID_CHAR.
      LD_SPOOL_NR = WF_ID.   "GD_SPOOL_NR.
      CHECK P_DELSPL <> C_NO.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                SPOOLID = LD_SPOOL_NR.
    ENDFORM.                    " DELETE_SPOOL
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
         -->P_IT_MESS_BOD  text
         -->P_IT_MESS_ATT  text
         -->P_P_EMAIL  text
         -->P_0846   text
         -->P_0847   text
         -->P_GD_ATTACHMENT_NAME  text
         -->P_GD_ATTACHMENT_DESC  text
         -->P_P_SENDER  text
         -->P_GD_SENDER_TYPE  text
         <--P_GD_ERROR  text
         <--P_GD_RECIEVER  text
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES   IT_MESSAGE
                                              IT_ATTACH
                                        USING P_EMAIL
                                              P_MTITLE
                                              P_FORMAT
                                              P_FILENAME
                                              P_ATTDESCRIPTION
                                              P_SENDER_ADDRESS
                                              P_SENDER_ADDRES_TYPE
                                     CHANGING P_ERROR
                                              P_RECIEVER.
      DATA: LD_ERROR    TYPE SY-SUBRC,
             LD_RECIEVER TYPE SY-SUBRC,
             LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
             LD_EMAIL LIKE  SOMLRECI1-RECEIVER,
             LD_FORMAT TYPE  SO_OBJ_TP ,
             LD_ATTDESCRIPTION TYPE  SO_OBJ_NAM ,
             LD_ATTFILENAME TYPE  SO_OBJ_DES ,
             LD_SENDER_ADDRESS LIKE  SOEXTRECI1-RECEIVER,
             LD_SENDER_ADDRESS_TYPE LIKE  SOEXTRECI1-ADR_TYP,
             LD_RECEIVER LIKE  SY-SUBRC.
      DATA:   T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
              T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
              T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
              T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
              T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
              W_CNT TYPE I,
              W_SENT_ALL(1) TYPE C,
              W_DOC_DATA LIKE SODOCCHGI1.
      LD_EMAIL   = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT              = P_FORMAT.
      LD_ATTDESCRIPTION      = P_ATTDESCRIPTION.
      LD_ATTFILENAME         = P_FILENAME.
      LD_SENDER_ADDRESS      = P_SENDER.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME  = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU  = SY-LANGU.
      W_DOC_DATA-OBJ_NAME   = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR  = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = IT_ATTACH[].
    Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM   = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE   =  LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR  =  LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME   =  LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE   =  T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = p_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    W_SENT_ALL = 'X'.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_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
                object_header              = objhead
                CONTENTS_BIN               = T_ATTACHMENT
                CONTENTS_TXT               = IT_MESSAGE
                RECEIVERS                  = T_RECEIVERS
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH 'Error occurred while sending'.
      ELSE.
        MESSAGE I000 WITH 'The document was sent'.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  data
          text
    -->  p1        text
    <--  p2        text
    FORM data.
    SELECT SNDPRN
             DOCNUM
             IDOCTP
             MESTYP
             DIRECT
             CREDAT
             STATUS
             FROM EDIDC
             INTO CORRESPONDING FIELDS
             OF TABLE TB_EDIDC
             WHERE STATUS = P_STATUS
             AND MESTYP IN S_MESTYP
             AND DIRECT IN S_DIRECT
             AND CREDAT IN S_CREDAT.
    SELECT KUNNR
           INPNR
           FROM EDPAR
           INTO CORRESPONDING FIELDS
           OF TABLE TB_EDPAR
           FOR ALL ENTRIES IN TB_EDIDC
           WHERE KUNNR = TB_EDIDC-SNDPRN.
    SELECT KUNNR
           ADRNR
           FROM KNA1
           INTO CORRESPONDING FIELDS
           OF TABLE TB_KNA1
           FOR ALL ENTRIES IN TB_EDPAR
           WHERE KUNNR = TB_EDPAR-INPNR.
    SELECT ADDRNUMBER
           BUILDING
           FROM ADRC
           INTO CORRESPONDING FIELDS
           OF TABLE TB_ADRC
           FOR ALL ENTRIES IN TB_KNA1
           WHERE ADDRNUMBER = TB_KNA1-ADRNR.
    LOOP AT TB_EDIDC WHERE STATUS = P_STATUS
                     AND MESTYP IN S_MESTYP
                     AND DIRECT IN S_DIRECT
                     AND CREDAT IN S_CREDAT.
      TB_ED-SNDPRN = TB_EDIDC-SNDPRN.
      TB_ED-DOCNUM = TB_EDIDC-DOCNUM.
      TB_ED-IDOCTP = TB_EDIDC-IDOCTP.
      TB_ED-MESTYP = TB_EDIDC-MESTYP.
      TB_ED-DIRECT = TB_EDIDC-DIRECT.
      TB_ED-CREDAT = TB_EDIDC-CREDAT.
      TB_ED-STATUS = TB_EDIDC-STATUS.
      READ TABLE TB_EDPAR WITH KEY KUNNR = TB_EDIDC-SNDPRN.
      READ TABLE TB_KNA1 WITH KEY KUNNR = TB_EDPAR-INPNR.
      READ TABLE TB_ADRC WITH KEY ADDRNUMBER = TB_KNA1-ADRNR.
      TB_ED-LOC = TB_ADRC-BUILDING.
      APPEND TB_ED.
    ENDLOOP.
    WRITE :/02 'CustomerNo',
            15 'Location Code',
            30 'Idoc Number',
            55 'Basic Type',
            70 'Message Type',
            95 'Direction',
            110 'Received Date',
            130 'Status'.
    ULINE.
    LOOP AT TB_ED.
      WRITE :/02 TB_ED-SNDPRN,
              15 TB_ED-LOC,
              30 TB_ED-DOCNUM,
              55 TB_ED-IDOCTP,
              70 TB_ED-MESTYP,
              95 TB_ED-DIRECT,
              110 TB_ED-CREDAT,
              130 TB_ED-STATUS.
    ENDLOOP.
    ENDFORM.                    " data
    Kindly help me in solving the issue.
    Thanks in advance.
    Suki.

    Hi,
    Check in transaction SCOT. If your mail is in error status in SCOT, you can assure that there is no problem with your code. If your message has not reached till SCOT, then the problem will be with the code.
    If the mail is there in scot with error status tell the BASIS to configure it. I feel this could be the problem.
    Regards,
    Renjith Michael.

  • 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 while sending mail with pdf attachment

    Dear All,
    I am sending mail to outlook Internet address, with PDF attachment, if i have the some text in the mail along with the attachment,
    then the PDF attachment file is not opeining, throws file corrupted error.
    If i don't have the text for mail body, and send only attachment then the PDF attachments working fine.
    Please help.
    regards,
    Kumar.

    Hi Kumar,
    If you are using the th FM "SO_NEW_DOCUMENT_ATT_SEND_API1" to send the PDF data(As an attachment) to an internet address, try prepare an internal table with the text you want to mention in your mail. This table needs to be passed to the
    'contents_txt' of this function module.  You can check your mail in SOST transaction and in DOC Content section.
      Ex:  wa_objtxt           = 'Regards'.
             APPEND wa_objtxt TO t_objtxt.
    I am sure that you won't get any problem if you follow the procedure mentioned above.
    Thank You,
    Regards,
    Naresh.

  • Unable to open pdf file sent thro' mail - error in file

    Hi,
    I am sending the RFQ smartform print as pdf attachment to  inbox.
    I am facing the a problem when i am trying to open the pdf which i have recieved in my inbox.
    Error as below:
    "Either not supported file type or file is damaged (it was sent as an  attachment and was not decoded properly)"!!!
    Can someone please help me to solve the issue.
    Regards,
    Chitra.P.S

    find my code below:-
    START-OF-SELECTION .
    *       FORM ENTRY_NEU
    FORM ENTRY_NEU USING RETURN_CODE US_SCREEN.
      perform select_record.
      DATA: LF_RETCODE TYPE SY-SUBRC.
      PERFORM PROCESSING USING    US_SCREEN
                         CHANGING LF_RETCODE.
      IF LF_RETCODE NE 0.
        RETURN_CODE = 1.
      ELSE.
        RETURN_CODE = 0.
      ENDIF.
    ENDFORM.
    convert pdf to xstring string
      LOOP AT I_TLINE INTO LS_PDF.
        ASSIGN LS_PDF TO <FS_X> CASTING.
        CONCATENATE LV_CONTENT <FS_X> INTO LV_CONTENT IN BYTE MODE.
      ENDLOOP.
    * Convert xstring to binary table to pass
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = LV_CONTENT
          IMPORTING
            output_length = v_lines_bin
        TABLES
          BINARY_TAB = LT_DATA.
    DATA:
    w_fmodule TYPE rs38l_fnam,
    *w_cparam TYPE ssfctrlop,
    *w_outoptions TYPE ssfcompop,
    W_bin_filesize TYPE i, " Binary File Size
    w_FILE_NAME type string,
    w_File_path type string,
    w_FULL_PATH type string.
    Internal table to hold the OTF data
    DATA:
    t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    Internal table to hold the data from the FM CONVERT_OTF
    T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
    To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    tables
    data_tab = T_pdf_tab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT I_TLINE.
    TRANSLATE I_TLINE USING '~'.
    CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    * Create Message Body Title and Description
    I_OBJTXT = 'RFQ print!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'RFQ smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'RFQ smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'RFQ'.
    I_OBJPACK-OBJ_DESCR = 'RFQ print'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = wa_SMTP_ADDR.
    I_RECLIST-REC_TYPE = 'U'.
    *I_RECLIST-com_type = 'INT'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN =  I_OBJBIN "changed on 03/09/2010
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC <> 0.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.

  • Error in Sending Mail

    Hi Experts
    I am Converting smartform into PDF and send mail to the mailid mentioned in the vendor master.
    Upto PDF conversion its working fine, sending mail is the problem here, am getting value for sy-subrc is '2'.
    Iam attaching the code below, please suggest me what could be the reason for the error.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      exporting
      document_data = wa_doc_chng
      put_in_outbox = 'X'
    commit_work = 'X'
      tables
      packing_list = i_objpack
      object_header = wa_objhead
      contents_bin = i_objbin
      contents_txt = i_objtxt
      receivers = i_reclist
      exceptions
      too_many_receivers = 1
      document_not_sent = 2
      document_type_not_exist = 3
      operation_no_authorization = 4
      parameter_error = 5
      x_error = 6
      enqueue_error = 7
      others = 8.
      if sy-subrc <> 0.
        write:/ 'Error When Sending the File', sy-subrc.
      else.
        write:/ 'Mail sent'.
      endif.
    Thanks in advance
    regards
    Raja

    HI,
    Check this link..http://docs.google.com/Doc?id=dfv2hmgs_0fm22tggx&hl=en
    Check you have correctly populated packing_list table.
    [Smartform as a PDF to Mail id |https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/smartformasaPDFtoMailid]

  • Error in sending mail Using java application using SMTP.

    Hi,
    I have created a java application of self user registration which also sends email to the user.
    I have also added two JAR files ie mail.jar and activation.jar under the PORTAL_INF/lib.
    The code works well in other servers but its showing the error-
    java.lang.NoSuchMethodError: com.sun.activation.registries.MailcapFile.getMailcapList(Ljava/lang/String;)Ljava/util/Map;
    Thanks & Regards,
    Amarys.

    Hi Amarys,
    Please check if you have configure the mail server in SAP protal.
    Refer to below documents:
    [Send email, using SMTP on remote host|Send email, using SMTP on remote host]
    [Mailing throw webdynpro for java|Mailing throw webdynpro for java]
    Best Regards
    Arun Jaiswal

  • Error in sending mail using ssl server

    Hi All
    Please help in resolving the below issue i am getting the following error while sending mail. I am using the IMAP server and it is ssl configured.
    DEBUG: setDebug: JavaMail version 1.4ea
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "mail.test.com", port 465, isSSL true
    DEBUG SMTP: exception reading response: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
    javax.mail.MessagingException: Exception reading response;
      nested exception is:
         javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462)
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
         at javax.mail.Service.connect(Service.java:275)
         at com.test.test.JavaMailApp2.main(JavaMailApp2.java:59)
    Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(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:97)
         at java.io.BufferedInputStream.fill(Unknown Source)
         at java.io.BufferedInputStream.read(Unknown Source)
         at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75)
         at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440)
         ... 4 more
    Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
         at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
         at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
         at sun.security.validator.Validator.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 17 more
    Caused by: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed
         at sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown Source)
         at sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown Source)
         at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown Source)
         at java.security.cert.CertPathValidator.validate(Unknown Source)
         ... 24 moreBelow is the source code of the program.
    package com.test.test;
    import java.security.Security;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class JavaMailApp {
         public static void main( String[] args )
              String d_email = "[email protected]";
              String d_uname = "ots.support";
              String d_password = "password";
              String d_host = "mail.test.com";
              String d_port  = "465"; //465,587
              String m_to = "[email protected]";
              String m_subject = "Testing";
              String m_text = "Hey, this is the testing email.";
              Properties props = new Properties();
              props.put("mail.smtp.user", d_email);
              props.put("mail.smtp.host", d_host);
              props.put("mail.smtp.port", d_port);
              props.put("mail.smtp.starttls.enable","true");
              props.put("mail.smtp.debug", "true");
              props.put("mail.smtp.auth", "true");
              props.put("mail.smtp.socketFactory.port", d_port);
              props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
              props.put("mail.smtp.socketFactory.fallback", "false");
              SMTPAuthenticator auth = new SMTPAuthenticator();
              Session session = Session.getInstance(props, auth);
              session.setDebug(true);
              MimeMessage msg = new MimeMessage(session);
              try {
                   msg.setText(m_text);
                   msg.setSubject(m_subject);
                   msg.setFrom(new InternetAddress(d_email));
                   msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                   Transport transport = session.getTransport("smtps");
                   transport.connect(d_host, 465, d_uname, d_password);
                   transport.sendMessage(msg, msg.getAllRecipients());
                   transport.close();
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    public class SMTPAuthenticator extends Authenticator{
         public PasswordAuthentication getPasswordAuthentication()
            return new PasswordAuthentication("[email protected]", "password");
    }I have also added the certificate to my keystore using the following command and still i am facing this issue.
    keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jks
    Add to fierof2's Reputation

    this is where i created the keystore.jks file
    I navigated to the location C:\Program Files\Java\jdk1.6.0_13\bin in command prompt and typed the following command to create the keystore
    keytool -import -trustcacerts -alias root -file mail_test_com.crt -keystore keystore.jksI was asked to set the password for keystore and then i was asked the question "Trust this certificate? [no]:" for which i gave yes.
    If this is not the right place to create the keystore.jks can you please tell me what is correct location to create the keystore file.

Maybe you are looking for

  • Java web start in Windows vista

    Hi, 1) When i tried to launch my Java Web start application in Windows Vista (32bit) With Jre 1.6_06 the java web start did not loaded. the process terminates at certain points. By Remote debugging got to know,: It was exiting the application at diff

  • Coverart in finder not showing

    Hi, I've recently been organizing my music collection and adding coverart to most of my mp3's. Problem is that some coverart doesn't show up in the finder (it does in Itunes and id3taggers). I found several topics on this already but never found some

  • Integrating mod_plsql reports with Oracle apps. Maddening dilemma.

    I'm hoping there is some guru out there that has the perfect solution to this maddening dilemma I'm facing. The crux of the issue is this. I've created mod_plsql reports that can accept a session_id with which they can set a user context based on glo

  • How to find a crm field in the bi content

    Hi all, in r/3 we have been using rsosfieldmap table to find the infoobject existing in the bi system and can u tell me how to find the crm field whether that particular infoobject is existing or not in the bicontent. Regards, Naveen

  • Macbook Pro w/ Retina Display shuts off randomly

    Anonymous UUID:   711728B3-D2A1-217D-4D17-9D74B23C1845 This is the report I keep getting after it shuts down. Its happened twice so far and I have no idea what to do. Any help would be great Wed Mar 19 15:41:28 2014 panic(cpu 4 caller 0xffffff7faef9b