Send attachments using the utl_smtp

Hello
How can I use UTL_SMTP to send a file generated by email as an attachment. I created a MS Excel spreadsheet on an application server. I would send it as an attachment to the recipients.
OneWay is to use the uuencode in UNIX script.
But I wanted it to be sent using UTL_SMTP. Could someone please suggest a good direction?

Thank you
UDs

UDs wrote:

How can I use UTL_SMTP to send a file generated by email as an attachment.

You can not. Wrong question. SMTP is a protocol for transfer as Simple Mail Transfer Protocol. Its only purpose is to take a completed email, you connect to a mail server and forward this email to the e-mail server for delivery.

It's like a freight delivery truck. He doesn't have the cargo. In other words, it does not build an email duly filled out for your.

You must move the cargo to SMTP for delivery via the SMTP DATA command. The cargo in this context must be a valid MIME (Multipurpose Internet Mail Extensions) body.

The body contains two main parts. The header that contains data such as the subject of the e-mail, the type of mail and so on. Followed by the body that contains the actual e-mail content, including all attachments.

I suggest you read the Wikipedia link, I have provided as it explains a lot of what a MIME body is, with references to memos RFC (Request For Comments) that governs the MIME standards.

With Oracle 10.2 and later versions, a package called UTL_MAIL PL/SQL is provided which creates a MIME body for you - that oppose you create one manually for UTL_SMTP. However, UTL_MAIL is a bit primitive, as it supports only one attachment.

I created a MS Excel spreadsheet on an application server.

If it resides on the application server, then it must be transported to the layer of database for delivery by e-mail. Wouldn't it be faster to just send it via the application server itself? Unless of course it must be stored at the level of the db in all cases.

Tags: Database

Similar Questions

  • Send attachments using the uninstall function send the formula

    Don't know if it's possible...

    I have an updated registration form used as a contact using the MEASUREMENT form.

    He has a couple of fields which are files and uses of MEASUREMENT for upload to the server.

    I also use ABLE to send emails, the contents of the form to the owner of the site.

    Would I be able to send these files as attachments to this email?

    Looking at it, it seems not let me pick a form contained in attachment of the field, but I could be missing something.

    If it is possible, so if someone could tell me where I'm wrong, that would be much appreciated.

    Thank you.

    Even if the MEASURE would allow you to choose the file field´s in this purpose, of course it s quite problematic, because this information (the name of the file to be downloaded) alone does not represent the physical location of this file on your server * after * it s been downloaded - and it s the way of the full file that could be expected , and which is not determined by the value of this field in file.

    See you soon,.

    Günter

  • I'm unable to send attachments using outlook - windows7

    could someone provide a fix because I'm unable to send attachments using outlook - windows 7

    Thanks Phil

    Hi Phil,

    Are you referring to Microsoft Office Outlook or Outlook.com?

    You receive an error message when you try to sebd attachments?

    If you are referring to Outlook.com you can follow the steps suggested by Shikha_G dated 6 March 2013 , the following responses from Microsoft link:

    http://answers.Microsoft.com/en-us/windowslive/Forum/mail-email/thread-1-im-not-able-to-work-with-attachments-in/1b2d932d-C507-4a2e-b8cd-649389b46fb8

    Warning: him reset Internet Explorer settings feature might reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.

    If you are referring to Microsoft Office Outlook, please post question you on the following forum link:

    http://answers.Microsoft.com/en-us/Office/Forum?tab=QnA

    I hope this helps.

  • tried to send emails using the fast-forward button now e-mail flashes on and outside

    tried to send emails using the fast-forward button now e-mail flashes on and outside

    Please disconnect from the Internet temporarily, if necessary, by disabling a Wi - Fi connection or unplug Ethernet cable, whichever is applicable.

    In the Mail menu bar, select

    ▹ Connection Doctor window

    Look for the email account (SMTP) out in the window that opens. Double-click it. Another window opens, displaying the list of all outgoing mail accounts. We'll pick the one affected. Make a note of the settings. Click the sign to remove, and then click OK.

    Reconnect to the Internet and add the account back with the same settings.

  • I can not send attachments to the e-mail (msn, hotmail) and was told to reinstall silverlight, but I can't uninstall it, and I could not install the last update.

    Silverlight only updated [failed] and I cannot uninstall

    I can not send attachments to the e-mail (msn, hotmail) and was told to reinstall silverlight, but I can't uninstall it, and I could not install the last update. Any suggestions

    Please repost your request in the Forum Microsoft Silverlight.  Thank you! Carey Frisch

  • Cannot receive or send mail using the Windows Mail get 0x800CCC18 error number

    How can I fix the problem?
    Cannot receive or send mail using the Windows Mail get 0x800CCC18 error number
    Windows mail was working fine until about 2: 30 EST 2011-12-14 and tried to send an email and got the above error msg.

    Check with your mail service provider to make sure that there is not an intermittent interruption of service.  If you have webmail capabilities, you can also check.  Otherwise, compact and repair the database (www.oehelp.com/WMUtil/) and if that doesn't help, remove your e-mail account, close and reopen WinMail and then add it back back.  Also check 3rd party program interference such as antivirus software (see www.oehelp.com/OETips.aspx#3).

    Steve

  • Cannot send emails with photo attachments using the Hotmail account.

    Original title: Hotmail account

    I can't send emails with photo attachments, why? I can send emails without a photo accessory.

    Thank you.

    Hi Keith,

    1 are you facing the issue only when you use the Mail application to send photo attachments?

    2. the problem occurs with all the accessories of the photo?

    3. is this problem only happens with Hotmail account?

    4. you receive messages or error codes?

    5 did you a recent software or changes to the material on the computer?

    This problem can occur if the account is not properly synchronized with Mail app or due to problems with the file format of the attachment of the photo you want to send.

    Method 1:

    You can try the steps to run the troubleshooter of app, synchronize licenses, update the Windows store, and also check for Windows updates.

    What to do if you have problems with a soft

    Note: The above article contains steps to change Windows Firewall settings. Make sure that the Windows Firewall is enabled after checking the issue.

    Method 2:

    If you have installed a third-party security software, you can temporarily disable third-party security software and firewalls installed on the system and check if you can send.

    Note: Be sure to enable the security software on the computer after checking the issue.

    You can also check if you can send the photo attachment using Hotmail like webmail account.

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

  • HP J3608 Fax problem: recipient cannot hear me when sending faxes using the HP Solution Center

    Hi all

    I have problems with our HP Officejet J3608. I have explored its functionality to send the fax using Solution Center HP AIO. So I opened a word file > press print to the fax > then a dialog box appears asking you for the recipient and all other info > I enter the number of the recipient fax and press send fax > then the fax includes the number and rings > the recipient responds by saying hello, "who is this?" > I said hi, "can I have a fax tone?" > the recipient says ' Hello? Hello?? "then drops the phone.

    Then I found that the recipient cannot hear us on our part, I tested it with other recipients. The recipient is on strong talk and when I lift the phone in the device, it is always to steal it. What is the problem here?

    Take note that this is not happening when we directly dial the telephone number of the device and feeding it with a printed version.

    Thank you very much and I hope someone answer my question. This will really mean a lot.

    Depending on the machine you send your fax to depends on how he responds. Most fax machines have no phone attachments, and the 'auto response' is a parameter that allows the printer to recognize the incoming faxes and receive them automatically. What you describe is the manual answer option, in which the recipient recognized the incoming fax and must manually answer.

    In this scenario, it will depend on the machine you are sending to and whether it can receive in this same way.

    Let me know!

  • Get the error when using the UTL_SMTP function in Oracle 11 g

    Hello

    I get the error when executing a trigger e-mail code in oracle 11 g:

    I have following trigger on the temporary table:

    CREATE OR REPLACE TRIGGER temp_temp_message AFTER

    INSERT OR UPDATE ON temp_message FOR EACH LINE

    declare

    Conn UTL_SMTP . CONNECTION ;

    msg VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Insert in temp_message values ()1

    );

    When I insert the record in the table there are given the following error.

    ORA-20000: failed to send messages because of the following error: ORA-24247: access denied by access control (ACL) of network list

    ORA-06512: at the 'APPS '. TEMP_TEMP_MESSAGE', line 14

    ORA-04088: error during execution of trigger ' APPS. TEMP_TEMP_MESSAGE'

    But if I run the next plsql through sqlplus send mail successfully:

    declare

    Conn UTL_SMTP . CONNECTION ;

    MSG VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Thanks in advance.

    Yoann

    To resolve ORA-24247 you must:

    (1) create an acl (if it is not already created)

    (2) add the user privileges using the resources of the network

    (3) to use the ACL to a specific address

    This might be useful

    How to fix an ORA-24247: access denied by access control (ACL) of network list | DB tips

  • How doi send texts using the speech function without hitting the Send button?

    using the speech function in texting, how to send the text without actually pushing the Send button? When I say 'send' or 'send message' he just keeps typing

    "Hey, Siri, send a message to Bob. Siri will then ask you what you want text Bob. Once you stop dictating, Siri will ask then if you're ready to send the message. Say, "Yes." It's really very nice.

    If you are already in the message app and using speech-to-text, you must press the Send button.

  • I can not send attachments to the e-mail message no error code either

    I can not send attachments in hotmail

    I can not send attachments in hotmail

    Hey fredpomona

    they will help you in the hotmail link below forums

    http://www.windowslivehelp.com/product.aspx?ProductID=1

    Walter, the time zone traveller

  • Sending parameter using the METHOD (HTTP POST = PROBLEM WEBSERVICE)

    Hello world

    I need help here

    I tried 1 week to the code to send the parameter but the error still result

    It sends no parameter at all the

    Heres my PPC

    ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
            QObject(app)
    {
    
        m_pTranslator = new QTranslator(this);
        m_pLocaleHandler = new LocaleHandler(this);
    
        bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
        // This is only available in Debug builds
        Q_ASSERT(res);
        // Since the variable is not used in the app, this is added to avoid a
    
        Q_UNUSED(res);
    
        onSystemLanguageChanged();
    
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        qml->setContextProperty("MyApp",this);
        // Create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // Set created root object as the application scene
        app->setScene(root);
    }
    
    void ApplicationUI::post(const QString &fullName, const QString &email, const QString &password)
    {
        QNetworkAccessManager connection;
    
        QUrl url("http://www.rws.rajaspot.com/rs_usermanagementclient.php");
        QNetworkRequest req(url);
        //url.addQueryItem("parameter", "14");
    
        QByteArray postData;
    
        postData.append("method=rsnewuser&").append("fullName="+fullName).append("email="+email).append("password="+password);
    
        QNetworkReply* reply = connection.post(req, postData);
        bool ok = connect(reply, SIGNAL(finished()), this, SLOT(postFinished()));
        Q_ASSERT(ok);
        Q_UNUSED(ok);
    
    }
    
    /**
     * PostHttp::onGetReply()
     *
     * SLOT
     * Read and return the http response from our http post request
     */
    void ApplicationUI::postFinished()
    {
        QNetworkReply* reply = qobject_cast(sender());
    
        /* QString response;
        if (reply) {*/
            if (reply->error() == QNetworkReply::NoError) {
                QString result = reply->readAll();
    
                /*const int available = reply->bytesAvailable();
                if (available > 0) {
                    const QByteArray buffer(reply->readAll());
                    response = QString::fromUtf8(buffer);
                }*/
            } else {
                int errorCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
                qDebug() << errorCode << endl << reply ->errorString();
            }
    
            reply->deleteLater();
        }
    
    void ApplicationUI::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("UsernamePHP_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    

    Heres my hpp

    #ifndef ApplicationUI_HPP_
    #define ApplicationUI_HPP_
    
    #include 
    
    namespace bb
    {
        namespace cascades
        {
            class Application;
            class LocaleHandler;
        }
    }
    
    class QTranslator;
    
    /*!
     * @brief Application object
     *
     *
     */
    
    class ApplicationUI : public QObject
    {
        Q_OBJECT
    public:
        ApplicationUI(bb::cascades::Application *app);
        virtual ~ApplicationUI() { }
    public:
        Q_INVOKABLE void post(const QString &fullName, const QString &email, const QString &password);
    
      Q_SIGNALS:
                void complete(const QString &info);
      private Q_SLOTS:
                void postFinished();
    
    private slots:
           void onSystemLanguageChanged();
    
    private:
        QTranslator* m_pTranslator;
        bb::cascades::LocaleHandler* m_pLocaleHandler;
    };
    
    #endif /* ApplicationUI_HPP_ */
    

    and this is my my main.qml

    Button{
                id : button
                text : "Register"
                onClicked: {
                   MyApp.post(tf1.text,tf2.text,tfpass.text)
    
                }
                horizontalAlignment: HorizontalAlignment.Center
            }
    

    I need to send the parameter to http://www.rws.rajaspot.com/rs_usermanagementclient.php

    but its like divider by 2, the parameter 'method = rsnewuser' and the content is fullName, email, and password

    What a success, it will show on http://www.rws.rajaspot.com/rs_userclient.php but I try this error code again

    any ideas what should I do?

    Thank you

    I mean not to define QNetworkAccessManager inside the function.

    For example:

    Declare the pointer to QNetworkAccessManager in your header file (all)

    QNetworkAccessManager *connection;
    

    and then set it in the constructor of the app inside the function you or you. In the second case, you must remove QNetworkAccessManager pointer after postFinished. (connection-> deleteLater())

    connection = new QNetworkAccessManager(this);
    

    and the full code of the POST function

    ...post(const QString &fullName, const QString &email, const QString &password)
    {
        QUrl url("http://www.rws.rajaspot.com/rs_usermanagementclient.php");
    
        QUrl postParams;
        postParams.addQueryItem("method", "rsnewuser");
        postParams.addQueryItem("fullName", fullName);
        postParams.addQueryItem("email", email);
        postParams.addQueryItem("password", password);
    
        QNetworkRequest req(url);
        req.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
    
        QNetworkReply* reply = connection->post(req, postParams.encodedQuery());
        bool ok = connect(reply, SIGNAL(finished()), this, SLOT(postFinished()));
        Q_ASSERT(ok);
        Q_UNUSED(ok);
    }
    

    It may be useful

     

  • Cannot send attachments with Hotmail

    My Hotmail allow me to send attachments more - the option is grayed out - I can't even send others sent me attachments. There is none of the problems listed (virus, too). He used to work for years, and then to the subject a month ago, it is stopped.  How can I fix it?

    Hello

    The question you have posted is related to windows live and will be well suited in the Windows live forum. Click on the link below.

    Windows Live Solution Center

    http://www.windowslivehelp.com/

  • How to make appear the BCC in email, when you use the function of charms, hand

    I have sent a video about skydrive to friends but could not exercise the BCC field to send emails using the e-mail of charms, share.   Please don't tell me that it went unnoticed.  Thank you.

    Hey scottfactor,

    Unfortunately copy carbon (CC) and blind carbon copy (BCC) not currently being supported by the share to the mail scenario, you can use the Windows Mail application. If you have also installed the application SkyDrive, you can do the following:

    1. Start the Mail application
    2. Compose a new message
    3. Open the App bar
    4. Select attachments
    5. In the upper left corner of the file picker, select files
    6. Scroll and select SkyDrive

    Now you can select the video that you've uploaded to SkyDrive and share with your friends!

    -Chris

  • ADF mobile: how to download a file by using the adapter remains api

    Hello

    I want to download files using the adapter. How would download files like PDFs, images (png, jpg...) etc... Some code would be appreciated.

    Thank you

    Ok

    After days of headaches, there is a way to send files using the adapter and the code above for the side server. Even if it's a big fall in mobile ADF perspective they have no api for this.

    To download a txt file, you can simply copy and paste the text file into a string and have the string supplemented with appropriate limit values and padding values ('\r\n') before and after the string.

    To transfer a binary file, you must convert the file to a base64 string, then put it in the form mentioned above.

    then you can send it as follows:

    restAdapter.send (fileString);

    Don't forget to add the appropriate headers.

    content type

    and

    definitions of values to the limits

Maybe you are looking for

  • Problems of loading Safari Web sites

    I use OS X Yosemite 10.10.5 on an old iMac with Safari as my browser, but Firefox as an occasional alternative.  It is now very slow loading Web sites and sometimes does not allow access to all.  I can't use Firefox at all! It worked fine until a cou

  • HP Envy M6: Stop BIOs Code

    I'm trying to get into my BIOs and do not remember the password since its been about 2 years since I have read the manual and I get the stop code 95402496.

  • LabVIEW 5.0 (Yes, 5.0!) Properties of VI?

    I am responsible to bring up ancient testbed which is running off LabVIEW 5.0.  I have to stay with 5.0.  I can't update the software to a version more modern. The man who wrote the original code went very far to make it very difficult to modify the

  • LaserJet P2055dn

    The mechanics of the plateau of the envelope has a problem.  He won't shoot an envelope into the printer to print an address.  He goes through the motions but will not seize the envelope.  If I put one or 8 envelopes into the tray, it makes no differ

  • tuning rules and Notifications foglight 5.5.8

    HelloI'm new to Foglight. Currently, I have included in databases Oracle Foglight 5 of which 4 are in cars and a single stand alone on other instances of SQL Server side 8. Every day I get more than 10,000 alarms of critical alarms and warnings. I wo