HOST SCRIPT TO SEND FILES WITH MUTT FROM APPLICATIONS

Hello
Im development in Oracle application and i need a shell to send e-mail for more than one files at same time in the same mail
actually im using this script.
Please, i need to know, how send more than i file at same time , this file will live in the same path
FCP_LOGIN=$1; export FCP_LOGIN
FCP_USERID=$2; export FCP_USERID
FCP_USERNAME=$3; export FCP_USERNAME
FCP_REQID=$4; export FCP_REQID
FCP_EMAIL=$5; export FCP_EMAIL
FCP_FILENAME=$6; export FCP_FILENAME
#FCP_CLIENTE=$7; export FCP_CLIENTE
FCP_SUBJECT=$7; export FCP_SUBJECT
echo "Program Name: WSHDOCMAIL"
echo "Execution Start Time: " `date`
echo "PARAMETERS: $FCP_LOGIN $FCP_USERID $FCP_USERNAME $FCP_REQID $FCP_EMAIL $FCP_FILENAME"
# Definir la direccion de e-mail.
# En esta sección el codigo se posiciona en el directorio en donde el cuerpo
# del reporte reside y se verifica si existe alguna direccion de e-mail
#cd $AR_TOP/out
cd $APPLCSF/$APPLOUT
echo "$APPLCSF/$APPLOUT"
if [[ $FCP_EMAIL = '' ]] then
echo "Dirección de e-mail no especificada."
echo "Unable to send the e-mail, please review either the email address or check with the system administrator."
exit 2
fi
# Definir si la salida del reporte existe.
# En esta sección se verifica si existe una salida a enviar, si es asi se
# procede a enviar el email, de otra manera el programa termina.
if [[ ! -a o$FCP_FILENAME.out ]]
then
echo "File Not Found: o$FCP_FILENAME.out"
echo "Output file was not generated, e-mail will be not sent."
exit 0
fi
# Enviar el E-mail.
# En esta sección se envia el e-mail, si el proceso no puede ser ejecutado se
# envia un error.
cp o$FCP_FILENAME.out o$FCP_FILENAME.pdf
mutt -s "$FCP_SUBJECT" -a o$FCP_FILENAME.pdf $FCP_EMAIL < /dev/null
if (( $? != 0 ))
then
echo "Unable to send the e-mail, please review either the email address or check with the system administrator."
exit 2
fi
echo "e-mail sent!"
thanks and Regards

Hi,
You can send multi files like this: mutt -s subject -a file1 -a file2 email_address < /dev/null

Similar Messages

  • Sending file with bluetooth from laptop to phone

    I am having great difficulty sending file from laptop to phone using bluetooth. I can send files from phone to laptop.
    I have followed the instructions from this link: http://wiki.archlinux.org/index.php/Bluetooth .
    also i am using xfce4 as my Desktop Environment.
    any other help would be greatly appreciated.

    The thing is, this is not the topic you started, so it is solved . The OP used Xfce, and I linked him to a solution on how to do so - on Xfce. So yes, it is solved. He's the only one to say so. As you say, your problem is different, so you might want to bump your own topic instead .

  • Send mail with attachment from webdynpro application

    hi,
    From a webdynpro application, the user will upload any files through the File upload ui element.These uploaded files has to go as an attachment in the mail which is being send to a particular ID ,when the user clicks the submit button in the form.
    can you please give me the code regarding this and help me in sending mail with attachment from a webdynpro application.
    Thanks in advance,
    shami.

    Hai,
    Properties props = System.getProperties();
           props.put("mail.smtp.host", "xx.xx.x.xx");
           Session session = Session.getDefaultInstance(props, null);
           Message msg = new MimeMessage(session);
           msg.setFrom(new InternetAddress("[email protected]"));
           msg.setRecipients(Message.RecipientType.TO,
           InternetAddress.parse("[email protected]", false));
           msg.setSubject(subject);
           msg.setText(body);
           msg.setHeader("X-Mailer", " Email");
           msg.setSentDate(new Date());
           MimeBodyPart messageBodyPart = new MimeBodyPart();
           messageBodyPart.setText("Hai , This mail Generated By the  Program");
          Multipart multipart = new MimeMultipart();
           multipart.addBodyPart(messageBodyPart);
            messageBodyPart = new MimeBodyPart();
            DataSource source = new FileDataSource("C:\nag.xls");//Here you need to give the Path of uploaded File
            messageBodyPart.setDataHandler( new DataHandler(source));
            messageBodyPart.setFileName("nag.xls");
            multipart.addBodyPart(messageBodyPart);
            // Put parts in message
            msg.setContent(multipart);
           Transport.send(msg);
    Regards,
    Naga

  • How to send file with original name through Mail adapter

    I have to send file with original name as attachment through Mail Adapter. I am picking the file from FTP server through File Adapter. I am not using message mapping because files do not have any standard format.

    Hi,
    Have you solve your problem ?...
    I have exactly the same scenario : pik up a file (file adapter) and send it in attachment by mail adapter without mapping (no IR)...
    I activated Adapter specific paramters properties in the File adapter sender and i can see the FileName tag in DynamicConfiguration section of SoapHeader in SXMB_MONI...
    I want to use MessageTransformationBean... BUT, how can i 'access' to FileName tag ???...
    Thanks...
    I setup modules like this :
    AF_Modules/DynamicConfigurationBean 1
    AF_Modules/MessageTransformBean rename
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
    1 key.0 write http://sap.com/xi/XI/System/File FileName
    1 value.0 message.FileName
    rename Transform.ContentDisposition attachment;filename=message.FileName
    rename Transform.ContentDescription message.FileName
    rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
    But my file name attachment is message.FileName....
    Edited by: Emmanuel JORAND on Sep 29, 2008 9:23 PM
    Edited by: Emmanuel JORAND on Sep 29, 2008 10:25 PM

  • How can I send files via Bluetook from my Tour to other phones?

    How can I send files via Bluetook from my Tour to other phones?
    I have even been able to pair to the other device, but I don't see the option to send/copy/move files through Bluetooth.
    I can only send my Address book via bluetooth.
    Please help!!

    Hi and Welcome to the Community!
    See this KB:
    KB05409 Transfer a file using Bluetooth technology between two BlackBerry smartphones
    Substitute, in the KB, the appropriate instructions for your other device in place of the KB section for the receiving device. Be aware that RIM only supports BT file transfer between BBs...with other devices is technically unsupported. But, it usually works, as long as the two devices are paired, trusted to each other, and each have all of the correct BT services enabled for the configuration of the other device.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Can't send files to CS5 from Lightroom

    For some reason I can't send files to CS5 from Lightroom 5 and have no idea why. It was never a problem before. I also am not able to open files in the Nik collections from Lightroom. Any ideas?

    While in LR5. I would either right click or go to the Photo tab > Edit in > Edit in photoshop CS5, or on one of the Nik collections plug ins. And absolutely nothing happens. I tried reinstalling SC5 and LR5 with the updates. And it still doesn't work. My OS is W7. I haven't tried updating Niks collection yet.
    I have no idea what to do from here.
    Kelly

  • Looking for help for sharing pdf files with ipad from mac.  Pages only recognizes text.  What app should I use for file sharing pdf documents?

    Looking for advice on how to share pdf files with iPad from Mac.   Pages seems to only recognize text.   What app is recommended for pdf documents?

    Welcome to Apple Support Communities!
    If I understand your question, you want to read pdfs on your iPad, not create or edit.
    Drag pdf files to the iPad icon in Finder while connected to your computer via the USB cable.
    They will show up in the iBooks application
    (If you don't already have iBooks, it's a free download from the App Store.)
    Once installed, there are two buttons at the top left of the Bookshelf.
    One is Books, the other is Collections.
    Tap Collections, and you'll see Books and PDFs.
    Tap PDFs and you're there.

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • When I send emails with photos from iPhoto recipients often tell me images are upside down.  What would cause that?

    When I send emails with photos from iPhoto recipients often tell me images are upside down.  What would cause that?

    Found this :
    https://discussions.apple.com/thread/3431867?start=0&tstart=0
    by doing this :
    http://www.google.com/search?q=images+are+upside+down+ios

  • Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    Hi, I have a version of CS4 on my Mac.  I can not longer open Raw files with it from my Canon 5D.   I never had problems with it in the past.  What can I do?

    is that the eos 5d?
    if so, you only need cr 3.3 or greater.  what version do you have in your cs4? (help>about plugins>camera raw)
    if you need to update it, http://www.adobe.com/downloads/updates/

  • Sending PO with attachment from SRM to ERP

    Hi Experts,
    My requirement is to Send PO with attachment from SRM to ERP.
    I can get the attachment in the payload as mentioned in https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3509. [original link is broken] [original link is broken] [original link is broken]
    But how to post this attachment into the target ERP system so that it gets saved as an attachment in the Purchase Order.
    Thanks & Regards,
    Shobhit

    Hi Shobhit,
    I asume, the PO is send as an IDOC to ERP?
    In this case, you have no chance to attach the attachment.
    A wortkaoud would be to extract the needed date from the attachment and map the values into correcponding fields of the PO-Idoc.
    Regards Mario

  • No option to save files, content/file type missing from Applications list

    I want to be able to click a link to a file and have the option to Open the file with a specified application.
    When clicking on the file I want to Open with a specified application, I only get a Save or Cancel option.
    When I look in Preferences > Applications, the file type is missing from the list.
    This was working. It is not working anymore. It is not a problem with the website. I need to know where in the FF settings I can change this.
    FF 30.0
    Kubuntu 13.10
    Thanks

    ''Tahl [[#answer-693773|said]]''
    <blockquote>
    OP, did you ever get a solution to this problem? It's driving me nuts having to specify a download destination then go into a program to open the file I just downloaded!! Have tried deleting file types .rdf and no success either!
    </blockquote>
    I'm not sure of the solution on Windows. But this worked for me on Linux.
    I needed to edit mimeTypes.rdf
    See the links below for details. The first one was someone having a problem with Transmission. I was having a problem with ktorrent, so I just adapted that. If you're having a problem with a different file type, then you'll need to adapt it differently. But the general idea is the same.
    http://askubuntu.com/questions/384375/how-can-i-get-firefox-to-open-torrent-files-with-transmission
    http://forums.mozillazine.org/viewtopic.php?f=9&t=1706945
    Also, I suspect that FlashGot or some similar download manger plugin was responsible for screwing this up. I haven't confirmed it yet, but I've seen some things that make me suspect it.

  • Opening a file with an associated application

    Ok, I have a project where I have to open a file or files
    with the associated application on a local system. I have tried the
    "open" command in lingo, the "ApplicationXtra.x32" xtra, "BuddyAPI"
    xtra and the "FileXtra4" xtra. Each will open the application but
    none will open the file path and name sent in the argument;
    assuming any of the folders in the path or the filename itself has
    spaces in it.
    Here is an example of the code used for the lingo "open"
    command:
    open "E:\Working\PlotViews for Cleveland.dwg" with
    "E:\Program Files\ACAD2000\acad.exe"
    Here is an example of the code used for the
    "ApplicationXtra.x32":
    RunApp = new(xtra "ApplicationXtra")
    RunApp.RunApp("E:\Program
    Files\ACAD2000\acad.exe","E:\Working\PlotViewsforCleveland.dwg")
    Here is an example of the code used for the "BuddyAPI":
    ok = baShell( "open", "E:\Program Files\ACAD2000\acad.exe",
    "E:\Working\PlotViews for Cleveland.dwg" , "E:\Working\", "normal"
    And here is an example of the code used for the "FileXtra4":
    FX = new xtra("FileXtra4")
    FX.fx_FileRunApp("E:\Program Files\ACAD2000\acad.exe
    E:\Working\PlotViews for Cleveland.dwg")
    All of these crap out when there is a space anywhere in the
    path or filename. Can anyone point me in the right direction?
    Thanks for the help.

    Well, to anyone who cares....I used the ShortFileName
    function from BuddyAPI and BAM it works!

  • How to upload a file in bdc  from application server

    how to upload a file in bdc  from application server

    Hi
    Check if this is useful and reward.
    PERFORM UNIX_UPLOAD.
    FORM unix_upload.
      DATA : lv_string(600) TYPE c.
      lv_string = p_fname. "p_fname is the filename  in path
    OPEN DATASET lv_string FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc <> 0.
        MESSAGE 'File Not Found' TYPE 'I'.
        LEAVE PROGRAM.
      ENDIF.
      DO .
        READ DATASET lv_string INTO gs_gfile.
        IF sy-subrc NE 0 .
          EXIT.
        ENDIF.
        APPEND gs_gfile TO gt_gfile .
        CLEAR  gs_gfile .
      ENDDO.
      CLOSE DATASET lv_string.
      CLEAR lv_string.
      DATA: lc_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
      LOOP AT gt_gfile INTO gs_gfile .
        SPLIT gs_gfile AT lc_split INTO
                                       gs_ipfile-field1                           
                                       gs_ipfile-field2.
      ENDLOOP.
    ENDFORM.                    "unix_upload
    here gs_ipfile is the same structure as your input file to upload
    and
    gs_gfile is the work area of the internal table containing characters as :
    TYPES  : BEGIN OF  ygs_gfile    ,
              data(600)             ,
             END OF    ygs_gfile    .
    *Internal table declaration for input file as text
    gt_gfile   TYPE STANDARD TABLE OF ygs_gfile  INITIAL SIZE 0 ,
    *Work area declaration for input file
           gs_gfile   TYPE ygs_gfile                                   .
    Thanks and Regards
    A Swarna

  • Shell Script to send email with .txt file as attachment

    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!

    978334 wrote:
    Dear Al,
    Could any one help me with code, for sending email with .txt file as attachment using shell script.
    Thank You!http://bit.ly/XHfSCz
    https://forums.oracle.com/forums/search.jspa?threadID=&q=sendmail&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

Maybe you are looking for

  • Dump while running a query-LOAD_PROGRAM_NOT_FOUND

    Hi, I got following dump when executing a query. How do we fix it.? Runtime Errors         LOAD_PROGRAM_NOT_FOUND Date and Time          01/09/2008 09:54:11 Short text      Program "AQZZZ_SD_CUST===Z_SD_CUST_QRY= " not found. What happened?      Ther

  • Daisy Chaining 3 MOTU 828mkII

    Hi, guys I,m trying to Daisy Chain three 828mkII with logic pro 7.1.0 on OSX 10.3.9 with no joy. Logic reads the three 828s seperately. How can this be done in order to have more recording channels? Thanks in advance. G4 Powerbook 12"   Mac OS X (10.

  • SAP WMS with Mobile Data Entry Unit

    Hi, I understand that the transaction codes for WMS transactions using mobile data entry unit are different from the conventional way. I wonder how I can know the standard transactions and transaction codes provided by SAP for mobile data entry unit.

  • Send Email Notification only once

    I've configured my User Form to send out Email Notifications, based on whether or not a particular attribute (usually a Checkbox) is "Yes" or "No". When the checkbox is ticked, my Update-User Workflow sends out Email Notifications. The obvious proble

  • Can't Open iBook Author File - index.xml "missing"

    I've been working on a new book for about two weeks now. I've opened, closed, saved and changed it many times. I went to open the book today in iBook Author to continue adding content and I got this error message: "'Book Name' couldn't be opened. The