How do I record a sound file and send it as an attachment using my 4s?
How do I record a sound file and send it as an attachment using my 4s?
Hi,
The following is the program[Click Here| http://saptechnical .com/Tips/ABAP/email/EmailProgram.txt] which will send any format file. Actual Creator of the program is Amit Bisht.
Thanks & Regards,
Rock.
Similar Messages
-
Is it possible to zip a file and send it as an attachment in a mail?
Hi,
Is it possible to zip a file and send it as an attachment in a mail?When you use OWA in something other than IE, you're using OWA lite and no--it is not possible to do either in OWA lite (well, new Exchange stuff makes my answer a little less emphatic but still: pretty much no). Thanks Microsoft. But this guy made it possible to mark unread/read and select all/none:
http://david-burger.blogspot.com/2008/07/firefox-greasemonkey-outlook-web-access_19.html -
How to convert sap script to pdf and send it as email attachment
hi,
my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
thanks in advanceHi
See this sample code and after that use the fun module to send the mail
SO_NEW_DOCUMENT_ATT_SEND_API1
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
If you r using this function module check it once....
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
follow this link for sample program.
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
check...
How to send smart form via email
/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
Regards
Anji -
How to read an IDOC flat file and send it to XI
Hi,
I'm looking for a way to read a complicated Idoc structured flat file sent to XI by a legacy system and then pushing that data to and R/3 system. Can anyone recommend a good technique?
Thanks,
Steevehi steven....
this shud help u...
for FileXIIDoc
File->XI->IDOC (how to start?)
also check this blog for specifying adapter specific identifiers in this scenario
These are steps to follow:
STEPS IN DESIGN
1. Import idoc from the SAP System (SAP02) through imported objects.
2. Create Data Type, Message Type, Message Interface for the Outbound File.
3. Create Message Mapping with file Message and idoc (Matmas04)
5.Create Interface mapping between File Interface and the idoc.
Steps to be followed in Creation of Technical and Business System
Technical System
In SLD, click on technical landscape->New Technical System->WebAS ABAP.
Business System.
1.Goto Business Landscape->New Business System->Name the business system.
2. Choose the technical system that needs to be attached->WebAS ABAP->Technical System Name.
Preconfiguration steps for transfer of data to IDOCS
1.Create a RFC Destination in SM59 of XI Server of type.
2.In transaction IDX1 ,create a port for the client of XI server.
3. The port has to be displayed in the idx2 transaction and we should be able to view the idocs which we imported through integration repository.
Steps in Configuration
1. Goto service without party, right click->Assign a business system.
2. Choose the business system to be added.
3. Create a File Sender Service with communication channel for the same.
4. Create an idoc receiver channel under the business system. Mention the RFC Destination and the port created for the same.
5. Mention the logical Name in the Service->Adapter Specific Parameters of both the File Sender Service as well as the business system.
6. Make the Sender Agreement for theFile Sender with communication channel.
7.Create the Receiver Determination and Interface Determination for the business system.
8.Create the Receiver Agreement for the Business system.
TCODES for File>XI>IDoc
SM59-rfc destination on recving side
IDX1-port on recving side
IDX2-load metadata
Bus. service adapter specific Identifiers-->Logical sys name (check this blog:/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system )
we05-IDoc status records
BD54-Create Partner Number
We20-Create Partner Profile
and also go thru this blog...
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
hope it helps....
regards...
vishal
/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system -
How to get data from pdf file and send contents of the pdf file to R/3
Hi, experts,
Action:
1. Make a pdf forms (interactive form) with inputfield named A_inputfield in the webdynpro application and run the webdynpro application.
2. In the IE, click the save button in the pdf interactive form and save the pdf to local disk,ex: C disk. Close the IE browser.
3. Open the pdf interactive form from the local C disk and type "aaa" to the A_inputfield.
4. I want to save the "aaa" to the R/3 system using webdynpro or using other tools . How can I do it?
First way:
If I use webdynpro application to save the content of the pdf, I don't find a way mapping or binding the content to a context of a view. So I don't think this way is unadvisable.
Second way:
Adding a button "submit" in the pdf forms when create the pdf form. Runing the webdynpro application, save the pdf to local disk,ex: C disk. Opening the pdf interactive form from the local c disk and typing "aaa" to the A_inputfield, click the "submit" button to save the content. Of course, I need to finish the code for clicking "submit" button. But I don't know how to write these codes and where to write these codes. Do you give me some advise ?
Best regards,
taoHi, Abhimanyu L,
Thanks a lot for your help. Your answer can give me large developmental.:)
I find http://help.sap.com/saphelp_erp2005/helpdata/en/67/fae9421dd80121e10000000a155106/content through searching google for CL_WD_ADOBE_SERVICES class. But I don't find any exmples for the class. Do you give me some hint for some exmples for the class?
Best regards,
tao
(You can reply back to me via e-mail if you think we should discuss this internally at [email protected] or [email protected]) -
How to loop through single XML File and send multiple RFC calls?
I am looking for the best approach to use for making multiple RFC calls (can be sequential) using a single XML file of data. I have been attempting to get a BPM loop working, but to no avail. My RFC only accepts a single set of delivery input and I have been told to try to work with it as is.
input xml sample:
<?xml version="1.0" encoding="UTF-8"?>
<ProofOfDelivery>
<POD>
<delivery_number>1</delivery_number>
<carrier_name>UPS</carrier_name>
</POD>
<POD>
<delivery_number>2</delivery_number>
<carrier_name>UPS</carrier_name>
</POD>
</ProofOfDelivery>
I need to make a synchronous RFC call for each set of POD data.
Thanks in advance!Thanks for the inputs.
I tried with a BPM and multi-mapping transformation before a ForEach block. I am getting this error:
Work item 000000028028: Object FLOWITEM method EXECUTE cannot be executed
Error during result processing of work item 000000028029
com/sap/xi/tf/_ProofOfDeliveryMultiMapping_com.sap.aii.utilxi.misc.api.BaseRuntimeExceptionRuntim
Error: Exception CX_MERGE_SPLIT occurred (program: CL_MERGE_SPLIT_SERVICE========CP, include: CL_
Probably because I am not making/using the container objects properly. Here is a screenshot of my BPM. Can anyone spot my issue or point me to an example on this sort of container use?
[http://kdwendel.brinkster.net/images/bpm.jpg|http://kdwendel.brinkster.net/images/bpm.jpg]
Thanks -
Attaching Text file and sending mail
Hi all,
I am trying to attach a text file (ASCII file) and send using mail.
I am not able to get proper data in attachement.Can anyone suggest me which type should i use
to get the data in proper format.
i was using RAW file. I found we dont have specific Text format.
Its possible for XLS format, i need only text file to be attached.
Thanks,
Rajesh
Edited by: rajesh pattnaik on Apr 16, 2009 3:03 PMHi,
After bringing your final alv data in the final internal table,
go through this link , i also had an same requirement to send data after converting to excel file and
send it as an attachment to mail id outside Sap,
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/to%252bsend%252b2%252bint%252btables%252bdata%252bas%252btwo%252battachments%252bto%252bmail%252bid%252boutside%252bsap%252bsystem
I did this object and it was working fine using that function module.
Hope it helps
Regrds
Mansi -
I have just recorded on garageband and now need to send away for editing how do i place in file and send
Send where? Edit how?
-
How do I add a sound file to my iPad app?
I know absolutely nothing about working with sound files in Cocoa, so it would be great if I could get some advice on the following:
-What type of file should I be using? (I used QuickTime to record the sound clip, and that made it a .mov - should I rerecord it with something else?)
-Once I have the file ready to go, how do I get it into my xib file so the user can press a button and the app will play the sound?
Thank you!You need to know how to add a framework and resources to your project, and how to wire up a button action in IB.
I use .wav files, but only because they're compatible and common for my needs. File names are case sensitive w/iOS, so be sure they match with your code.
http://www.edumobile.org/iphone/ipad-development/playing-audio-file-in-ipad/ -
How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?
How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?
In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app. Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.
-
How to append records in a file, through file adapter.
Hi All,
How to append records in a file, through file adapter.
I have to read data from database and need to append all records in a file.
Thanks in Advance.Hi,
I think you have a while loop to hit the DB in your Process (As you said you have to fetch data from DB 10 times if 1000 rec are there)
First sopy your DB O/P to one var
and from second time append to previous data.(Otherwise you can directly use append from starting instead of copy and append)
When loop completes you can transform to File adapter Var.
Otherwise you can configure yourFileadapter such that it will aapend current records to previous records.
You can use 'Append= true' in your file adapter wsdl.
It will append previous records to current records in the same file.
Regards
PavanKumar.M -
How do I enable all sound files wav,MP3 on windows 7 64-bit change system sounds
How do I enable all sound files wav,MP3 on windows 7 64-bit change system sounds it will only give me the option to choose wav?
Windows 7 uses .wav (wave) files for the sound events. The default folder that Windows 7 uses to store the sound files in is located at C:\Windows\Media.
You cannot use a MP3 file but there are lots of (WAV to MP3 converters) available on internet which can help you to convert MP3 to wav serving your purpose of changing system sound.
//Click on Kudos and Accept as Solution if my reply was helpful and answered your question//
I am an HP employee!! -
Sound file and custom play.
Hello, I have an sound file and, want to play part's of this file not the whole sound file every time, in my application.
e.g i want to play from 1:23 min till 1:29 min can i do this in an iphone app and how?
Thanks in advance!yes i know that way, but i want to have a big sound file and keep some pointers in an array with the seconds i want, depending some user actions, the whole sound file is usable, but in different user actions different parts of it will be played! Is there a way doing that? Without splitting the file into pieces?
A similar example could be found at youtube comments when someone writes a time point...example 3:25 of the video this refers to a link and when its pressed you auto transferred to the 3:25 'th second of the video....I tried to give you a related usage...I dont know if you understand what i mean...
thanks anyway!
Message was edited by: ZaaBI_AlonSo -
How to ZIP file and send via SMTP in Oracle
Dear All,
I want to send data every month via email where the data i got from view.
The problem is the file is to big, so i should zip it.
the question is How i can perform it with procedure and send it automatically via Job every 1st month
what i've done was i create a procedure to make the file in zip
[quote/]
CREATE OR REPLACE PROCEDURE production.CREATE_EXCEL_DTKPITerminate IS
vvrun varchar2(3000);
vsender varchar2(100);
vrecepient varchar2(100);
vccrecipient varchar2(1000);
vsubject varchar2(1000);
vmessage long;
v_loc varchar2(5);
NAME: CREATE_EXCEL
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 10/15/2012 1. Created this procedure.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: CREATE_EXCEL
Sysdate: 10/15/2012
Date and Time: 10/15/2012, 9:42:40 , and 10/15/2012 9:42:40
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
begin
vsender := '[email protected]';
vrecepient := '[email protected]';
vccrecipient := '[email protected]';
vsubject := 'KPI Terminate'||TO_CHAR(SYSDATE,'MM-YYYY');
vmessage :=
'MESSAGE .';
as_xlsx.query2sheet('
select cmp_company,emp#,name,class,goucode,goudesc,job,job_name,tglkeluar
,nac_seq,nac_code,nac_type,nac_begin,nac_desc,reason,reason_code
from V_KPITerminate
--insert into blobs(blob_id,blob_name)
--values (1,as_xlsx.finish);
SEND_SMTP_PUZZLE_DTKRY(vsender,vrecepient,vccrecipient,vsubject,vmessage,as_xlsx.finish,'DataKPITerm -'||to_char(sysdate,'yyyy')||'.zip');
--as_xlsx.save( 'BASE_DIR3', 'SWT.xls' );
end;
[/quote]
when i execute this, Error ocured
Message : ORA-29278: SMTP transient error: 421 Service not available
ORA-06512 : at "SYS.UTL_SMTP", line 21
ORA-06512 : at "SYS.UTL_SMTP", line 97
ORA-06512 : at "SYS.UTL_SMTP", line 399
ORA-06512 : at "PU22PROD_123.SEND_SMTP_PUZZLE_DTKRY", line 151
ORA-29294 : A data error occurred during compression or uncompression.
ORA-06512 : at "PU22PROD_123.CREATE_EXCEL_KPITERM", line 60
ORA-06512 : at line 2
cann anyone help?
the data is too big so i prefer it zip.. can anyone help..
the SMTP I use is like this
CREATE OR REPLACE PROCEDURE production.SEND_SMTP_PUZZLE_DTKRY (pSender VARCHAR2,pRecipient VARCHAR2, pCCRecipient VARCHAR2, pSubject VARCHAR2,pMessage LONG,pattach BLOB,pfilename VARCHAR2) IS
v_src_loc BFILE := BFILENAME('BASE_DIR3', 'pajak.xls');
l_buffer RAW(54);
l_amount BINARY_INTEGER := 54;
l_pos INTEGER := 1;
l_blob BLOB := EMPTY_BLOB;
l_blob_len INTEGER;
v_amount INTEGER;
crlf CONSTANT VARCHAR2(2):= CHR(13) || CHR(10);
v_connection_handle UTL_SMTP.CONNECTION;
v_smtp_host VARCHAR2(30) := 'mail.mayora.co.id'; --My mail server, replace it with yours.
v_subject VARCHAR2(30) := 'Your Test Mail';
l_message VARCHAR2(200) := 'This is test mail using UTL_SMTP';
pcc varchar2(50);
i number := 1;
j number := 1;
l_original_blob blob;
l_compressed_blob blob;
BEGIN
BEGIN
/*Preparing the LOB from file for attachment. */
--DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
--dBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
--v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
--DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
--l_blob_len := DBMS_LOB.getlength(l_blob);
l_original_blob := pattach;
l_compressed_blob := TO_BLOB('1');
UTL_COMPRESS.lz_compress (src => l_original_blob,
dst => l_compressed_blob);
--DBMS_LOB.FREETEMPORARY(l_compressed_blob);
l_blob := l_compressed_blob;
l_blob_len := DBMS_LOB.getlength(l_blob);
/*UTL_SMTP related coding. */
v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
UTL_SMTP.MAIL(v_connection_handle, psender);
UTL_SMTP.RCPT(v_connection_handle, precipient);
if pCCRecipient is not null then
if(instr(pCCRecipient,',') = 0) then
utl_smtp.rcpt(v_connection_handle, pCCRecipient);
else
while(instr(pCCRecipient,',',i) > 0)
loop
pcc := substr(pCCRecipient,i, instr(substr(pCCRecipient,i),',')-1);
i := i+instr(substr(pCCRecipient,i),',');
utl_smtp.rcpt(v_connection_handle,pcc);
end loop;
pcc := substr(pCCRecipient,i,length(pCCRecipient));
utl_smtp.rcpt(v_connection_handle,pcc);
end if;
end if;
--UTL_SMTP.RCPT(v_connection_handle, v_cc_email_address);
UTL_SMTP.OPEN_DATA(v_connection_handle);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'FROM' || ': ' || psender || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'TO' || ': ' || precipient || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'CC' || ': ' || pCCRecipient || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'SUBJECT' || ': ' || pSubject || UTL_TCP.CRLF);
--MIME header.
UTL_SMTP.WRITE_DATA(v_connection_handle,
'MIME-Version: 1.0' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' boundary= "' || 'BASE_DIR3.SECBOUND' || '"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Body
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: text/plain;' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' charset=US-ASCII' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, Pmessage || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Attachment
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: application/octet-stream' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' filename="' || pfilename || '"' || --My filename
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
/* Writing the BLOL in chunks */
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
UTL_SMTP.write_raw_data(v_connection_handle,
UTL_ENCODE.BASE64_ENCODE(l_buffer));
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
l_buffer := NULL;
l_pos := l_pos + l_amount;
END LOOP;
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Close Email
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || '--' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
UTL_SMTP.CLOSE_DATA(v_connection_handle);
UTL_SMTP.QUIT(v_connection_handle);
EXCEPTION
WHEN OTHERS THEN NULL;
--return 1;
UTL_SMTP.QUIT(v_connection_handle);
RAISE;
END;
END;this is my smtp procedure
CREATE OR REPLACE PROCEDURE PROD.SEND_SMTP_PUZZLE_DTKRY (pSender VARCHAR2,pRecipient VARCHAR2, pCCRecipient VARCHAR2, pSubject VARCHAR2,pMessage LONG,pattach BLOB,pfilename VARCHAR2) IS
v_src_loc BFILE := BFILENAME('BASE_DIR3', 'pajak.xls');
l_buffer RAW(54);
l_amount BINARY_INTEGER := 54;
l_pos INTEGER := 1;
l_blob BLOB := EMPTY_BLOB;
l_blob_len INTEGER;
v_amount INTEGER;
crlf CONSTANT VARCHAR2(2):= CHR(13) || CHR(10);
v_connection_handle UTL_SMTP.CONNECTION;
v_smtp_host VARCHAR2(30) := 'mail.mayora.co.id'; --My mail server, replace it with yours.
v_subject VARCHAR2(30) := 'Your Test Mail';
l_message VARCHAR2(200) := 'This is test mail using UTL_SMTP';
pcc varchar2(50);
i number := 1;
j number := 1;
l_original_blob blob;
l_compressed_blob blob;
BEGIN
BEGIN
/*Preparing the LOB from file for attachment. */
--DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
--dBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
--v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
--DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
--l_blob_len := DBMS_LOB.getlength(l_blob);
l_original_blob := pattach;
l_compressed_blob := TO_BLOB('1');
UTL_COMPRESS.lz_compress (src => l_original_blob,
dst => l_compressed_blob);
--DBMS_LOB.FREETEMPORARY(l_compressed_blob);
l_blob := l_compressed_blob;
l_blob_len := DBMS_LOB.getlength(l_blob);
/*UTL_SMTP related coding. */
v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
UTL_SMTP.MAIL(v_connection_handle, psender);
UTL_SMTP.RCPT(v_connection_handle, precipient);
if pCCRecipient is not null then
if(instr(pCCRecipient,',') = 0) then
utl_smtp.rcpt(v_connection_handle, pCCRecipient);
else
while(instr(pCCRecipient,',',i) > 0)
loop
pcc := substr(pCCRecipient,i, instr(substr(pCCRecipient,i),',')-1);
i := i+instr(substr(pCCRecipient,i),',');
utl_smtp.rcpt(v_connection_handle,pcc);
end loop;
pcc := substr(pCCRecipient,i,length(pCCRecipient));
utl_smtp.rcpt(v_connection_handle,pcc);
end if;
end if;
--UTL_SMTP.RCPT(v_connection_handle, v_cc_email_address);
UTL_SMTP.OPEN_DATA(v_connection_handle);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'FROM' || ': ' || psender || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'TO' || ': ' || precipient || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'CC' || ': ' || pCCRecipient || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'SUBJECT' || ': ' || pSubject || UTL_TCP.CRLF);
--MIME header.
UTL_SMTP.WRITE_DATA(v_connection_handle,
'MIME-Version: 1.0' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' boundary= "' || 'BASE_DIR3.SECBOUND' || '"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Body
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: text/plain;' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' charset=US-ASCII' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, Pmessage || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Attachment
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: application/octet-stream' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' filename="' || pfilename || '"' || --My filename
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
/* Writing the BLOL in chunks */
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
UTL_SMTP.write_raw_data(v_connection_handle,
UTL_ENCODE.BASE64_ENCODE(l_buffer));
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
l_buffer := NULL;
l_pos := l_pos + l_amount;
END LOOP;
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Close Email
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'BASE_DIR3.SECBOUND' || '--' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
UTL_SMTP.CLOSE_DATA(v_connection_handle);
UTL_SMTP.QUIT(v_connection_handle);
EXCEPTION
WHEN OTHERS THEN NULL;
--return 1;
UTL_SMTP.QUIT(v_connection_handle);
RAISE;
END;
END;
is there a mistake? -
My computer crashed, how do I transfer all my files and apps to a new computer?
Hi All,
Please help! My computer crashed, how do I transfer all my files and apps on my iPad to my new computer?
Thanks so much,
Jeff'''Firefox''' is the name. ''Foxfire'' is a bio-luminescent fungus. <br />
[http://en.wikipedia.org/wiki/Foxfire_(bioluminescence)]
See this article for moving all your Firefox personal data to the new PC.<br />
http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile
Maybe you are looking for
-
Need help for focusing the cursor from one textbox to another textbox
hii all, I have a problem in java script. Note:The textboxes are generated dynamically.it is not having fixed length.(the number of textboxes generated may be 3,2,4....etc.it is not fixed. To move cursor from one textbox to another text box ,I have t
-
Contacts and calendar items disappear when exchange server is off
Hi All I've been having this problem for a few weeks now and it's most frustrating. My iphone is setup to sync over the air to our corporate exchange server. It seems that when the server is down for repair/patching ALL my contacts and calendar items
-
How to make a transparent text layer over a photo that scrolls?
I looked through the Adobe Inspire Magazine, and found something really astonishing: the editor's added a text-over-photo effect multiple times throughout the magazine (See http://inspire.adobe.com/, october 2014. Has to be on the iPad to see the act
-
I am running OSX Tiger 10.4.11 on an iMac G5 PowerPC from 2006. If I upgrade my hardware to a brand new Intel iMac running Mountain Lion as I am considering, how do I best migrate from my old machine to the new, problem free? I believe that I can't u
-
Constant message:"the server responded with an error"??
how do i fix a recurrent message that interferes with the use of my calendar...the message flashes constantly and says as a title: "the server responded with an error" next it says "access to apple open training in "home" in account "icloud" is not