Can i send cloab data from UTL SMTP WRITE RAW DATA?

hi
here is my code to send email from oracle as attachment using demomail package provided by oracle----
create or replace procedure html_mail(
p_sender varchar2, -- sender, example: 'Me <[email protected]>'
p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
p_subject varchar2, -- subject
p_text varchar2, -- text
p_filename varchar2, -- name of html file
p_blob blob -- html file
) is
conn utl_smtp.connection;
i number;
len number;
BEGIN
conn := demo_mail.begin_mail(
sender => p_sender,
recipients => p_recipients,
subject => p_subject,
mime_type => demo_mail.MULTIPART_MIME_TYPE);
demo_mail.begin_attachment(
conn => conn,
mime_type => 'application/csv',
inline => TRUE,
filename => p_filename,
transfer_enc => 'base64');
-- split the Base64 encoded attachment into multiple lines
i := 1;
len := DBMS_LOB.getLength(p_blob);
WHILE (i < len) LOOP
IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
ELSE
UTL_SMTP.Write_Raw_Data (conn
, UTL_ENCODE.Base64_Encode(
DBMS_LOB.Substr(p_blob, (len - i)+1, i)));
END IF;
UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
END LOOP;
demo_mail.end_attachment(conn => conn);
demo_mail.attach_text(
conn => conn,
data => p_text,
mime_type => 'text/csv');
demo_mail.end_mail( conn => conn );
END;
Above i m using
p_blob blob -----to send message as attachment now i have table containg data into clob format nw if i send it as it is just changing coulmn from Pblob--- Clob
then it gives me error at UTL SMTP WRITE RAW DATA...
for that i do wrkaround as i m taking data from table as clob convert it to blob and
send as attachment ...
can any one guide me little that is this approcah proper?do i really need to convert data from clob to blob?
bcause in 10g Mail UTL_MAIL raw attachment i have limitation on size of email.attachment........

> still no email comes. No error as well.
SMTP itself is straight forward. It is a delivery protocol. And very easy to implement. Which is what UTL_SMTP does - without bugs or errors (none to my knowledge and experience using UTL_SMTP extensively for a long time now).
The problems experience are 50% of the time, incorrectly using SMTP. The other 50% of the time, incorrectly constructing a Mime Internet Message Body for SMTP to deliver. Both are issues that the caller (app code using UTL_SMTP) needs to address.
As UTL_SMTP is program-driven, it is not that easy to play with and debug the conversation with the SMTP server - and figure out just what the SMTP server expects, not like, disallows, etc.
In order to make sure that you are having a proper/valid conversation with the SMTP server, do it interactively using a telnet session on the Oracle server platform. All you do with telnet is to send the very same PL/SQL coded SMTP commands and parameters to the SMTP server - but interactively.
E.g.
/home/billy> telnet mail 25
Trying 165.143.128.194...
Connected to mail
Escape character is '^]'.
220 mail Tue, 13 May 2008 11:20:59 +0200
HELO 10.251.93.58
250 mail: Hello [10.251.93.58]
MAIL FROM:<[email protected]>
250 <[email protected]>: Sender Ok
RCPT TO:<[email protected]>
250 <[email protected]>: Recipient Ok
DATA
354 mail: Send data now. Terminate with "."
Subject: Test Message
This is a test e-mail.
250 mail: Message accepted for delivery
QUIT
221 mail closing connection. Goodbye!
Connection closed by foreign host.
/home/billy>
Simply substitute the SMTP parameters you use in your PL/SQL calls to UTL_SMTP above. And use the same SMTP command sequence as you do in your code.
Note that in the above case, the SMTP server quite happily accepted incorrect and undeliverable sender and recipient addresses. Which means that the e-mail will wind up in the Big Bit Bucket In The Sky. No errors.

Similar Messages

  • Whts size limit of UTL MAIL VARCHAR2 can i send large mail from utl mail?

    hi
    i like to send email from oracle as attachment
    is there any facility to send large email from oracle UTL MAIL utlity
    and i want to attach my file to email which is on server at particular
    can i attach file directly from server?

    See, http://www.psoug.org/reference/utl_mail.html
    might help you.

  • SAP BO XCelsius : Drilldown from pie chart to raw data ( Excel Spread Sheet) in Xcelsius

    Hi,
    I am working on a dashboard where my requirement says, Drill down data from Pie-Chart to Raw data ( Excel Spread sheet).
    Clicking on one pie should show me the required data in Excel format
    May I know if this is possible to create from Dashboard design tool SAP R4
    Thanks
    Javeed

    Hi Javeed,
    Drilling data from pie charts is very much possible. The data drilled down can be shown either in spread sheet format via components called "Scorecard" "List View". But if its specified that you need the current data drilled down to a separate excel spread sheet only then, you may need to use the third party components for it.
    There are many such components available for free. There are components available which are paid as well. You will have to find out which ones are free. Check out the threads below.
    How to export data out of Xcelsius to Excel
    CSV Connector
    http://pentaho-bi-suite.blogspot.sg/2013/12/exporting-table-component-to-excel-or.html
    Export Data from Dashboards | Just-BI | Business Intelligence
    SAP Dashboard Components - Multi Colour Column Chart, Hierarchical ComboBox &amp; Export To Excel Manufacturer from Beng…
    SAPexperts | Give Dashboard Users the Ability to Export Data to Excel at Run Time
    I hope this derives you to come conclusion.
    Thanks,
    Sara

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Can i send email directly from bridge cs6 and cc ?

    hi
    can i send emails directly from bridge cs6 or cc directly from bridge?
    i found this scripts http://kb2.adobe.com/community/publishing/894/cpsid_89450.html
    but i run cs6 and cc under windows 7 sp1 64bit and windows 8.1 64bit
    and i have thunderbird email client
    is there a way to make it work?
    maybe i can install another email client
    thanks

    // consult MAILSEND in here: https://github.com/muquit/mailsend and download the app 'mailsend.exe' for windows7 in here:
    // https://github.com/muquit/mailsend/releases/download/1.17b15/mailsend1.17b15.exe.zip
    // unzip it and put the app .exe where you want to use it.
    // I have tested using Bridge to send e-mail using my gmail e-mail account and it works. I only needed to 
    // I needed to send e-mails from Bridge using my google account, but first I needed to put on my network the app 'mailsend.exe'(i'm using PCs windows7 , CS6 and a network)
    // All my 20 people team is using it, so I decided to put the app 'mailsend.exe' on a common place on network. I you are using it only on 1 PC you don't need you can put it on its disk.
    // Solution: All you need is to create a bat file that tells 'mailsend.exe' what to do:
    var mailsendBat=File(Folder.temp +"/mailsendBat.bat"); // creates a bat file on the temporary folder
    mailsendBat.open("w")
    // the place where app 'mailsend.exe' file is
    mailsendBat.writeln('"X:\\[someFolder]\\mailsend.exe" \^');
    // my gmail
    mailsendBat.writeln('-t [email protected] -f [email protected] \^');
    // the title can have encoding or not (-enc-type "base64")
    mailsendBat.writeln('-cs "utf-8" -mime-type "text/plain" -enc-type "base64" -sub "Ich lerne seit ungefähr zwei Jahren Deutsch" \^');
    // this works for the smtp gmail
    mailsendBat.writeln('-starttls -port 587 -auth -smtp smtp.gmail.com -user "[email protected]" -pass "[myPassword]" \^');
    // If I want to send an image attachment I use this 1, 2, or more times. If content-type is "multipart/mixed" the inline images don't work. Instead the images will be sent as attachment.
    mailsendBat.writeln('-content-type "multipart/mixed" -attach "C:\\Users\\Public\\imagens\\myImage.jpg" \^');
    // this is the line to send a simple text line with no encoding specified
    mailsendBat.writeln('-enc-type "none" -mime-type "text/plain" -M "one line attachment 1" \^');
    // you can sen inline html that can also have links to inline images
    mailsendBat.writeln('-mime-type "text/html" -enc-type "none" -M "<b>this is a test</b><br><img src="http://[any_online_image.jpg],image/jpeg,i">" \^');
    // sending text line with special encoding
    mailsendBat.writeln('-cs "utf-8" -mime-type "text/plain" -enc-type "base64" -M "Ich lerne seit ungefähr zwei Jahren Deutsch" \^');
    // endind it
    mailsendBat.close();
    // executing
    mailsendBat.execute();
    // there are also other kind of commands (consult https://github.com/muquit/mailsend)

  • Can't send mail, get message: the smtp server rejected the password. I tried lock and unlock keychain. I tried unlock captcha. Gmail works okay, it is Mail that does not. Help!! :(

    Can't send mail, get message: the smtp server rejected the password. I tried lock and unlock keychain. I tried unlock captcha. Gmail works okay, it is Mail that does not. Help!!

    Hi
    You need to check with your ISP whether or not the send mail server (SMTP) requires a password.  Some do, but many do not.  When you know the correct password to send mail, then you need to tell Mail as follows:
    Mail menu > Preferences > Accounts > Select the account
    Click on the Outgoing Mail Server (SMTP) combo box, and select Edit SMTP Server List...
    In the Account Information tab put the server name
    In the Advanced Tab, set up the authentication information from your ISP.
    Good luck
    Bob

  • How to load data from UTL file to database

    Hi All,
    I am new in this technologies.
    I am facing below problem to load data from utl file to database .
    below is the script written by me :
    CREATE OR REPLACE PROCEDURE load_data AS
    v_line VARCHAR2(2000);
    v_file UTL_FILE.FILE_TYPE;
    v_dir VARCHAR2(250);
    v_filename VARCHAR2(50);
    v_1st_Comma NUMBER;
    v_2nd_Comma NUMBER;
    v_deptno NUMBER;
    v_dname VARCHAR2(14);
    v_loc VARCHAR2(13);
    BEGIN
    v_dir := ':f/rashi/dataload';
    v_filename := 'fake.txt';
    v_file := UTL_FILE.FOPEN(v_dir, v_filename, 'r');
    LOOP
    BEGIN
    UTL_FILE.GET_LINE(v_file, v_line);
    EXCEPTION
    WHEN no_data_found THEN
    exit;
    END;
    v_1st_Comma := INSTR(v_line, ',' ,1 , 1);
    v_2nd_Comma := INSTR(v_line, ',' ,1 , 2);
    v_deptno := SUBSTR(v_line, 1, v_1st_Comma-1);
    v_dname := SUBSTR(v_line, v_1st_Comma+1, v_2nd_Comma-v_1st_Comma-1);
    v_loc := SUBSTR(v_line, v_2nd_Comma+1);
    DBMS_OUTPUT.PUT_LINE(v_deptno || ' - ' || v_dname || ' - ' || v_loc);
    INSERT INTO don
    VALUES (v_deptno, UPPER(v_dname), UPPER(v_loc));
    END LOOP;
    UTL_FILE.FCLOSE(v_file);
    COMMIT;
    END;
    show error
    I am getting the below errors:
    LINE/COL ERROR
    3/8 PL/SQL: Item ignored
    3/8 PLS-00201: identifier 'UTL_FILE' must be declared
    15/1 PL/SQL: Statement ignored
    15/1 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    20/1 PL/SQL: Statement ignored
    20/19 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    36/1 PL/SQL: Statement ignored
    LINE/COL ERROR
    36/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    could anyone please advice me on above error.
    thanx.

    First of all, is file located on (or is accessible from) database server? If not - you can't load it neither with UTL_FILE nor with external table. You need to use client side tool like SQL*Loader or write your own client side load. If file is accessible from database server, then, as sb92075 noted, external table (assuming you are not on some ancient Oracle version) is the way to go.
    SY.

  • Can we send .csv file from sap srm system to sap pi?

    Hi Experts,
    we have 3 options send the data from sap systems to sap pi.i. e.proxy,idoc and rfc only
    How can we send .csv file from sap srm to sap pi?
    Regards,
    Anjan

    Anjan
    As you know SAP SRM and SAP PI are different boxes.
    *_Option 1:_*
    we need a shared AL11 directory in between SAP SRM and SAP PI (Ask basis to setup shared folder). Place / Populate the file in the folder from SAP SRM and then it can be picked through sender file communication channel.
    In this case you (Basis team) will share one folder which is visible from the AL11 transaction of both the systems (SRM and PI). You will drop .csv file using some report or program from SRM at this location and from PI you can read that file using File communication channel (NFS mode).
    Option 2:
    Setup a FTP at SRM environment and expose some folder which can be accessible from PI. Use sender file communication channel at PI end to pick the file.
    You can use this option incase sharing of folder is not possible (due to network / other constrains). Here FTP server is required to expose any folder as FTP so as it can be accessible from internet (remote location). You need to expose some folder at SRM machine.  You will drop .csv file using some report or program from SRM at this location. Now PI can fetch the file from that location using  sender file communication channel (FTP Mode) providing user credentials.
    Hope it clears now.
    Regards
    Raj

  • I can't send e mails from my me account

    I can't send e mails from my me account

    can you recieve them?
    are your email accounts smtp settings set acording to the mail providers requirements?

  • Can't send AOL email from Apple mailbox.

    Rebuilt mailbox, rechecked settings, Followed directions in Apple support and went through all preferences, but still can't send aol mail from Apple mailbox. I get the message," Can not send mail using the server smtp.aol.com:psyxprt". I can send email if I go through Safari and then to aol. Can receive mail. We have Verizon cable, if that is important. I'm about 4 hours into trying to fix this. Help!!!!!

    Instead of accessing your AOL mail via Safari, setup your AOL account using Mac Mail.
    http://help.aol.com/help/microsites/microsite.do?cmd=displayKC&docType=kc&extern alId=72841
    v10.4.11 is a very oudated OS X so it's not going to work on Safari.
    Firefox no longer supports OS X v10.4.11 which is why it's crashing.

  • Send iCloud email from alternative smtp server?

    How do I send iCloud email from alternative smtp server? The setting is 'greyed out' on my iPhone so I cannot tell iCloud to use another server.
    The reason is so I can have my outgoing email appear from my own domain email address rather than my me.com address. Mobileme would allow this - and Mail on the Mac does allow it, but the iPhone under iOS 5 seems not to allow it....
    Any ideas?

    I have spent about 4-6 hours working directly with folks from Tim Cooke's office, various support levels, and through them their engineers.
    As much as I tried to convince them their logic is flawed, the engineers for iCloud come back and say this is expected behavior because somehow it helps secure iCloud from being a spam source. The fine and helpful gentleman from Cooke's office now understands how it is a MobileMail.app client issue, having nothing to do with iCloud servers (because we are in fact trying to bypass their servers) still totes the "it's expected behavior" line from the server engineers.
    I have implored him to follow up with the iOS MobileMail app programmers and not the iCloud programmers. I am hopeful he will. Until then you have to choose between having iCloud push and losing your online identity, or losing push email and keeping your preferred address.
    Fun to try: turn off all smtp servers. Send email. Gets stuck in outbox. Turn on your preferred smtp server. That one email will use your preferred alternate address, but subsequent ones revert back to the old .me.com smtp servers. Personally I believe this points to a client programming error more than reinstating a preferred behavior. Aggravating!
    I spend $500 on a new phone. Google takes away my exchange client ability and apple makes me choose push email vs outgoing email address.

  • Can i send a email from application without using exchange server?

    Hello
    I am developing a 3 tier application using EJB, JSP....and i want to incorporate the mail sending facility.
    Can i send a email from the application without using exchange server?
    plzz help!!!!
    Pavan

    You will require some kind of SMTP server to be able to send mail from your app (not necessarily M$ exchange.) Just look for mail servers for the platform of your choice.
    Vijayan

  • How can i send simple message from PC-to-another device

    How can i send simple message from PC-to-another device
    just simple message (like command String) not SMS or Data File.
    I have a computer with bluetooth and the oter side is Embeded Blue
    Thanks.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • HT4759 what can i send my pictures from my iphone to my computor?

    what can i send my pictures from my iphone to my computor

    Hello binhajj,
    It sounds like you are trying to transfer photos from your iPhone to your computer.  There are several ways you can do this.
    First, you can directly connect your iPhone to your computer using your USB cable to import photos.  The following article outlines the steps to import photos using this method:
    iOS: Import personal photos and videos from iOS devices to your computer
    http://support.apple.com/kb/ht4083
    Alternatively, you can set up iCloud on your iPhone and your computer, and use My Photo Stream to import the photos automatically: 
    What do I need to use My Photo Stream?
    To use My Photo Stream you need an iCloud account, compatible devices, and up-to-date software:
    iPhone, iPad, or iPod touch with iOS 5.1 or later
    Mac with OS X Lion v10.7.5 or later and iPhoto 9.2.2 or Aperture 3.2.3 or later
    Apple TV (2nd generation) with Apple TV Software Update 5.0 or later
    PC with Windows 7 or later and the iCloud Control Panel 2.1 or later for Windows
    For complete iCloud setup instructions, visit How to set up iCloud.
    How do I turn on My Photo Stream?
    After your devices are up-to-date and you have set up your iCloud account, it’s easy to turn on My Photo Stream on any of your devices:
    iOS devices: Go to Settings > iCloud > Photos (Photo Stream in iOS 6), then turn on My Photo Stream.
    Mac: Go to System Preferences > iCloud, then select the checkbox for Photos (or Photo Stream). Click the Options button and verify that the My Photo Stream checkbox is selected. Open the application you want to use with Photo Stream (iPhoto or Aperture) and confirm that My Photo Stream is turned on in that application. You can also adjust your My Photo Stream settings in iPhoto or Aperture Preferences.
    PC: Open the iCloud Control Panel for Windows and select the checkbox for Photos (Photo Stream in iCloud Control Panel 2.x). You can click the Options button to verify that My Photo Stream is enabled and adjust the settings. Be sure to click Apply when done.
    iCloud: My Photo Stream FAQ
    http://support.apple.com/kb/HT4486
    Lastly, if you are just wanting to transfer a few photos, you can use the steps in the following resource to email the photos from yourself to yourself so that you can access them on your computer:
    iPhone User Guide - Share photos and videos
    http://help.apple.com/iphone/7/#/iph3d2676c9
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT2736 How can I send a playlist from my library to my friend?

    How can I send a playlist from my Library to my friends phone.  She uses itunes on her phone. I thought that itunes used to do that, I remember it being somewhere on the program. Now when I would like to do it I can't find it.

    First get iTunes on your PC. Then plug your iPod in and go to the music, yo. You Cannot sync playlist if you select to sync your entire library. But you can sync playlists of you choose to sync selected songs.
    You can also create a playlist on your iPod just by holding the center button on a song and select add to "on the go". This " on the go" is a playlist and will be transfers to your PC if you plug your iPod in again.

Maybe you are looking for

  • N9 Font too small!!

    I received my N9 three days ago and i am so disappointed at the font size. The fonts are way too small and totally unacceptable! I sold my Nokia 700 because the font on that device was so small i just couldn't use it and bought the N9. I figured the

  • How do I make a clip from a finished DVD to post online?

    I would like to make a clip (30 seconds??) from a DVD I made. I would like to show the menus and how they navigate to the DVDs content (main movie). I need to post the clip on my website. Can someone get me going in the right direction? I know how to

  • Print 6 Slides per Page

    Is it possible to have Keynote print 6 slides per page the way PowerPoint for Windows does (3 slides in each of two columns on the page), rather than 6 slides vertically along the left side of the page?

  • It is very urgent

    hi all, in a function module BAPI_MOSRVAPS_GETLIST2  which field we have to use the source plant field (DTL_SAP_PLANT)                                           kiran

  • Someone family with JDom please come in!

    setDocType() doesn't work! The result file hasn't any doctype! Code like below: JDOMSource source = new JDOMSource(new Document(root).setDocType(docType)); StreamResult result = new StreamResult(file); TransformerFactory.newInstance().newTransformer(