Problem in script output sending mail

hi ,
I have a problem sending a mail with script output as attachment . I have searched in the forum for the answers but none is solved my question.
I am sending the data to the otf and it is getting the otfdata. but it is not showing  the data on the script when it is sent as an attachment to the email , but it is showing only script with null values filled.( means i am getting the mail with attachment but in that attachment there is no data filled in the script send).
the code is like this ..
here i am filling the otfdata and i am exporting the otfdata
CALL FUNCTION 'ZMM_ARRANG_ENTRY_ABR_NATRAB'
    EXPORTING
      i_nast       = nast
      i_fonam      = tnapr-fonam
      i_xscreen    = pi_xscreen
      i_arc_params = arc_params
      i_toa_dara   = toa_dara
    IMPORTING
      e_retcode    = px_retcode
    EXCEPTIONS
      OTHERS       = 1.
  IF ( sy-subrc <> 0 ).                "Fehler
    MOVE sy-subrc TO px_retcode.
    IF ( pi_xscreen = 'X' ).           "Ausgabe auf Bildschirm
      MESSAGE ID     sy-msgid
              TYPE   sy-msgty
              NUMBER sy-msgno
              WITH   sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ELSE.
*---Import OTFDATA from the memory
    IMPORT  it_otfdata FROM MEMORY ID 'OTF'.
  ENDIF.
  wa_maildata-obj_name = 'EMAIL'.
  wa_maildata-obj_descr = 'Settlement Details'.
*-----mail contents
  it_mailtext-line = 'Sub-sequent settlement Details'.
  APPEND it_mailtext.
  DESCRIBE TABLE it_mailtext LINES v_lines.
  READ TABLE it_mailtext INDEX v_lines.
  wa_maildata-doc_size = ( v_lines - 1 ) * 255 + STRLEN( it_mailtext ).
*Creation of the entry for the compressed document
  CLEAR it_mailpack-transf_bin.
  it_mailpack-head_start = 1.
  it_mailpack-head_num   = 0.
  it_mailpack-body_start = 1.
  it_mailpack-body_num   = v_lines.
  it_mailpack-doc_type   = 'RAW'.
  APPEND it_mailpack.
*-----Get OTF data
  LOOP AT it_otfdata.
    it_mailcont-line = it_otfdata.
    APPEND it_mailcont.
  ENDLOOP.
*---Move  OTF data into binary table
  LOOP AT it_mailcont.
    MOVE-CORRESPONDING it_mailcont TO it_mailbin.
    APPEND it_mailbin.
  ENDLOOP.
*---Get no of lines in Binary data table
  DESCRIBE TABLE it_mailbin LINES v_lines.
*---Fill name of the header of email
  it_mailhead = 'Subsequent Settlement Details.OTF'.
  APPEND it_mailhead.
*---Creation of the entry for the compressed attachment
  it_mailpack-transf_bin   = 'X'.
  it_mailpack-head_start   = 1.
  it_mailpack-head_num     = 1.
  it_mailpack-body_start   = 1.
  it_mailpack-body_num     = v_lines.
  it_mailpack-doc_type     = 'OTF'.
  it_mailpack-obj_name     = 'EMAIL'.
  it_mailpack-obj_descr    = 'Settlement Details'.
  it_mailpack-doc_size     = v_lines * 255.
  APPEND it_mailpack.
*----Get email address from the address number of vendor
  CALL FUNCTION 'ADDR_GET_REMOTE'
    EXPORTING
      addrnumber = l_adrnum
    TABLES
      adsmtp     = it_adsmtp.
*----Get mail address
  READ TABLE it_adsmtp WITH KEY remark = 'AP_SUB_SETT'.
  IF sy-subrc = 0.
    it_mailrec-receiver   = it_adsmtp-smtp_addr.
    it_mailrec-rec_type   = 'U'.
    it_mailrec-com_type   = 'EXT'.
    APPEND it_mailrec.
*---Send email with PDF attachment
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data = wa_maildata
        put_in_outbox = 'X'
        COMMIT_WORK   = 'X'
      TABLES
        packing_list  = it_mailpack
        object_header = it_mailhead
        contents_bin  = it_mailbin
        contents_txt  = it_mailtext
        receivers     = it_mailrec.
  ELSE.
    MESSAGE 'No email id Exist for the vendor' TYPE 'E'.
  ENDIF.
please suggest me with your valuable answers .
Regards,
Venkat Appikonda.

Hi venkat
Just check if this helps you.
The following part of the code does exactly that.
Selecting details from the spool request table.
  SELECT * FROM tsp01 INTO TABLE tb_spool
           WHERE rqowner = sy-uname.
  IF sy-subrc EQ 0.
    SORT tb_spool DESCENDING BY rqcretime.
    CLEAR : tb_spool.
    READ TABLE tb_spool INDEX 1.
convert spool into PDF format.
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
         EXPORTING
              src_spoolid = tb_spool-rqident
         TABLES
              PDF         = tb_lines.
  ENDIF.
After this, on execution we get the below mentioned message.
This indicates that a PDF of the SAP Script has been created which is in the format u201C132-long stringsu201D.
In order to send the mail across, the mailing format of the PDF supports u201C255-long stringsu201D. So, the present u201C132-long stringsu201D needs to be converted into u201C255-long stringsu201D. This along with the mail code is mentioned below.
  DATA: lv_receiver(50) TYPE c.
  REFRESH: tb_obj_txt,
           tb_obj_bin,
           tb_obj_head,
           tb_paklist,
           tb_receiver.
  CLEAR: tb_obj_txt,
         tb_obj_bin,
         tb_paklist,
         tb_obj_head,
         tb_receiver.
  CLEAR: tb_adrc.
IF NOT tb_adrc[] IS INITIAL.
Reading the address table with the key as address number.
    READ TABLE tb_adrc WITH KEY addrnumber = tb_kna2-adrnr.
    IF sy-subrc EQ 0.
Vendor Email ID.
      SELECT SINGLE smtp_addr
         FROM adr6
         INTO wf_mailaddr
         WHERE addrnumber = tb_adrc-addrnumber.
      IF sy-subrc EQ 0.
Moving the mail address to the receiver itab
        MOVE wf_mailaddr TO tb_receiver-receiver.
        tb_receiver-rec_type = text-011.
        APPEND tb_receiver.
      ELSE.
        CONCATENATE text-004 tb_kna2-kunnr text-005 INTO lv_receiver
                                   SEPARATED BY space.
If pa_call is initial, the receiver ID is printed; else an INVALID E-mail ID    message gets flashed.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        EXIT.   u201CNo mailing for invalid Email id
      ENDIF.
    ENDIF.
  ENDIF.
  wf_name = sy-uname.
  wf_year = tb_main-bldat(4).
  wf_mon = tb_main-bldat+4(2).
*This FM gives the name of the months. 
CALL FUNCTION 'MONTH_NAMES_GET'
       EXPORTING
            language    = sy-langu
       TABLES
            month_names = tb_months.
  IF sy-subrc EQ 0.
    READ TABLE tb_months WITH KEY mnr = wf_mon.
    IF sy-subrc EQ 0.
      wf_name = tb_months-ktx.
    ENDIF.
  ENDIF.
  CLEAR: tb_contp.
IF NOT tb_contp[] IS INITIAL.
*Reading the contp itab as per the customer entered on the selection screen.
    READ TABLE tb_contp WITH KEY bukrs = pa_bukrs
                                 kunnr =  tb_kna2-kunnr.
    IF sy-subrc EQ 0.
    CONCATENATE text-006 text-008 tb_contp-contp text-008 tb_kna2-kunnr
                          text-008 wf_name text-008 wf_year INTO wf_sub.
    ENDIF.
  ELSE.
    CONCATENATE text-006 text-008 tb_kna2-kunnr text-008 wf_name
                                    text-008 wf_year INTO wf_sub.
  ENDIF.
Subject and Description
  CLEAR wa_docdata.
  wa_docdata-obj_name  = text-007.
  wa_docdata-obj_descr = wf_sub.
  wa_docdata-obj_langu = sy-langu.
Write main body
  tb_obj_txt = text-009.
  APPEND tb_obj_txt.
  CLEAR tb_obj_txt.
  CLEAR  tb_paklist.
  tb_paklist-head_start = 1.
  tb_paklist-head_num   = 3.
  tb_paklist-body_start = 1.
  tb_paklist-body_num   = 60.
  tb_paklist-doc_type   = text-012.
  APPEND tb_paklist.
  CLEAR  tb_paklist.
create PDF file
Transfer the 132-long strings to 255-long strings
  LOOP AT tb_lines.
    TRANSLATE tb_lines USING ' ~'.
    CONCATENATE wf_buffer tb_lines INTO wf_buffer.
  ENDLOOP.
  TRANSLATE wf_buffer USING '~ '.
  DO.
    tb_obj_bin = wf_buffer.
    APPEND tb_obj_bin.
    SHIFT wf_buffer LEFT BY 255 PLACES.
    IF wf_buffer IS INITIAL.
      EXIT.
    ENDIF.
  ENDDO.
  DESCRIBE TABLE tb_obj_bin LINES lv_lines.
  READ TABLE tb_obj_bin INDEX lv_lines.
  lv_size = ( lv_lines - 1 ) * 255 + STRLEN( tb_obj_bin ).
Create attachment notification
  tb_paklist-transf_bin = co_x.
  tb_paklist-head_start = 1.
  tb_paklist-head_num   = 0.
  tb_paklist-body_start = 1.
  tb_paklist-body_num   = lv_lines.
  tb_paklist-doc_type   = text-013.
  tb_paklist-obj_descr  = text-010.
  tb_paklist-obj_name   = text-010.
  tb_paklist-doc_size   = lv_size.
  APPEND tb_paklist.
*mail the PDF to the receiver.
  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = wa_docdata
            sender_address             = wf_name
            sender_address_type        = text-014
       TABLES
            packing_list               = tb_paklist
            object_header              = tb_obj_head
            contents_bin               = tb_obj_bin
            contents_txt               = tb_obj_txt
            receivers                  = tb_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.
  IF sy-subrc <> 0.
    CONCATENATE text-003 tb_kna2-kunnr text-005 INTO lv_receiver
                            SEPARATED BY space.
    CLEAR: itab.
    itab-kunnr = tb_kna2-kunnr.
    itab-message = lv_receiver.
    APPEND itab.
    IF pa_call IS INITIAL.
      WRITE :/ lv_receiver.
    ENDIF.
  ELSE.
    CONCATENATE text-002 tb_kna2-kunnr text-005 INTO lv_receiver
                            SEPARATED BY space.
    CLEAR: itab.
    itab-kunnr = tb_kna2-kunnr.
    itab-message = lv_receiver.
    APPEND itab.
    IF pa_call IS INITIAL.
      WRITE :/ lv_receiver.
    ENDIF.
  ENDIF.
Hope this helps.
Harsh

Similar Messages

  • Problem polling Inbox with Sender Mail adapter

    Hi,
    I have a funny problem with Sender Mail adapter (IMAP Protocol)
    It was working fine previously.
    Now, when I poll the Inbox, 2 things happen. After re-activation:
    1. If there is a new mail in the Inbox, the Communication channel marks the mail as read, but still keeps reading the same mail into XI.
    2. If there are no new mails in the Inbox, it reads the already read mails in the Inbox one by one. So all old mails start entering XI.
    This problem exists only with the Inbox. It works fine with other folders for the same mail ID.
    Any inputs as to why this is happening?
    Regards,
    Puloma.

    Hi,
    We re-started the server and problem was solved. But we don't know why the Adapter Engine was behaving erratically.
    Regards,
    Puloma.

  • Problem with openURL when sending Mail

    Hi All
    I am trying to send mail from my app using
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString:emailData]];
    emailData contains a google URL that i want to send via email:
    http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73.5 65698
    my problem is that on Mail app it is showing on the following portion
    http://maps.google.com/maps?f=d
    i did a couple of tests and find out that the problem is with the "&" i tried & or & did not work cause as soon as it finds teh "&" it drop the whole string that comes after it.
    Any help on how I should format this string to appear correctly on my email will be greatly appreciated
    thx for your help

    You missed the point of my reply. You need to escape anything that you send. When you send 'http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73 .565698' it's just not going to work. As mentioned, you need to Google how to escape variables when sent via GET. Not to mention, your openURL command is wrong as well:
    [UIApplication sharedApplication openURL: NSURL URLWithString:emailData];
    Where emailData is:
    http://maps.google.com/maps?f=d&saddr=45.578982,-73.565698&daddr=45.578982,-73.565698
    will absolutely never work. Check the docs for how to use openURL for sending an email using the mailto: protocol. Also, if the emailData that you send using openURL: doesn't look like the escaped string from this tool: http://www.xs4all.nl/~jlpoutre/BoT/Javascript/Utils/endecode.html you aren't properly escaping your URL params.

  • HT201320 when i send an email using my hotmail address through outlook my contacts do not receive the mail. when i send the same mail through my iPad or iPhone no problem my contacts receive the mail. this only problem happens when i send mail with my mac

    I have a hotmail email address. I compose my mail useing MS outlook. when i send the mail to my contacts useing my macbook air,my contacts tell me there have not received the mail.
    when i send the same message with my ipad or iphone no problem my contacts receive the mail.
    what is the problem?

    Blair84 wrote:
    Double check your contacts email, and if its incorrect, go to their contact and change it and save it or you can delete the email you put in, and manually type it in.
    Hope this helps.
    How would that help the original poster?

  • Need Help on powershell Script to send mails in different languages

    Hello, Just wanted to use the script below to remind users of password expiry date (I got it from internet New-Passwordreminder.ps1). We have companies in many countries, so the email should be in the language of that country. So since our users are in different
    OU's according to countries, I thought some one could help me edit this script and say if the user is in AB ou then email in english will be sent, if in BC ou then the email will be in Russian....So in the script I will have all the languages I need
    to have written.
    <#
    .SYNOPSIS
      Notifies users that their password is about to expire.
    .DESCRIPTION
        Let's users know their password will soon expire. Details the steps needed to change their password, and advises on what the password policy requires. Accounts for both standard Default Domain Policy based password policy and the fine grain
    password policy available in 2008 domains.
    .NOTES
        Version            : v2.6 - See changelog at
    http://www.ehloworld.com/596
        Wish list      : Better detection of Exchange server
                  : Set $DaysToWarn automatically based on Default Domain GPO setting
                  : Description for scheduled task
                  : Verify it's running on R2, as apparently only R2 has the AD commands?
                  : Determine password policy settings for FGPP users
                  : better logging
        Rights Required   : local admin on server it's running on
        Sched Task Req'd  : Yes - install mode will automatically create scheduled task
        Lync Version    : N/A
        Exchange Version  : 2007 or later
        Author           : M. Ali (original AD query), Pat Richard, Exchange MVP
        Email/Blog/Twitter :
    [email protected]  http://www.ehloworld.com @patrichard
        Dedicated Post   :
    http://www.ehloworld.com/318
        Disclaimer       : You running this script means you won't blame me if this breaks your stuff.
        Info Stolen from   : (original)
    http://blogs.msdn.com/b/adpowershell/archive/2010/02/26/find-out-when-your-password-expires.aspx
                  : (date)
    http://technet.microsoft.com/en-us/library/ff730960.aspx
                : (calculating time)
    http://blogs.msdn.com/b/powershell/archive/2007/02/24/time-till-we-land.aspx
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/23fc5ffb-7cff-4c09-bf3e-2f94e2061f29/
    http://blogs.msdn.com/b/adpowershell/archive/2010/02/26/find-out-when-your-password-expires.aspx
                : (password decryption)
    http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/f90bed75-475e-4f5f-94eb-60197efda6c6/
                : (determine per user fine grained password settings)
    http://technet.microsoft.com/en-us/library/ee617255.aspx
    .LINK    
        http://www.ehloworld.com/318
    .INPUTS
      None. You cannot pipe objects to this script
    .PARAMETER Demo
      Runs the script in demo mode. No emails are sent to the user(s), and onscreen output includes those who are expiring soon.
    .PARAMETER Preview
      Sends a sample email to the user specified. Usefull for testing how the reminder email looks.
    .PARAMETER PreviewUser
      User name of user to send the preview email message to.
    .PARAMETER Install
      Create the scheduled task to run the script daily. It does NOT create the required Exchange receive connector.
    .EXAMPLE
      .\New-PasswordReminder.ps1
      Description
      Searches Active Directory for users who have passwords expiring soon, and emails them a reminder with instructions on how to change their password.
    .EXAMPLE
      .\New-PasswordReminder.ps1 -demo
      Description
      Searches Active Directory for users who have passwords expiring soon, and lists those users on the screen, along with days till expiration and policy setting
    .EXAMPLE
      .\New-PasswordReminder.ps1 -Preview -PreviewUser [username]
      Description
      Sends the HTML formatted email of the user specified via -PreviewUser. This is used to see what the HTML email will look like to the users.
    .EXAMPLE
      .\New-PasswordReminder.ps1 -install
      Description
      Creates the scheduled task for the script to run everyday at 6am. It will prompt for the password for the currently logged on user. It does NOT create the required Exchange receive connector.
    #>
    #Requires -Version 2.0
    [cmdletBinding(SupportsShouldProcess = $true)]
    param(
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Demo,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Preview,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [switch]$Install,
     [parameter(ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
     [string]$PreviewUser
    Write-Verbose "Setting variables"
    [string]$Company = "Contoso Ltd"
    [string]$OwaUrl = "https://mail.contoso.com"
    [string]$PSEmailServer = "10.9.0.11"
    [string]$EmailFrom = "Help Desk <[email protected]>"
    [string]$HelpDeskPhone = "(586) 555-1010"
    [string]$HelpDeskURL = "https://intranet.contoso.com/"
    [string]$TranscriptFilename = $MyInvocation.MyCommand.Name + " " + $env:ComputerName + " {0:yyyy-MM-dd hh-mmtt}.log" -f (Get-Date)
    [int]$global:UsersNotified = 0
    [int]$DaysToWarn = 14
    [string]$ImagePath = "http://www.contoso.com/images/new-passwordreminder.ps1"
    [string]$ScriptName = $MyInvocation.MyCommand.Name
    [string]$ScriptPathAndName = $MyInvocation.MyCommand.Definition
    [string]$ou
    [string]$DateFormat = "d"
    if ($PreviewUser){
     $Preview = $true
    Write-Verbose "Defining functions"
    function Set-ModuleStatus {
     [cmdletBinding(SupportsShouldProcess = $true)]
     param (
      [parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $true, HelpMessage = "No module name specified!")]
      [string]$name
     if(!(Get-Module -name "$name")) {
      if(Get-Module -ListAvailable | ? {$_.name -eq "$name"}) {
       Import-Module -Name "$name"
       # module was imported
       return $true
      } else {
       # module was not available (Windows feature isn't installed)
       return $false
     }else {
      # module was already imported
      return $true
    } # end function Set-ModuleStatus
    function Remove-ScriptVariables { 
     [cmdletBinding(SupportsShouldProcess = $true)]
     param($path)
     $result = Get-Content $path | 
     ForEach { if ( $_ -match '(\$.*?)\s*=') {     
       $matches[1]  | ? { $_ -notlike '*.*' -and $_ -notmatch 'result' -and $_ -notmatch 'env:'} 
     ForEach ($v in ($result | Sort-Object | Get-Unique)){  
      Remove-Variable ($v.replace("$","")) -ErrorAction SilentlyContinue
    } # end function Get-ScriptVariables
    function Install {
     [cmdletBinding(SupportsShouldProcess = $true)]
     param()
    http://technet.microsoft.com/en-us/library/cc725744(WS.10).aspx
     $error.clear()
     Write-Host "Creating scheduled task `"$ScriptName`"..."
     $TaskPassword = Read-Host "Please enter the password for $env:UserDomain\$env:UserName" -AsSecureString
     $TaskPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($TaskPassword))
     # need to fix the issue with spaces in the path
     schtasks /create /tn $ScriptName /tr "$env:windir\system32\windowspowershell\v1.0\powershell.exe -psconsolefile '$env:ExchangeInstallPath\Bin\exshell.psc1' -command $ScriptPathAndName" /sc Daily /st 06:00 /ru $env:UserDomain\$env:UserName /rp
    $TaskPassword | Out-Null
     if (!($error)){
      Write-Host "done!" -ForegroundColor green
     }else{
      Write-Host "failed!" -ForegroundColor red
     exit
    } # end function Install
    function Get-ADUserPasswordExpirationDate {
     [cmdletBinding(SupportsShouldProcess = $true)]
     Param (
      [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, HelpMessage = "Identity of the Account")]
      [Object]$accountIdentity
     PROCESS {
      Write-Verbose "Getting the user info for $accountIdentity"
      $accountObj = Get-ADUser $accountIdentity -properties PasswordExpired, PasswordNeverExpires, PasswordLastSet, name, mail
      # Make sure the password is not expired, and the account is not set to never expire
        Write-Verbose "verifying that the password is not expired, and the user is not set to PasswordNeverExpires"
        if (((!($accountObj.PasswordExpired)) -and (!($accountObj.PasswordNeverExpires))) -or ($PreviewUser)) {
         Write-Verbose "Verifying if the date the password was last set is available"
         $passwordSetDate = $accountObj.PasswordLastSet      
          if ($passwordSetDate -ne $null) {
           $maxPasswordAgeTimeSpan = $null
            # see if we're at Windows2008 domain functional level, which supports granular password policies
            Write-Verbose "Determining domain functional level"
            if ($global:dfl -ge 4) { # 2008 Domain functional level
              $accountFGPP = Get-ADUserResultantPasswordPolicy $accountObj
              if ($accountFGPP -ne $null) {
               $maxPasswordAgeTimeSpan = $accountFGPP.MaxPasswordAge
         } else {
          $maxPasswordAgeTimeSpan = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
        } else { # 2003 or ealier Domain Functional Level
         $maxPasswordAgeTimeSpan = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
        if ($maxPasswordAgeTimeSpan -eq $null -or $maxPasswordAgeTimeSpan.TotalMilliseconds -ne 0) {
         $DaysTillExpire = [math]::round(((New-TimeSpan -Start (Get-Date) -End ($passwordSetDate + $maxPasswordAgeTimeSpan)).TotalDays),0)
         if ($preview){$DaysTillExpire = 1}
         if ($DaysTillExpire -le $DaysToWarn){
          Write-Verbose "User should receive email"
          $PolicyDays = [math]::round((($maxPasswordAgeTimeSpan).TotalDays),0)
          if ($demo) {Write-Host ("{0,-25}{1,-8}{2,-12}" -f $accountObj.Name, $DaysTillExpire, $PolicyDays)}
                # start assembling email to user here
          $EmailName = $accountObj.Name      
          $DateofExpiration = (Get-Date).AddDays($DaysTillExpire)
          $DateofExpiration = (Get-Date($DateofExpiration) -f $DateFormat)      
    Write-Verbose "Assembling email message"      
    [string]$emailbody = @"
    <html>
     <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     </head>
    <body>
     <table id="email" border="0" cellspacing="0" cellpadding="0" width="655" align="center">
      <tr>
       <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="46" height="28" align="absMiddle">
    if ($HelpDeskURL){     
    $emailbody += @" 
       <font style="font-size: 10px; color: #000000; line-height: 16px; font-family: Verdana, Arial, Helvetica, sans-serif">If this e-mail does not appear properly, please <a href="$HelpDeskURL" style="font-weight:
    bold; font-size: 10px; color: #cc0000; font-family: verdana, arial, helvetica, sans-serif; text-decoration: underline">click here</a>.</font>
    $emailbody += @"   
       </td>
      </tr>
      <tr>
    if ($HelpDeskURL){  
    $emailbody += @"
       <td height="121" align="left" valign="bottom"><a href="$HelpDeskURL"><img src="$ImagePath/header.gif" border="0" alt="Description: $ImagePath/header.gif"
    width="655" height="121"></a></td>
    }else{
    $emailbody += @" 
       <td height="121" align="left" valign="bottom"><img src="$ImagePath/header.gif" border="0" alt="Description: $ImagePath/header.gif" width="655" height="121"></td>
    $emailbody += @"
      </tr>
      <tr>
       <td>
        <table id="body" border="0" cellspacing="0" cellpadding="0">
         <tr>
          <td width="1" align="left" valign="top" bgcolor="#a8a9ad"><img src="$ImagePath/spacer50.gif" alt="Description: $ImagePath/spacer50.gif" width="1"
    height="50"></td>
          <td><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="46" height="106"></td>
          <td id="text" width="572" align="left" valign="top" style="font-size: 12px; color: #000000; line-height: 17px; font-family: Verdana, Arial, Helvetica, sans-serif">
    if ($DaysTillExpire -le 1){
     $emailbody += @"
      <div align='center'>
       <table border='0' cellspacing='0' cellpadding='0' style='width:510px; background-color: white; border: 0px;'>
        <tr>
         <td align='right'><img width='36' height='28' src='$ImagePath/image001b.gif' alt='Description: $ImagePath/image001b.gif'></td> 
         <td style="font-family: verdana; background: #E12C10; text-align: center; padding: 0px; font-size: 9.0pt; color: white">ALERT: You must change your password today or you will be locked out!</td>  
         <td align='left'><img border='0' width='14' height='28' src='$ImagePath/image005b.gif' alt='Description: $ImagePath/image005b.gif'></td>
        </tr>
       </table>
      </div>
    $emailbody += @"
       <p style="font-weight: bold">Hello, $EmailName,</p>
       <p>It's change time again! Your $company password expires in <span style="background-color: red; color: white; font-weight: bold;">&nbsp;$DaysTillExpire&nbsp;</span> day(s), on $DateofExpiration.</p>
       <p>Please use one of the methods below to update your password:</p>
       <ol>
        <li>$company office computers and Terminal Server users: You may update your password on your computer by pressing Ctrl-Alt-Delete and selecting 'Change Password' from the available options. If you use a $company laptop in addition
    to a desktop PC, be sure and read #3 below.</li>
        <li>Remote Outlook Client, Mac, and/or Outlook Web App users: If you only access our email system, please use the following method to easily change your password:</li>
        <ul>
         <li>Log into <a href="$owaurl">Outlook Web App</a> using Internet Explorer (PC) or Safari or Firefox (Mac).</li>
         <li>Click on the Options button in the upper right corner of the page.</li>  
         <li>Select the &quot;Change Password&quot; link to change your password.</li>
         <li>Enter your current password, then your new password twice, and click Save</li>
         <li><span style="font-weight: bold">NOTE:</span> You will now need to use your new password when logging into Outlook Web App, Outlook 2010, SharePoint, Windows Mobile (ActiveSync) devices, etc. Blackberry
    Enterprise Users (BES) will not need to update their password. Blackberry Internet Service (BIS) users will be required to use their new password on their device.</li>
        </ul>
        <li>$company issued laptops: If you have been issued a $company laptop, you must be in a corporate office and directly connected to the company network to change your password. If you also use a desktop PC in the office, you must
    remember to always update your domain password on the laptop first. Your desktop will automatically use the new password.</li>
        <ul>
         <li>Log in on laptop</li>
         <li>Press Ctrl-Alt-Delete and select 'Change Password' from the available options.</li>
         <li>Make sure your workstation (if you have one) has been logged off any previous sessions so as to not cause conflict with your new password.</li>
        </ul>
       </ol>
       <p>Think you've got a complex password? Run it through the <a href="The">http://www.passwordmeter.com/">The Password Meter</a></p>
       <p>Think your password couldn't easily be hacked? See how long it would take: <a href="How">http://howsecureismypassword.net/">How Secure Is My Password</a></p>
       <p>Remember, if you do not change your password before it expires on $DateofExpiration, you will be locked out of all $company Computer Systems until an Administrator unlocks your account.</p>
       <p>If you are traveling or will not be able to bring your laptop into the office before your password expires, please call the number below for additional instructions.</p>
       <p>You will continue to receive these emails daily until the password is changed or expires.</p>
       <p>Thank you,<br />
       The $company Help Desk<br />
       $HelpDeskPhone</p>
    if ($accountFGPP -eq $null){
     $emailbody += @"
       <table style="background-color: #dedede; border: 1px solid black">
        <tr>
         <td style="font-size: 12px; color: #000000; line-height: 17px; font-family: Verdana, Arial, Helvetica, sans-serif"><b>$company Password Policy</b>
          <ul>
           <li>Your password must have a minimum of a $MinPasswordLength characters.</li>
           <li>You may not use a previous password.</li>
           <li>Your password must not contain parts of your first, last, or logon name.</li>
           <li>Your password must be changed every $PolicyDays days.</li>
    if ($PasswordComplexity){
     Write-Verbose "Password complexity"
     $emailbody += @"
           <li>Your password requires a minimum of two of the following three categories:</li>
           <ul>
            <li>1 upper case character (A-Z)</li>
            <li>1 lower case character (a-z)</li>
            <li>1 numeric character (0-9)</li>        
           </ul>
    $emailbody += @"
           <li>You may not reuse any of your last $PasswordHistory passwords</li>
          </ul>
         </td>
        </tr>
       </table>
    $emailbody += @"        
           </td>
           <td width="49" align="left" valign="top"><img src="$ImagePath/spacer50.gif" alt="" width="49" height="50"></td>
           <td width="1" align="left" valign="top" bgcolor="#a8a9ad"><img src="$ImagePath/spacer50.gif" alt="Description: $ImagePath/spacer50.gif" width="1"
    height="50"></td>
          </tr>
         </table>
         <table id="footer" border="0" cellspacing="0" cellpadding="0" width="655">
          <tr>
           <td><img src="$ImagePath/footer.gif" alt="Description: $ImagePath/footer.gif" width="655" height="81"></td>
          </tr>
         </table>
         <table border="0" cellspacing="0" cellpadding="0" width="655" align="center">
          <tr>
           <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="36" height="1"></td>
           <td align="middle" valign="top"><font face="Verdana" size="1" color="#000000"><p>This email was sent by an automated process.
    if ($HelpDeskURL){
    $emailbody += @"               
           If you would like to comment on it, please visit <a href="$HelpDeskURL"><font color="#ff0000"><u>click here</u></font></a>
    $emailbody += @"               
            </p><p style="color: #009900;"><font face="Webdings" size="4">P</font> Please consider the environment before printing this email.</p></font>
           </td>
           <td align="left" valign="top"><img src="$ImagePath/spacer.gif" alt="Description: $ImagePath/spacer.gif" width="36" height="1"></td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </body>
    </html>
          if (!($demo)){
           $emailto = $accountObj.mail
           if ($emailto){
            Write-Verbose "Sending demo message to $emailto"
            Send-MailMessage -To $emailto -Subject "Your password expires in $DaysTillExpire day(s)" -Body $emailbody -From $EmailFrom -Priority High -BodyAsHtml
            $global:UsersNotified++
           }else{
            Write-Verbose "Can not email this user. Email address is blank"
    } # end function Get-ADUserPasswordExpirationDate
    if ($install){
     Write-Verbose "Install mode"
     Install
    Write-Verbose "Checking for ActiveDirectory module"
    if ((Set-ModuleStatus ActiveDirectory) -eq $false){
     $error.clear()
     Write-Host "Installing the Active Directory module..." -ForegroundColor yellow
     Set-ModuleStatus ServerManager
     Add-WindowsFeature RSAT-AD-PowerShell
     if ($error){
      Write-Host "Active Directory module could not be installed. Exiting..." -ForegroundColor red;
      if ($transcript){Stop-Transcript}
      exit
    Write-Verbose "Getting Domain functional level"
    $global:dfl = (Get-AdDomain).DomainMode
    # Get-ADUser -filter * -properties PasswordLastSet,EmailAddress,GivenName -SearchBase "OU=Users,DC=domain,DC=test" |foreach {
    if (!($PreviewUser)){
     if ($ou){
      Write-Verbose "Filtering users to $ou"
      $users = Get-AdUser -filter * -SearchScope subtree -SearchBase $ou -ResultSetSize $null
     }else{
      $users = Get-AdUser -filter * -ResultSetSize $null
    }else{
     Write-Verbose "Preview mode"
     $users = Get-AdUser $PreviewUser
    if ($demo){
     Write-Verbose "Demo mode"
     # $WhatIfPreference = $true
     Write-Host "`n"
     Write-Host ("{0,-25}{1,-8}{2,-12}" -f "User", "Expires", "Policy") -ForegroundColor cyan
     Write-Host ("{0,-25}{1,-8}{2,-12}" -f "========================", "=======", "===========") -ForegroundColor cyan
    Write-Verbose "Setting event log configuration"
    $evt = new-object System.Diagnostics.EventLog("Application")
    $evt.Source = $ScriptName
    $infoevent = [System.Diagnostics.EventLogEntryType]::Information
    $EventLogText = "Beginning processing"
    $evt.WriteEntry($EventLogText,$infoevent,70)
    Write-Verbose "Getting password policy configuration"
    $DefaultDomainPasswordPolicy = Get-ADDefaultDomainPasswordPolicy
    [int]$MinPasswordLength = $DefaultDomainPasswordPolicy.MinPasswordLength
    # this needs to look for FGPP, and then default to this if it doesn't exist
    [bool]$PasswordComplexity = $DefaultDomainPasswordPolicy.ComplexityEnabled
    [int]$PasswordHistory = $DefaultDomainPasswordPolicy.PasswordHistoryCount
    ForEach ($user in $users){
     Get-ADUserPasswordExpirationDate $user.samaccountname
    Write-Verbose "Writing summary event log entry"
    $EventLogText = "Finished processing $global:UsersNotified account(s). `n`nFor more information about this script, run Get-Help .\$ScriptName. See the blog post at
    http://www.ehloworld.com/318."
    $evt.WriteEntry($EventLogText,$infoevent,70)
    # $WhatIfPreference = $false
    # Remove-ScriptVariables -path $MyInvocation.MyCommand.Name
    Remove-ScriptVariables -path $ScriptPathAndName

    Hi petro_jemes,
    Just a little claritification, you need to add the value to the variable "[string]$ou", and also change the language in the variable "$emailbody" in the function "Get-ADUserPasswordExpirationDate".
    I hope this helps.

  • Problem in notificaion to send mails

    hello all
    I am having a problem in notification.i am able to create examples using notificaions and i can also deploy it.once i create an instance the visual flow indicates that the process is complete, but i do not reveive mails .infact i can see that the mails will be sent once i shut down the server.If in case i dont stop the serever i get an allert from the antivirus email scanner that the mails have not been sent...why is it that i will have to stop the server and then the mails start to be sent from my pc .
    Thank you.

    I got the same problem with symantec antivirus. I disabled the antivirus and worked fine. I dont know the real workaround for this problem but disabling the antivirus for testing purpose does not hurt. Also weird enough, the first time i try to send an email i got a rollback porcess erorr, but the following process instances worked flawlesly.
    One recomendation is not to disable the whole antivirus, but disable the check email on send.

  • Script to send mail on updae of file

    I would like a script that would send a predefined email when a file is updated. I would like this for I alert you, as having the picture on your computer is not a big help if your computer is gone. I tried, but I just got my mac on saturday so I do not no applescript and other things yet. Thanks.

    Hi atomic16
    These threads may be of help to you.
    This thread shows a mail script:
    http://discussions.apple.com/message.jspa?messageID=2162293#2162293
    Latest file added to folder:
    http://discussions.apple.com/message.jspa?messageID=1864973#1864973
    Using modification date:
    http://discussions.apple.com/message.jspa?messageID=1979228#1979228
    Budgie

  • Problem in workflow (Selfitem) send mail

    Hi,
    The workflow I am working on requires sending of a notification email to the administrator. For that I have been asked to use the Object type as “SELFITEM” and method as “SENDTASKDESCRIPTION”.
    1) Can anyone give me the documentation that automatically configures the mail using Selfitem.
    2) What are the fields I need to pass to the “SENDTASKDESCRIPTION” method?
    Please help.
    Thanks in advance...
    Regards,
    Abhishek

    Hi,
    It is simple. Here you will have to go to tcode pftc.Since sending the mail is a standard task you will create a standard task. U will then add the BOR object type  in the screen area  as SELFITEM and the method as SendTaskDescription.U also need to trigger this task if its a standalone task. If it is being called as a step in the workflow builder then you will create a step in workflow template as send email.double click on the step it will take u to a new screen there u enter the task created above in pftc and assign appropriate reciver in your case the administrator.
    Hope this helps.
    Reward useful answerrs.
    Regards,
    Shrita.

  • Sender Mail Adapter problem

    Hi,
    I am having problems to get my sender mail adapter running.
    I configured it with the following parameters:
    <i>Transport protocol: POP3
    Message Protocol: XIALL
    Adapter Engine: Integration Server
    URL: pop://server
    username + pw
    poll intervall: 1 Min.</i>
    The adapter is active and if I look into the adapter monitoring everything seems to be fine (green light).
    But the adapter doesn't poll the messages from the mail account and I cannot see any activity in the message monitoring.
    If I try the same configuration with Thunderbird everthing works fine. Also my receiving mail adapter works without any problems for the same account.
    Do you have any idea what the problem could be or how I could find out what my mail adapter is doing?
    Thanks,
    Andreas

    Hi all, hi Andreas,
    have you solved you problem? Could you please describe how you did it.
    I have the same situation and I haven't any ideas how can I manage it.
    I checked all parameters and compared they with documentation. Everything seems to be ok.
    I didn't see any messages in the message monitoring, but in the chanel monitoring I found follows:
    exception caught during processing mail message; java.net.ConnectException: Connection refused: connect
    I tried the same configuration with email client and it worked. I tried change POP on IMAP with URL imap://server/folder. It didn't work also.
    Could you please help me?
    Thank you in advance,
    Anna

  • Problem in sending mail to external id from customer exit

    Hello All,
    I have a problem that I am sending mail to supervisor. I have written code and it is working correctly in se38 program.
    This code If I keep in an exit and run tcode then it is not working and it is giving message no mail sent.
    Why is this so? The same code is working in SE38 program and not working in an EXIT.
    Pls give me solution as soon as possible.
    Thanks in advance.
    nallani

    >>Why is this so? The same code is working in SE38 program and not working in an EXIT.
    It is because the Email function has a COMMIT WORK statement & you cannot/should not COMMIT inside a User exit.. to avoid this conflict, simply SUBMIT the Report ie pla cethe email function omdule inside a Report program & call it from the User exit using the SUBMIT statement.
    ~Suresh

  • When sending e-mail, a message says that the sent folder is full,-- even though it is not-- however the mail still gets sent. No problem sending mail to myself

    I am running Thunderbird version 33.1 Recently, when sending e-mail, I get an error message indicating that the sent folder is full and that I should empty or compress it to fix the problem-- so I emptied it-- problem remains. Also, there is no record of sending the e-mail in the sent folder, even though the mail has been sent. No such problems occur when I send mail to myself.
    Any suggestions ???

    If you deleted some of the messages you have done one half of the process. Deleting a message just marks it for deletion and hides it from view. You have to COMPACT the folder to actually delete the messages and free up the space.
    I agree that Thunderbird did a poor job naming this process because it is the subject of much misunderstanding.
    Read about compacting here.
    http://kb.mozillazine.org/Thunderbird_:_Tips_:_Compacting_Folders
    I suggest that you also read this article about maintaining your email system to help prevent problems.
    http://kb.mozillazine.org/Keep_it_working_-_Thunderbird

  • Since 10.5 I can no longer script the sender if sending a mail via Mail

    I would use the following script to send mail from different mail accounts using just the one account in 10.4.
    set theBody to "abc"
    set theSubject to "XYZ"
    set theTarget to "[email protected]"
    tell application "Mail"
    set newMessage to make new outgoing message with
    roperties {subject:theSubject, content:theBody}
    tell newMessage
    make new to recipient at end of to recipients with properties {address:theTarget}
    *set sender to "[email protected]"*
    end tell
    send newMessage
    end tell
    *set sender to "[email protected]"* no longer works since upgrading to 10.5. It is ignored and the name of the account it is sends from is used in its place.
    Does anybody know how to fix this in 10.5?
    Message was edited by: ChangeAgent

    No, I get my mail on my computer, not on a website. I used to be able to see the information but in sorting another issue I must have changed a setting or something. I have gone to View. Under Message Attributes most things are ticked but many of them are not bold print i.e. they are pale grey. I don't know how to activate them again.

  • Problem sending mail from DynPage

    Dear Experts,
    I am new to Portal development and am facing problem while trying to send mail using SMTP from my DynPage Application.
    The code is as follows:
    public boolean sendMailNotification(String from,String to,String subject,String body){
                String host="host";
              InitialContext ctx = null;
              MimeBodyPart bodyPart = null;
              Address[] address = null;
              Message msg = null;
              Transport tr = null;
              Session sess = null;
                try{
                   ctx = new InitialContext();
                   sess = (Session) javax.rmi.PortableRemoteObject.narrow(ctx.lookup("java:comp/env/mail/MailSession"), Session.class);
                   msg = new MimeMessage(sess);
                   msg.setFrom(new InternetAddress(from));
                   msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
                   msg.setSubject(subject);
                   if ((body != null) && (body.length()>0)) {
                        msg.setContent(body, "text/plain");
                   } else {
                        msg.setContent("", "text/plain");
                   msg.setSentDate(new GregorianCalendar().getTime());
                   msg.saveChanges();
                tr = sess.getTransport("smtp");
                   tr.connect(host, "", "");
                   address = msg.getAllRecipients();
                   tr.sendMessage(msg, address);
                   tr.close();     
                }catch(Exception ex){
                     return false;
                return true;
    The code is working on the portal examples "sendmail using java"
    When i upload the par file onto the portal and try to execute, the following exception is thrown:
    #1.5#001279D91F2B002A0000000400000C5C000428DC632C84FC#1170826928718#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#200057#361846#####SAPEngine_Application_Thread[impl:3]_20##0#0#Error#1#/System/Server#Java###Exception ID:11:12_07/02/07_0108_1861750
    [EXCEPTION]
    #1#com.sapportals.portal.prt.runtime.PortalRuntimeException: PortalRuntimeException
    at com.sapportals.portal.prt.core.PortalRequestManager.handleRequestException(PortalRequestManager.java:921)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:803)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    <b>Caused by: java.lang.NoClassDefFoundError: javax/mail/Message</b>
    at com.videocon.dqr.DQRPresidentReport.getPage(DQRPresidentReport.java:46)
    at com.sapportals.portal.htmlb.page.PageProcessorComponent.getPage(PageProcessorComponent.java:193)
    at com.sapportals.portal.htmlb.page.PageProcessorComponent.doOnNodeReady(PageProcessorComponent.java:62)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
    at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
    at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
    at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
    ... 21 more
    Plz. Reply as soon as possible.
    any help will be duly appriciated the SDN Way.
    Thanks and Regards,
    Gaurav Modgil

    Hey Gaurav,,
    Try copying the mail.jar in
    dist/PORTAL-INF/lib
    Rebuild
    Its prefered if you also copy all jars which you are using in the project to this  folder.
    2.Try to add javax.mail
    when you using the variables in your code.
    like ..,msg.setRecipient(<b>javax.mail.</b>Message.RecipientType.TO, new InternetAddress(to));
    I donno its weird do to this after including it in classpath
    But many times the PRT doesnt recognise the jar at all.
    So always best to spoonfeed it evrytime:-)
    It worked this way for me
    Thanks,
    Swathi

  • How to script output to email

    hi,
    Can anyone give me information or documentation on
    "SENDING SCRIPT OUTPUT TO EMAIL"??
    if possible plz send the code also.
    waiting for your replies
    bye
    ARJUN

    Hi,
    Could you please expalain , is it ABAP Scripts?, or any other if other ,what is the format??
    If ABAP script
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm
    Sending SAP SCRIPT to mail
    sending sap script to mail id
    Problem Sending SAP Script as a PDF attachment to external mail
    Sending SAP Script Output to Mail & Fax
    sending a script in mail (outside SAP)
    How To send SAP SCRIPT AS an email.
    Regards
    Chilla

  • Sender Mail adapter encounters MalformedInputException

    I have a sender mail adapter that processes the attached .csv file.  All is working fine.  I use FCC in module to convert the attachment and pass to an IDOC adapter for processing in SAP system.
    My problem is sometimes the sender mail CC fails with ...........
    exception caught during processing mail message[1]; com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
    It only fails with some files.  At the moment when we test we FORWARD the email to our email account.  If I detach the failed email attachment and attach it to a NEW email it will then work.
    So why does it not work when forwarding emails?  But it works when I attach the same file to a new email and send?
    Other threads for this error seem to point to encoding.  But how do I know which to use.  I currently use the following in my module config:
    Transfer.ContentType     application/octet-stream;charset="ISO-8859-1"

    I have this in my configuration:
    localejbs/AF_Modules/PayloadSwapBean   on local
    TRANSFORM
    localejbs/AF_Modules/MessageTransformBean   on local
    txtxml
    TRANSFORM   swap.keyName   payload-name
    TRANSFORM   swap.keyValue   MailAttachment-1
    txtxml   Transfer.ContentType   application/octet-stream;charset="ISO-8859-1"
    txtxml   Transform.Class   com.sap.aii.messaging.adapter.Conversion
    txtxml   Transform.ContentDescription   MailAttachment-1
    txtxml   Transform.ContentDisposition   attachment;filename="MailAttachment-1.bin"
    txtxml   xml.conversionType   SimplePlain2XML
    txtxml   xml.documentName   MT_BCD_INVOICES
    txtxml   xml.documentNamespace   urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00
    txtxml   xml.fieldNames   COST_CENTRE,EMPLOYEE_ID,PRODUCT_GROUP,COMP_CODE,BCD_ACCOUNT,INVOICE_DATE,TRAVELER_NAME,TRAVELER_FIRST_NAME,INVOICE_NO,AMOUNT_EXCL_VAT,CURRENCY1,AMOUNT_VAT,CURRENCY2,AMOUNT_DOC_CURRENCY,CURRENCY3
    txtxml   xml.fieldSeparator   ;
    txtxml   xml.lastFieldsOptional   YES
    txtxml   xml.processFieldNames  fromConfiguration
    txtxml   xml.structureTitle   RECORDSET

Maybe you are looking for

  • NI-DAQmx false duplicate channel error

    I have an SCXI chassis w/ a SCXI-1600 and a SCXI-1102 w/ SCXI-1303 accessory.  I created a series of NI-DAQmx global channels for thermocouples, calling them Air Temp0 through 17.  Using NI-DAQmx subvi's I read them.  See a very simplified VI attachm

  • SAPbobsCOM.Documents.Lines Delete/Remove

    Is it true that there is still no API to delete line items for Document objects? (I cannot find one in version 6.5) Does 2004 include this feature? Is there a workaround? Making the Price and Quantity zero is not an option for me.

  • Without JMS Providers??

    Can I write my own Queue application and run it in a app server using the required jar files (jms.jar and jndi.jar ) without using any specific JMS providers.

  • Where can I get iPhoto for 10.5.6?

    The only place I can find a download is through the app store now, but the basic operating system requirements are higher than 10.5.6. Also, I recently accidentally deleted my old iPhoto, but have my library backed up on an external drive.  Can I jus

  • Line color in JTable

    how can I change line color in JTable.