Downloading Outlook Forms email using EWS

Hi,
I am trying to download the Outlook Forms emails as it is using EWS however the same is not happening. The Outlook Clas Property that I managed to identify by writing some logs is as below.
05/09/2014 06:05:01.875 - Login SuccessFull in Mail Box:shEBSFinanceEs ----------------- Mail Count is : 2
05/09/2014 06:05:02.406 - Mails Item Class Property Is :IPM.Note.Unclaimed Property Request
05/09/2014 06:05:02.593 - Login SuccessFull in Mail Box:shEBSFinanceEs ----------------- Mail Count is : 2
05/09/2014 06:05:02.624 - Mails Item Class Property Is :IPM.Note.Unclaimed Property Request
Appreciate the help!
Regards,
Roshan Rajan

>> I am trying to download the Outlook Forms emails as it is using EWS
Okay you need to post a code sample of what your trying to do to enable someone to comment on it. If you get an error what is the error ? if your having a particular issue what is the particular issue.
Cheers
Glen

Similar Messages

  • •If you are using FormsCentral to collect data with PDF forms, consider downloading the form and using Adobe Acrobat software to distribute and track responses. Learn how to re-purpose your form.  Ok, How?

    Once Formscentral is done, how can I continue to use my forms as a PDF file? Will my customer still just be able to hit submit and have the form come to me? What can I maintain from the original format?

    Hi SEJA,
    I believe the following Detailed FAQ document will answer all your questions regarding FormsCentral: Retirement . Please check it out.
    In case you still have a doubt, feel free to reply back.
    Regards,
    Rahul

  • Not able to Load MimeConent of certain Emails using EWS API

    When i Try to get the Mime Content of an email attachment using below code
    msgAttachment.Load(new PropertySet(ItemSchema.MimeContent)); MimeContent mc = msgAttachment.Item.MimeContent;
    I am getting the following exception on second line
    Microsoft.Exchange.WebServices.Data.ServiceRequestException occurred HResult=-2146233088 Message=The request failed. Unable to read data from the transport connection: The connection was closed. Source=Microsoft.Exchange.WebServices StackTrace: at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(HttpWebResponse
    response) at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute() at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalGetAttachments(IEnumerable1
    attachments, Nullable1 bodyType, IEnumerable1 additionalProperties, ServiceErrorHandling errorHandling) at Microsoft.Exchange.WebServices.Data.ExchangeService.GetAttachment(Attachment attachment, Nullable1 bodyType, IEnumerable1 additionalProperties)
    at Microsoft.Exchange.WebServices.Data.Attachment.InternalLoad(Nullable1 bodyType, IEnumerable1 additionalProperties) at Microsoft.Exchange.WebServices.Data.ItemAttachment.Load(IEnumerable1 additionalProperties) at Presensoft.JournalEmailVerification.EmailVerification.DownloadFailedAttachments(EmailMessage
    msg, JournalEmail journalEmail) in D:\Source\ProductionReleases\Release_8.0.7.0\Email Archiving\Presensoft.JournalEmailVerification\EmailVerification.cs:line 621 InnerException: System.IO.IOException HResult=-2146232800 Message=Unable to read data from the
    transport connection: The connection was closed. Source=System StackTrace: at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count) at System.IO.Compression.GZipStream.Read(Byte[]
    array, Int32 offset, Int32 count) at System.Xml.XmlTextReaderImpl.ReadData() at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) at System.Xml.XmlTextReaderImpl.ParseText() at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlCharCheckingReader.Read() at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read() at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName, Func2
    readAction) at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName) at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, String
    xmlElementName) at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.InternalLoadFromXml(EwsServiceXmlReader reader, PropertyBag propertyBag) at Microsoft.Exchange.WebServices.Data.ComplexPropertyDefinitionBase.LoadPropertyValueFromXml(EwsServiceXmlReader
    reader, PropertyBag propertyBag) at Microsoft.Exchange.WebServices.Data.PropertyBag.LoadFromXml(EwsServiceXmlReader reader, Boolean clear, PropertySet requestedPropertySet, Boolean onlySummaryPropertiesRequested) at Microsoft.Exchange.WebServices.Data.ServiceObject.LoadFromXml(EwsServiceXmlReader
    reader, Boolean clearPropertyBag) at Microsoft.Exchange.WebServices.Data.ItemAttachment.TryReadElementFromXml(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ComplexProperty.InternalLoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace,
    String xmlElementName, Func2 readAction) at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader reader, XmlNamespace xmlNamespace, String xmlElementName) at Microsoft.Exchange.WebServices.Data.ComplexProperty.LoadFromXml(EwsServiceXmlReader
    reader, String xmlElementName) at Microsoft.Exchange.WebServices.Data.GetAttachmentResponse.ReadElementsFromXml(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceResponse.LoadFromXml(EwsServiceXmlReader reader, String xmlElementName)
    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.ParseResponse(EwsServiceXmlReader reader) at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadResponse(EwsServiceXmlReader ewsXmlReader) at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.ReadResponse(HttpWebResponse
    response) InnerException:
    What I have observed is this occurs when the particular email attachment is Undeliverable email with below content:
    The e-mail system had a problem processing this message. Exchange will not try to redeliver this message for you.
    Diagnostic information for administrators:
    Generating server: MAIL.saaital.com
    [email protected]
    550 5.6.0 M2MCVT.StorageError; storage error in content conversion
    Any hints..pointers?? . Really need help on this as I have been struggling for quite some time to process this particular email attachment.

    Mokchhya-
    I responded to your
    StackOverflow post as well, but I'll respond here as well.
    Are you using Exchange Server 2010 SP3 RU2? If not, that might fix the issue. Another poster ran into a similar error and they were also sending an email with an attachment:
    http://social.technet.microsoft.com/Forums/en-US/fd7ef80e-f80b-47ed-883b-a34511c6233c/a-storage-transient-failure-has-occurred-during-content-conversion?forum=exchangesvrsecuremessaginglegacy.
    The support page related to the fix is here:
    http://support.microsoft.com/kb/2863310.
    -Mimi

  • I am unable to attach PDFs to Hotmail/Outlook email using my FF browser today. Never had issue before today.

    1. I am unable to attach pdfs today in Outlook/Hotmail email using my Firefox browser (27.0.1). I keep getting an error message that says, "The file is not a picture and can't be inserted inline." I do not understand why I keep getting this error message. I am not attempting to insert an image. I am selecting to Insert Files as Attachments from the drop down menu.
    No matter how many times I attempt to attach various pdfs to my emails today using Firefox as my browser, I keep getting this same error message. I have cleared the cache, cleared all cookies, cleared all history, signed out of my Hotmail/Outlook account, signed back in, restarted computer, etc., to no avail. Same problem.
    2. I switched to my Safari browser, and have no problem attaching pdfs in my Hotmail/Outlook email account. The pdfs are attaching perfectly as usual. My emails are being sent normally with the attachments. The attached pdfs are being received and are opening perfectly as intended.
    3. Why am I unable to attach files with Firefox today? Firefox is my browser of choice and I have used it with my Hotmail/Outlook email account without any problems, till today. Please help me! Thank you!

    Thank you jscher2000. Yes my PDFs do contain the .pdf extension. I tried your excellent idea to utilize the drag and drop method, but I still get the same error message with PDFs. I have no problem attaching photos or Word documents with either method; just PDFs.
    For further diagnostics, I started composing my email in Safari, attached all my pdfs and saved my email as a Draft.  I then went to Firefox, opened the draft to continue working on it, and voila!  There are all the pdfs I attached previously while in Safari.  I was able to send the email with attachments through Firefox with no issues. The attachments went through and were able to be opened.
    I am mystified, as Firefox has been trouble-free with my email account, and I have never had this particular issue till today. I made no changes to anything else on my computer, but I did notice very late last night that Outlook had one of those typical messages at the top of my Inbox to refresh my browser since Outlook had been updated. I refreshed and shut down for the night, and when I rebooted this morning that is when I discovered this brand new glitch with attachments. I'm assuming this has something to do their last update.

  • Downloading Adobe Form Problem...

    Hi,
    I have downloaded my FORM OBJECT using <b>SFP</b> Transaction(<i>Utilities/Downloading Form</i>) in ECC(<b>DEV</b>). Well, when I am trying to upload the same form in different system(<b>IDES</b>), I am getting an ERROR : Cannot upload due to wrong format. Well, the form is in XML format.
    But when I tried uploading the form in the same system(DEV), I was able to upload it perfectly.
    Is the FORM DOWNLOAD - System specific? Cant you upload and download into different systems like SMARTFORMS?
    FYI...Both the systems(IDES and DEV) are on same level - ECC 5.0
    Regards,
    <i><b>Raja Sekhar</b></i>

    Hi Raja,
    this should work as you describe it (just like with Smart Forms), even for different system releases as long as they are above 6.40.
    Kind regards,
    Markus Meisl
    SAP NetWeaver Product Management

  • I downloaded a form and saved as pdf yet cannot attach to email, says in use but all are closed help!

    i downloaded a form and saved as pdf yet cannot attach to email, says in use but all are closed help!

    for the moment you can Forcequit, as Eustace said.
    Really quit a program you do by clicking the menu bar of the program where its name is, on the bottom you see "Quit (appname)"; when it is in the Dock, rightclick it in the Dock and choose "Quit".
    Now about yout attachment: it does not matter what you did to it and where you moved it, as long as Preview is still open it doesn't let it go.

  • Get items in all Outlook folders using EWS (PowerShell)

    Hi All,
    I'm trying to figure out how to search all items in Outlook mailbox using EWS. I have a script that currently search "Sent Items" only. See script below. I just need to modify it to search all folders instead. Any help is appreciated. Thank you
    $Report = @()
    #Provide text files for all users in the legal department
    $Law = cat law.txt
    #Set Date to 1 Year Ago
    $Date = (Get-Date).AddYears(-1)
    #Logon to Exchange Web Service with default credentials
    Add-Type -Path "C:\Program Files\Microsoft\Exchange\Web Services\1.2\Microsoft.Exchange.WebServices.dll"
    $sid = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value
    $user = [ADSI]"LDAP://<SID=$sid>"
    $service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService -ArgumentList ([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP2)
    $service.AutodiscoverUrl($user.Properties.mail)
    Write-Progress -Activity "Preparing" -Status "Retrieving mailbox list" -PercentComplete 0
    #Get Mailboxes for all users in the text file
    $Mailboxes = $law | Get-User | Select WindowsEmailAddress, Company
    $Count = $Mailboxes.Count
    #Go through each users found and process accordingly
    ForEach ($Mailbox in $Mailboxes){
    $DisplayName = $Mailbox.DisplayName
    $i = $i + 1
    $pct = $i/$Count * 100
    Write-Progress -Activity "Collecting mailbox details" -Status "Processing mailbox $i of $Count - $DisplayName" -PercentComplete $pct
    Try {
    $Ok = $true
    $Mailbox = (Get-Mailbox $mailbox.WindowsEmailAddress -ErrorAction Stop ).PrimarySMTPAddress}
    catch [System.Exception]{
    $Ok = $false
    if ($Ok){
    #Set EWS up to impersonationate user
    $ImpersonatedUserId = New-Object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId -ArgumentList ([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress),$Mailbox
    $service.ImpersonatedUserId = $ImpersonatedUserId
    #Open user folder and bind SentItems folder to the EWS service.
    $folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::SentItems,$Mailbox)
    $SentFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,$folderid)
    #Specify Search Filters: Specify Date and Message Class Type
    $Sfir = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsGreaterThanOrEqualTo([Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::DateTimeSent, $Date)
    $Sfir2 = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo([Microsoft.Exchange.WebServices.Data.EmailMessageSchema]::ItemClass, "IPM.Note")
    #Add search filters together to form one search
    $sfCollection = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+SearchFilterCollection([Microsoft.Exchange.WebServices.Data.LogicalOperator]::AND);
    $sfCollection.Add($Sfir)
    $sfCollection.Add($Sfir2)
    #Create PropertySet to make it possible to retreive all properties of email content
    $psPropset = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)
    $SentItemsview = new-object Microsoft.Exchange.WebServices.Data.ItemView(1000)
    $fiItems = $null
    #Loop through all all items in 1000 page increment until all items are processed
    Do {
    #Find Items based on folder Id, search filter and page view
    $fiItems = $Service.FindItems($SentFolder.Id,$sfCollection,$SentItemsView)
    #Create PropertySet to make it possible to retreive all properties of email content
    [Void]$service.LoadPropertiesForItems($fiItems,$psPropset)
    #Loop through each email item and retrieve recipients info.
    ForEach ($item in $fiItems)
    $AllAttendees = $item.ToRecipients | Select -Expand Address
    $AllAttendees += $item.CCRecipients | Select -Expand Address
    $AllAttendees += $item.BCCRecipients | Select -Expand Address
    $sender = $item.From.Address
    $subject = $item.Subject
    $TimeSent = $item.DateTimeSent
    Write-Host "$Sender --- mailbox --- $TimeSent"
    for ($index = 0; $index -lt $AllAttendees.count; $index++) {
    Write-Progress -Activity "Looping" -Status "Going through all recipients list" -PercentComplete 0
    $Attendees = $AllAttendees[$index]
    #Filter invalid users, external users and users in Legal department
    If ($Attendees -like "*domain.com"){
    If ($Law -notcontains $Attendees){
    $a = Get-User $Attendees -filter {Company -ne $null} -ErrorAction SilentlyContinue
    if ($a){
    $Obj = New-Object -TypeName PSObject
    $Obj | Add-Member -MemberType NoteProperty -Name Subject -Value $subject
    $Obj | Add-Member -MemberType NoteProperty -Name Sender -Value $sender
    $Obj | Add-Member -MemberType NoteProperty -Name Sent -Value $TimeSent
    $Obj | Add-Member -MemberType NoteProperty -Name Recipients -Value $Attendees
    $Report += $Obj
    $SentItemsView.Offset += $fiItems.Items.Count
    While ($fiItems.MoreAvailable -eq $true)
    #Export report to CSV
    $Report | Export-Csv "C:\Users\user\Dropbox\Script\LawData.csv" -NoTypeInformation -Encoding UTF8
    Tunde

    It seems the answer is here:
    http://gsexdev.blogspot.com/2011/08/using-allitems-search-folder-from.html.
    I'll go through it and let you if successfully.
    Thanks
    Tunde
    Tunde

  • Cant receive email using outlook 2007

    Hello,
    I downloaded outlook 2007 and its not working correctly.
    I am able to send out emails, but I cant receive anything back.
    I have the latest outlook connector (
    [Oracle Connector for Outlook 10.1.3.0.8|http://mydesktop.oraclecorp.com/pls/gds_obi/GDS_OBI_ADMIN.DYN_P2P_JAVA_APP.show?p_arg_names=v_sof_lan_id&p_arg_values=2978]
    Any ideas why its acting this way.
    Thanks in advanced,
    AJ

    Hmm as far as I remember this is not the last version of the connector out there, please check on metalink, I'm currently runing a .9 version (and I'm only using outlook for testing purpose, so I could also be outdated !)

  • Receiving multiple duplicate emails using Outlook 2010

    I am receiving multiple duplicate emails using Outlook 2010. The email receiving, can go up to few hundreds copies. Not
    all emails i receive will be duplicated. There is no common sender for those affected emails. Usually when i received email from my Outlook 2010 the email in Outlook Web Access will be gone. But this time round for those affected duplicating emails, it still
    can be found in the Outlook Wed Access. Any solution for this problem? Currently
    I would need to go into the Outlook Web Access to delete the affected email then the duplication will be stop. Or I would need to cancel the Send/Receive & restart Outlook. But this 2 method is only temporary solution. The problem will keep coming
    back. 

    Dear Jeremycny,
    I think you are working with a POP3 account and issue of replicated emails in Outlook is common in the case of POP3 connection. So, first of all uncheck the
    “Leave a copy of messages on the server” option and see the results.
    Also, see the TasK Manager, if there are multiple “Outlook.exe” are running under the
    “Processes” tab, then end the unnecessary programs as each of them downloading the same email multiple times.
    Apart from it, if there are numbers of factors behind the replication of emails in Microsoft Outlook such as:
    Rules (Exploiated Rules)
    Scanning Programs Integration
    Damaged Outlook Profile
    Robert’s have defined these bugs in a more profound manner in his blog, so take more help from the given source:
    http://www.howto-outlook.com/faq/duplicates.htm
    Note: Improve community discussions by marking the answers helpful otherwise respond back for further help.
    Thanks & Regards
    Clark Kent

  • When sending an email using outlook can you attach another email?

    When sending a new email using outlook, is it possible to attach another email?

    What does that have to do with iPhones?

  • HT1692 Have recently installed itunes and outlook on a new computer.  Have multiple email accounts set up in Outlook tho only use contacts and calendar in relation to one of these. Cannot sync itunes with the correct contacts and calendars, Help!

    My new computer is 64-bit running Windows 7 pro, SP1 and Microsoft Office 2010 Pro Plus 32-bit
    My phone is a 4S runing iOS 6.1.3
    Very frustrated now that I have recently installed itunes and outlook on this new computer.  Everything worked perfectly ok on my laptop which was also 64-bit Windows 7 and running 32-bit Microsoft Office 2010 Pro.  I have multiple email accounts set up in Outlook tho only use contacts and calendar in relation to one of these. Cannot sync itunes with the correct contacts and calendars, when I sync the calendar and contacts are empty.  Not sure if there is any way to point itunes to particular address books and calendars.
    I have installed and uninstalled itunes 3 times and thank goodness have a backup
    Can anyone help please?
    thanks in anticipation

    I had my home computer set up to sync to work's Exchange server. It worked well, but I didn't like seeing work email messages and other programs trying to sync with my default Outlook folder, which was then the Exchange (& work related) .ost file. I know there are various ways to manage those problems using filters, view, subfolders, etc., but it was a hassle for me. I think it could work well for many other folks.
    For now, I have published my work calendar and subscribed to that calendar on my home computer. So I have view only access to my calendar on my home computer (and I can add/edit calendar items on my iPad (or Outlook Web Access) when away from work). This is not quite what I wanted, but it may work.
    It almost makes me long for the days when I used my Windows Mobile Treo to sync back and forth between exchange at work and outlook at home (but had many sync conflicts as a result).

  • My new iphone 5 email is synched with my home office computer Outlook email using a POP account, but deleting an email on my computer does not delete it on my phone and vice versa.  Is there any way to get a true synch?.

    My new iPhone 5 email is synched with my home office computer Outlook email using a POP account, but deleting an email on my computer does not delete the email on my phone and vice versa.  Is there any way to get a true synch?.

    POP does not support synchronization between the server and clients. You will need to use IMAP or Exchange Active Sync if your email provider supports it.

  • Using Outlook (2010 & 2013) to connect to Exchange using EWS

    First things first.
    I know that Outlook on the PC platform uses MAPI to connect to Excahnge while the Mac flavor of Outlook uses EWS, however, i was cycling through some available EX and ExO PowerShell cmdlets and found a parameter for set-casmailbox named EWSAllowOutlook Which
    leads me to believe that configuring this setting should allow Outlook to use EWS to connect to Exchange. (This is a separate parameter from EWSAllowMacOutlook).
    I tried a manual configuration (entering in the EWS url and setting the correct Outlook Anywhere settings) with no success.
    I also tried manual configuration of an outlook.com and activesync account and entering the EWS URL as well with no success.
    Has anyone successfully configured Outlook for PC to connect to Exchange using EWS and how did you configure the client?
    Thanks

    Hi,
    Sorry for the late reply.
    About the EWSAllowOutlook parameter, I have something to clarify.
    This parameter allow or disallow Outlook 2007 to access EWS for the user.
    Outlook uses EWS for free/buzy, OOF settings, and calendar sharing.
    Outlook connect to Exchange server by using MAPI is a by design behavior.
    We cannot change this.
    Hope it is helpful
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Sending PDF forms (created using SFP) as Email Attachment

    Hi,
         I have created bunch of ADOBE forms using SFP. They are not interactive forms. created using ADOBE Live cycle designer.
    I have the Function module and by executing I can view the PDF form in print preview mode. But I have to save this in backend and attach to email.
    I have a program that have to send one of the forms created in SFP as email attachment to outside SAP.
    Please advice how to achieve this.
    Thanks,
    Sanjeev

    Hi ,
    Please find below a code sample for your requirement
    *& Report  ZENVOI_PDF_MAIL
    REPORT  zenvoi_pdf_mail MESSAGE-ID ad.
    TYPE-POOLS : abap .
    DATA : data_for_update TYPE zdemopdf ,
           hexa            TYPE solix_tab.
    DATA : fm_name   TYPE funcname ,
           param     TYPE sfpoutputparams,
           doc_param TYPE sfpdocparams ,
           output    TYPE fpformoutput .
    param-nodialog = abap_true. " suppress printer dialog popup
    param-getpdf = abap_true.
    doc_param-langu = sy-langu.
    doc_param-country = 'FR'.
    doc_param-fillable = abap_true.
    doc_param-dynamic = abap_true.
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
      EXPORTING
        i_name     = 'ZDEMO_PDF'
      IMPORTING
        e_funcname = fm_name.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = param
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4.
    CHECK sy-subrc EQ 0.
    CALL FUNCTION fm_name
      EXPORTING
        /1bcdwb/docparams  = doc_param
        data_for_update    = data_for_update
      IMPORTING
        /1bcdwb/formoutput = output
      EXCEPTIONS
        usage_error        = 1
        system_error       = 2
        internal_error     = 3.
    CALL FUNCTION 'FP_JOB_CLOSE'
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 3
        OTHERS         = 4.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer     = output-pdf "PDF file from function module
      TABLES
        binary_tab = hexa.
    * Envoi du mail
    ** CLASS-DEFINITIONS
    DATA: send_request       TYPE REF TO cl_bcs.
    DATA: document           TYPE REF TO cl_document_bcs.
    *DATA: sender             TYPE REF TO cl_sapuser_bcs.
    data: sender            TYPE REF TO if_sender_bcs.
    DATA: recipient          TYPE REF TO if_recipient_bcs.
    ** INTERNAL TABLES
    DATA: l_mailtext TYPE soli_tab.
    DATA: iaddsmtp   TYPE TABLE OF bapiadsmtp.
    DATA: ireturn    TYPE TABLE OF bapiret2.
    ** VARIABLES
    DATA: mail_line  LIKE LINE OF l_mailtext.
    DATA: bapiadsmtp         TYPE bapiadsmtp.
    DATA: subject    TYPE so_obj_des.
    DATA : att_subject TYPE so_obj_des.
    DATA : w_except TYPE REF TO cx_root .
    CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
                     '[email protected]' .
    FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
    *Set subject of the mail
    subject = 'Exemple de PDF interactif'.
    * Set text of the mail
    mail_line = 'Merci de remplir le formulaire et nous le retourner'.
    APPEND mail_line TO l_mailtext .
    att_subject = 'Template du PDF'.
    TRY.
    * Create persistent send request
        send_request = cl_bcs=>create_persistent( ).
    * Get sender object
        sender = cl_sapuser_bcs=>create( sy-uname ).
    *    sender =
    *      cl_cam_address_bcs=>create_internet_address( '[email protected]' ) .
    * Add sender
        CALL METHOD send_request->set_sender
          EXPORTING
            i_sender = sender.
    * Read the E-Mail address for the user
    *    CALL FUNCTION 'BAPI_USER_GET_DETAIL'
    *      EXPORTING
    *        username = sy-uname
    *      TABLES
    *        return   = ireturn
    *        addsmtp  = iaddsmtp.
    *    LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
    *      CLEAR bapiadsmtp.
    *      MOVE <smtp> TO bapiadsmtp.
    *    ENDLOOP.
    *    CASE bapiadsmtp-e_mail.
    *      WHEN space.
            recipient =
         cl_cam_address_bcs=>create_internet_address( c_defmail ).
    *      WHEN OTHERS.
    *        recipient =
    *     cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
    *    ENDCASE.
    * Add recipient with its respective attributes to send request
        CALL METHOD send_request->add_recipient
          EXPORTING
            i_recipient  = recipient
            i_express    = 'X'
            i_copy       = space
            i_blind_copy = space
            i_no_forward = space.
    * Set that you don't need a Return Status E-mail
        CALL METHOD send_request->set_status_attributes
          EXPORTING
            i_requested_status = 'E'
            i_status_mail      = 'E'.
    * set send immediately flag
        send_request->set_send_immediately( 'X' ).
    *Build Document
        document = cl_document_bcs=>create_document(
                            i_type    = 'RAW'
                            i_text    = l_mailtext
                            i_subject = subject ).
    *     add attachment to document
        CALL METHOD document->add_attachment
          EXPORTING
            i_attachment_type    = 'PDF'
            i_attachment_subject = att_subject
            i_att_content_hex    = hexa.
    * Add document to send request
        CALL METHOD send_request->set_document( document ).
    * Send document
        CALL METHOD send_request->send( ).
        COMMIT WORK.
      CATCH cx_send_req_bcs INTO w_except.
      CATCH cx_address_bcs INTO w_except.
      CATCH cx_document_bcs INTO w_except.
    ENDTRY.
    Hope this help you .
    Best regards

  • I just downloaded Google Chrome and use both Google Chrome and Firefox as my browser. However, whenever I click on an email link, it opens up Chrome and I want it to open Firefox. How do I fix this?

    I just downloaded Google Chrome and use both Google Chrome and Firefox as my browsers. However, whenever I click on an email link, it opens up Chrome and I want it to open Firefox. How do I fix this?

    Go into FF Preferences & set it to be your default browser.  This way when you click on an email link in Chrome, FF will open.

Maybe you are looking for

  • How to restore backed up data of another iPhone?

    Please help me out. I connected my friend's iPhone to my iTunes and it offered to update the software on it. I decided to update as my friend had never than that before. And, now I am in trouble, cause all his data is gone. I mean all... before it wa

  • Can I actually back up photos as files

    Hello, Sorry if this is a dumb question. I haven't been on this site since iPhoto 06. I use Super Duper for back up. No problems there. But in iPhoto 06 I was able to back up my pics as individual files (jpegs) that when you double clicked on them th

  • Could not update OS of iPhone

    Computer running windows XP Could not update OS of iPhone 5 from 6.0 to 6.1.2. Download process hang after only 1% Download Internet Security software Norton Antivirus. Could Norton prevent the download?

  • Combining Conditional Actions in Advanced Actions

    I have created a Jeopardy game in Captivate.  There are 16 questions.  I have set an Advanced Action so that when all 16 questions are clicked on the user will go to "final Jeopardy".  What I can't figure out is to add that after 5 questions are clic

  • External iSight Powers Up (Gets Green Light) Then Stops

    I have one of the first iSights I can confirm worked up until two years ago. At that point I unplugged it and never plugged it back in. It stayed mounted on the computer. Today, I decided to re-plug it back in but I can't get it to stay on. I've foll