Rwclient, how to put E-mail body
Dear Gurus,
On Oracle AS, by using below comand I am able to generate reports and able to send them by Email but I would like to put Mail Body so could you please help me on this.
How to put E-mail body on this comand.
rwclient server=servicename report=reportname.rdf userid=dbusername/password@dbaliasname desformat=pdf destype=mail DESNAME=mailDESNAME=[email protected]@amazegifts.com SUBJECT="Amaze Gifts Mail"
Regards,
Satish Kumar Sadhu.
Since email messages are text-based, only some email programs allow them to be viewed with html code to add color, style changes, etc. What you need to do is read some tutorials on basic html coding. i.e. <b>BOLD</b> would show BOLD with bold lettering.
Allen
Sun Developer Support
Similar Messages
-
E mail how to put photo into body of e-mail without recipient having to click downloadload
e mail how to put photo into body of e-mail without recipient having to click downloadload
What and how an email is seen on the other person's machine is dependent on their settings and not what you do. You can, for instance, send a HTML email, but if they haven't set their machine to deal with those, it won't work. It's all down to them.
-
How is the e-mail body text determined when e-mail sent from PO in edit mod
We have an e-mail that is sent to the supplier when the buyer edits the po then goes to header-output - create and send immediately. We want to remove the SAP default Salutation
Best Regards,
Your Purchasing Company
The problem is we cannot find where this e-mail body is being created. Any ideas?
SandraHello,
The email body text that you get at SOST is from the cover form BBP_OUTPUT_COVER.
When you Order a PO, the following is the text is seen in SOST.
"&LV_TITLE&
Please find enclosed the purchase order &IV_PO_HEADER-OBJECT_ID& &IV_PO_
Kind regards,
Your purchasing company"
You can create your own cover form in order to substitute the standard BBP_OUTPUT_COVER.
Regards,
Ricardo -
How to Put a mail to designated User with txt format
Hi Friends,
I have a small in mailing concept of BDC's. Can any one check my code and tell me why my code is not poping any message in txt file. I am not getting any data in text file but the mail is getting trigerred.
here below is the code regarding mail Concept. Please help me ASAP. This is very important. Please revert where I am wrong and correct me if you can.
Points will defintely be rewarded.
* To Send a mail to the conserned user when we get the 824 detailed
DATA: V_USRID TYPE PA0105-USRID, " variable for usrid
V_SUBJECT(100) TYPE C, " variable for subject line
V_SENT_ALL(1) TYPE C. " variable to sent messages
CONSTANTS: C_U(1) TYPE C VALUE 'U', " constant for U
C_X(1) TYPE C VALUE 'X', " constant for X
C_INT(3) TYPE C VALUE 'INT', " constant for INT
C_SAPRPT(6) TYPE C VALUE 'SAPRPT'," constant for SAPRPT
C_1(1) TYPE C VALUE '1', " constant for 1
C_0(1) TYPE C VALUE '0', " constant for 0
C_B(1) TYPE C VALUE 'B', " Constant for B
C_RAW(3) TYPE C VALUE 'RAW', " constant for RAW
C_TXT(3) TYPE C VALUE 'TXT', " constant for TXT
C_ERR(30) TYPE C VALUE 'Error 824 detailed file', " constant for Obj description
C_INTFC(15) TYPE C VALUE 'Interface', "constant for Obj Name in attachment
C_F(1) TYPE C VALUE 'F'. " constant for F
DATA : T_MESSAGE TYPE STANDARD TABLE OF SOLISTI1, "Segment e1edk01
T_PACKING_LIST TYPE TABLE OF SOPCKLSTI1," table for packing list
T_RECEIVERS TYPE TABLE OF SOMLRECI1, " table for receivers
WA_PACKING_LIST TYPE SOPCKLSTI1, " work area for mail list
WA_CONTENTS TYPE SOLISTI1, " work area for contents
WA_RECEIVERS TYPE SOMLRECI1, " work area for recivers
WA_MESSAGE TYPE SOLISTI1, " work area for messages
T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
V_LINES_TXT TYPE I,
V_LINES_BIN TYPE I,
WA_DOC_DATA TYPE SODOCCHGI1. " work area for doc data
*To prepare the subject line
CONCATENATE TEXT-003 P_FILE1 INTO V_SUBJECT SEPARATED BY SPACE.
CLEAR P_FILE1.
Create Message Body
Title and Description
T_OBJTXT = 'test with dat file Attachment!'.
APPEND T_OBJTXT.
DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
READ TABLE T_OBJTXT INDEX V_LINES_TXT.
*To append the first line description
WA_MESSAGE-LINE+1(10) = TEXT-001.
WA_MESSAGE-LINE+41(20) = TEXT-002.
APPEND WA_MESSAGE TO T_MESSAGE.
CLEAR WA_MESSAGE.
*Add the recipients email address
CLEAR WA_RECEIVERS.
REFRESH T_RECEIVERS.
WA_RECEIVERS-RECEIVER = '[email protected]'."V_USRID.
WA_RECEIVERS-REC_TYPE = C_U.
WA_RECEIVERS-COM_TYPE = C_INT.
WA_RECEIVERS-NOTIF_DEL = C_X.
WA_RECEIVERS-NOTIF_NDEL = C_X.
APPEND WA_RECEIVERS TO T_RECEIVERS.
CLEAR WA_RECEIVERS.
CLEAR WA_RECEIVERS.
WA_RECEIVERS-RECEIVER = 'VSATISHRAJU'. " replace with <login name>
WA_RECEIVERS-REC_TYPE = 'B'.
WA_RECEIVERS-EXPRESS = C_X.
APPEND WA_RECEIVERS TO T_RECEIVERS.
CLEAR WA_RECEIVERS.
Describe the body of the message
CLEAR WA_PACKING_LIST.
REFRESH T_PACKING_LIST.
WA_PACKING_LIST-TRANSF_BIN = SPACE.
WA_PACKING_LIST-HEAD_START = C_1.
WA_PACKING_LIST-HEAD_NUM = C_0.
WA_PACKING_LIST-BODY_START = C_1.
WA_PACKING_LIST-BODY_NUM = V_LINES_TXT.
DESCRIBE TABLE T_MESSAGE LINES WA_PACKING_LIST-BODY_NUM.
WA_PACKING_LIST-DOC_TYPE = C_RAW.
APPEND WA_PACKING_LIST TO T_PACKING_LIST.
* **** Attachment
(pdf-Attachment)
WA_PACKING_LIST-TRANSF_BIN = C_X.
WA_PACKING_LIST-HEAD_START = C_1.
WA_PACKING_LIST-HEAD_NUM = C_0.
WA_PACKING_LIST-BODY_START = C_1.
WA_PACKING_LIST-BODY_NUM = V_LINES_BIN. "satish
WA_PACKING_LIST-BODY_NUM = V_LINES_TXT + 1 .
WA_PACKING_LIST-DOC_TYPE = 'PDF'. "comments by siva
WA_PACKING_LIST-DOC_TYPE = C_TXT. " changes by siva
WA_PACKING_LIST-OBJ_NAME = C_INTFC.
WA_PACKING_LIST-doc_size = 255 * ( V_LINES_TXT + 1 ).
WA_PACKING_LIST-OBJ_DESCR = C_ERR.
APPEND WA_PACKING_LIST TO T_PACKING_LIST.
CLEAR WA_PACKING_LIST.
*Populate the subject/generic message attributes
WA_DOC_DATA-OBJ_LANGU = SY-LANGU.
WA_DOC_DATA-OBJ_NAME = C_SAPRPT.
WA_DOC_DATA-OBJ_DESCR = V_SUBJECT.
WA_DOC_DATA-SENSITIVTY = C_F.
CLEAR : V_SUBJECT.
*Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_DATA
PUT_IN_OUTBOX = C_X
IMPORTING
SENT_TO_ALL = V_SENT_ALL
TABLES
PACKING_LIST = T_PACKING_LIST
CONTENTS_TXT = T_MESSAGE
CONTENTS_BIN = T_OBJBIN
RECEIVERS = T_RECEIVERS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
RAISE NO_MAIL.
ENDIF.
COMMIT WORK.
ENDIF.Why dont you see output type 5 in the output condition itself? You dont have to code for this.
Albert -
How to put sent mails in different folders
Hi, I just started experiencing this issue with Mail.app since I subscribed to MobileMe.
I added more than one email addresses in the mobileme account, made the folders and rules to move the received mails to their proper folders. Receiving is now well managed.
How can I do the same with the sent mails? The rules don't do exactly what I want.
When I send a mail with for example [email protected] I would like to go the sent mail in "sent test" under the [email protected] folder, is it possible?
thanks in advanceMulder is right - you can't do this with Mail.
However, there is no such thing as a unique idea... and there are a few people who can turn them into reality. Try Mail Scripts by Andreas Amann. (http://www.versiontracker.com/dyn/moreinfo/macosx/16217).
That will let you process rules against sent items.
Cheers,
Rodney
Note: Usual disclaimer when trying a new app: back things up first! -
How to put old mail on external HD maintaining it visible in mail
I all,
I need to organize my mail 5.1 on OS lion and I want to put all my old mail (ex. mail sended in 2010) on a file on external HD but I need to acces to it directly (no export and Import).
is it possible?
tanks
LucaHiya mate, first off no such thing as a stupid post. Better to ask if you're not sure!
There are a lot of variables to think about, what codec you want to edit in, i.e. HDV, IMX, ProRes then there's frame rate, 25, 29.97 etc. Best practice is to work native to with the codec you've shot. i.e. if the camera is HDV ingest at HDV. If you want work at a higher codec, ingest or transcode to that codec then work with it in FCP. FCP works best with all assets at the on the same timebase and codec.
You also have to think about disk speed and bandwidth from the external HD to Mac. FCP will only be able to handle 'x' amount of streams and layers depending on the codec.
Anyways...bsck to the question at hand. Im not sure what camera you have shot in but if its HDV you easy set up to set your project to HDV/PAL/NTSC/25/29.97, then set your scratch location to the external drive, and then save your project (make sure you have named it correctly as the scratch location aka capture scratch folder, will be named with the same name as the project). Connect up the camera over firewire then go to log and capture (cmd+8) and ingest.
Hope this helps!
Regards,
SJ -
How to put e-mail adress in the print info. selection screen i smartforms?
Hi all,
Is it possible to have e-mail adress sent to smartform with the input parameters e.g. output_options or some other, so that the e-mail adress appears in the selection screen containing printout info such as output device, page selection, print imm.?
Where should the e-mail adress be placed in the input info to smartform then?
Thanks in advance for all the helpul answers!
BR,
ArminTHANKS
-
How to put mail body while sending Payment Advice Note by mail
Hi,
I am sending payment advice form through mail using the BTE 2040.
Everything is fine and mail is coming properly but mail does not have any body line. It just contains the PDF as an attachment.
I want to put mail body in that. I have just copied the Script, I have not copied the driver program.
E.g
Hello,
Please find the payment advice note as an attachment.
Kindly advice how to put mail body in that mail, is there any BTE through which we can put the mail body?
Kindly help.
Regards
Sachin YadavHi,
I am sending payment advice form through mail using the BTE 2040.
Everything is fine and mail is coming properly but mail does not have any body line. It just contains the PDF as an attachment.
I want to put mail body in that. I have just copied the Script, I have not copied the driver program.
E.g
Hello,
Please find the payment advice note as an attachment.
Kindly advice how to put mail body in that mail, is there any BTE through which we can put the mail body?
Kindly help.
Regards
Sachin Yadav -
How to put smartform in mail body
Hi colleagues,
I would like to send a mail with content build from a SMARTFORM. I call the smartform function module and get the corresponding OTF file, but I did not succeed to put it in a readable way in the mail body.
How ot get the smartform as mail body?
My body contains this kind of data, if I do the conversion to PDF:
═䑆ⴱ⸳ഊ◢팍ਲu2030扪ഊ⽗楮䅮獩䕮捯摩湧ഊ敮摯扪ഊ㌠〠潢樍਼㰍ਥ䑥癴祰攠南䥎u2020u2020⁆潮琠䍏啒䥅删潲浡氠䱡湧⁅不ਯ呹灥 䙯湴ഊ⽓畢瑹灥 呹灥ㄍਯ䉡獥䙯湴 䍯畲楥爍ਯ乡浥 䘰〱ഊ⽅湣潤楮朠㈠〠刍ਾ㸍湤潢樍u2030扪ഊ㰼ഊ⽌敮杴栠㔠〠刍ਾ㸍ੳ瑲敡洍ਠ⽆〰ㄠㄲ⸰〠呦u2030⁂吠
㜰⸸㔠㜵㤮
and the pdf itself (I also try to attached it to the mail for test) cannot be open.
I already check a lot of thread, but cannot find any to solve this issue.
Thanks for your help.
BarbaraHi,
Refer to this link..Send an smartform as body of a mail -
How to send automatic mail and put attache file on batch file ?
how to send automatic mail and put attache file on batch file ?
START MAILTO:[email protected]?SUBJECT=PHONE%CALL^&BODY=TestingHi,
Do you want to use a batch file to create new email message (including recipients, subject and email body) with attachments? If so, I'd recommend you post your question in the Scripting Guys forum for further assistance:
https://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
Please feel free to let me know if I've misunderstood something.
Regards,
Steve Fan
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to send a mail with HTML body from Oracle
Hi Team,
Can somebody guide me how to send a mail with HTML body from oracle.
Here is the piece of code i am trying to send a mail.
procedure SEND_MAIL is
cursor c_1 is select * from table_name;
l_mail_id varchar2(40);
-- ls_mailhost VARCHAR2(64) := Mailhost;
ls_from VARCHAR2(64) := ‘[email protected]’
ls_subject VARCHAR2(200);
ls_to VARCHAR2(64);
l_mail_conn UTL_SMTP.connection;
ls_left_menu_name VARCHAR2(64);
ll_emp_num number(8);
begin
for i in c_1 loop
begin
l_mail_conn := UTL_SMTP.OPEN_CONNECTION('IP');
UTL_SMTP.HELO(l_mail_conn, 'IP');
UTL_SMTP.MAIL(l_mail_conn, LS_FROM);
UTL_SMTP.RCPT(L_mail_conn, LS_TO);
UTL_SMTP.DATA(l_mail_conn,'From: ' ||ls_from || utl_tcp.crlf ||
'To: ' ||ls_to || utl_tcp.crlf ||
'Subject: ' ||ls_subject|| utl_tcp.crlf);
UTL_SMTP.QUIT(l_mail_conn);
exception
when no_data_found then
null;
when others then
RAISE_APPLICATION_ERROR(-20000, 'Failed to send mail due to the following error: ' || sqlerrm);
end;
end loop;
end;
ThnxHi Nicolas!
Have you tried to set "Output Format" for "RAW Text" to HTM in SCOT.
If HTM is missing in your dropdown-list, you could check out table SXCONVERT2. Copy the line with category T/format TXT, and change the format from TXT to HTM. The existing function
SX_OBJECT_CONVERT__T.TXT does not need to be changed. Now you should be able to choose HTM in SCOT. You will probably need som HTML-tags in your text to make it look good.
Hope this helps!
Regards
Geir -
How to send mail body using RE_CN_RA_INVOICE interface from RECPA520
Hi ABAP Guru,
I am using a standard interface RE_CN_RA_INVOICE for tcode RECPA520 for generating pdf form and send the corresponding PDF to corresponding address maintained in Business Partner.The problem is mail is sending with attachment but there is no mail body.
Please helpYou have to convert your long string to a table of shorter strings.
There may be other ways, but one possibility is to use a loop to process you string.
while (there is something left)
put the next e.g. 1024 characters in a new row of your table
endwhile
If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right -
How to put mail ids in CC and BCC while sending mail through ABAP?
Hi all,
i have created a report which sends the output of the report to external mail ids. I want to put some email ids in CC or BCC.
Please do guide me so that i can proceed with the development.
Thanks and Regards,
Syedjust go through below code and
*& Report Z_TTTT
REPORT Z_TTTT1.
*TABLE DECLARATIONS
TABLES: SOLI.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT_B1 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
PARAMETERS: SAPID RADIOBUTTON GROUP ADDR.
SELECTION-SCREEN COMMENT 5(20) T_SAPID.
PARAMETERS: EMAIL_ID RADIOBUTTON GROUP ADDR.
SELECTION-SCREEN COMMENT 30(20) T_EMAIL.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT_B2 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 5(20) TXT_ID.
SELECT-OPTIONS: ID FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 5(20) TXT_CC.
SELECT-OPTIONS: CC FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 5(20) TXT_BCC.
SELECT-OPTIONS: BCC FOR SOLI-LINE NO INTERVALS.
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE .
*SELECTION-SCREEN COMMENT 5(20) TXT_SEND.
*PARAMETERS: SENDER LIKE SOUD-USRNAM.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
*SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-009.
*PARAMETERS: SUB_LINE(60) TYPE C.
*SELECTION-SCREEN END OF BLOCK B3.
*SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-008.
*SELECT-OPTIONS: TEXT1 FOR SOLI-LINE NO INTERVALS.
*SELECTION-SCREEN END OF BLOCK B4.
SELECTION-SCREEN BEGIN OF BLOCK B5 WITH FRAME TITLE TEXT_B5.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_ATTACH AS CHECKBOX USER-COMMAND RAD1.
SELECTION-SCREEN COMMENT 5(20) T_ATTACH.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 5(20) T_FLNAME.
PARAMETERS: P_FLNAME TYPE RLGRAP-FILENAME MODIF ID M1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B5.
*Data Declarations
DATA: MAIL_CONTENT LIKE SOLI OCCURS 0 WITH HEADER LINE,
SUBJECT_LINE LIKE SOOD1-OBJDES.
DATA : SENDER TYPE SY-UNAME.
DATA : IT_REC type SOLI OCCURS 0 WITH HEADER LINE.
*INITIALIZATION Block
INITIALIZATION.
TEXT_B1 = 'Output Specification'.
T_SAPID = 'SAP User ID'.
T_EMAIL = 'Email ID'.
TXT_ID = 'Receipient Id'.
TXT_CC = 'CC'.
TXT_BCC = 'BCC'.
TEXT_B2 = 'Receipient'.
TEXT_B5 = 'Attachment'.
T_ATTACH = 'Attachment'.
T_FLNAME = 'File name'.
* TXT_SEND = 'Sender Name'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_ATTACH <> 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-INPUT = 0. " Disable for input.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FLNAME.
PERFORM GET_FILENAME.
*start of selection Block
START-OF-SELECTION.
* LOOP AT TEXT1.
* MOVE TEXT1-LOW TO MAIL_CONTENT-LINE.
* APPEND MAIL_CONTENT.
* ENDLOOP.
**** Mail Body
MOVE 'Hi' TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
MOVE 'This is Test mail' TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
MOVE 'Thanxs' TO MAIL_CONTENT-LINE.
APPEND MAIL_CONTENT.
**** Mail Heading
MOVE 'Test Mail' TO SUBJECT_LINE.
PERFORM SEND_EMAIL TABLES MAIL_CONTENT USING SUBJECT_LINE.
*& Form SEND_EMAIL
FORM SEND_EMAIL TABLES OBJCONT STRUCTURE MAIL_CONTENT
USING TITLE LIKE SOOD-OBJDES.
DATA: RECEIVERS TYPE SOOS1 OCCURS 0 WITH HEADER LINE,
TSOOD1 TYPE SOOD1,
PACKING_LIST TYPE SOXPL OCCURS 0 WITH HEADER LINE,
OBJCONT1 type SOLI OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF AT_HEADER OCCURS 1.
INCLUDE STRUCTURE SOLI.
DATA: END OF AT_HEADER.
CLEAR: TSOOD1,
RECEIVERS.
REFRESH RECEIVERS.
MOVE: SY-LANGU TO TSOOD1-OBJLA,
'Email Notice' TO TSOOD1-OBJNAM,
'C' TO TSOOD1-OBJSNS,
TITLE TO TSOOD1-OBJDES, " rajan
'Rajan' TO TSOOD1-OWNNAM.
*loop through each ID and move them to recipient table
LOOP AT ID.
* TRANSLATE ID-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
ID-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
ID-LOW TO RECEIVERS-RECEXTNAM.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
*loop through each CC and move them to recipient table
LOOP AT CC.
TRANSLATE CC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
CC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDCP.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
CC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDCP.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
*loop through each BCC and move them to recipient table
LOOP AT BCC.
TRANSLATE BCC-LOW TO UPPER CASE.
IF SAPID = 'X'.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
' ' TO RECEIVERS-RECESC,
BCC-LOW TO RECEIVERS-RECNAM,
'X' TO RECEIVERS-SNDEX,
'X' TO RECEIVERS-SNDBC.
ELSE.
MOVE: SY-DATUM TO RECEIVERS-RCDAT,
SY-UZEIT TO RECEIVERS-RCTIM,
'U' TO RECEIVERS-RECESC,
'U-' TO RECEIVERS-RECNAM,
BCC-LOW TO RECEIVERS-RECEXTNAM,
'X' TO RECEIVERS-SNDBC.
ENDIF.
APPEND RECEIVERS.
CLEAR RECEIVERS.
ENDLOOP.
AT_HEADER = SY-DATUM.
APPEND AT_HEADER.
AT_HEADER = SY-UZEIT.
APPEND AT_HEADER.
IF SENDER EQ SPACE.
SENDER = SY-UNAME.
ENDIF.
IF P_ATTACH EQ 'X'.
PACKING_LIST-HEAD_START = 1.
PACKING_LIST-HEAD_NUM = 2.
PACKING_LIST-BODY_START = 1.
PACKING_LIST-BODY_NUM = 9999.
PACKING_LIST-FILE_EXT = 'PDF'.
APPEND PACKING_LIST.
CLEAR PACKING_LIST.
* APPEND LINES OF OBJCONT TO OBJCONT1.
* REFRESH OBJCONT.
DATA : FLNAME TYPE STRING.
FLNAME = P_FLNAME.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FLNAME
FILETYPE = 'BIN'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = IT_REC
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF IT_REC TO OBJCONT1.
* APPEND P_FLNAME TO OBJCONT1.
ENDIF.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
SENDER = 'AAB_ABAP5'
OBJECT_HD_CHANGE = TSOOD1
OBJECT_TYPE = 'RAW'
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
ATT_HEAD = AT_HEADER
ATT_CONT = OBJCONT1
PACKING_LIST = PACKING_LIST
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE .
MESSAGE 'sent successfully' TYPE 'I'.
ENDIF.
* CALL FUNCTION 'GUI_DOWNLOAD'
* EXPORTING
** BIN_FILESIZE = GV_BIN_FILESIZE
* FILENAME = 'C:\Documents and Settings\Administrator\Desktop\file'"W_FULL_PATH
* FILETYPE = 'BIN'
** APPEND = ' '
** WRITE_FIELD_SEPARATOR = ' '
** HEADER = '00'
** TRUNC_TRAILING_BLANKS = ' '
** WRITE_LF = 'X'
** COL_SELECT = ' '
** COL_SELECT_MASK = ' '
** DAT_MODE = ' '
** CONFIRM_OVERWRITE = ' '
** NO_AUTH_CHECK = ' '
** CODEPAGE = ' '
** IGNORE_CERR = ABAP_TRUE
** REPLACEMENT = '#'
** WRITE_BOM = ' '
** TRUNC_TRAILING_BLANKS_EOL = 'X'
** WK1_N_FORMAT = ' '
** WK1_N_SIZE = ' '
** WK1_T_FORMAT = ' '
** WK1_T_SIZE = ' '
** IMPORTING
** FILELENGTH =
* TABLES
* DATA_TAB = IT_REC
** FIELDNAMES =
** EXCEPTIONS
** FILE_WRITE_ERROR = 1
** NO_BATCH = 2
** GUI_REFUSE_FILETRANSFER = 3
** INVALID_TYPE = 4
** NO_AUTHORITY = 5
** UNKNOWN_ERROR = 6
** HEADER_NOT_ALLOWED = 7
** SEPARATOR_NOT_ALLOWED = 8
** FILESIZE_NOT_ALLOWED = 9
** HEADER_TOO_LONG = 10
** DP_ERROR_CREATE = 11
** DP_ERROR_SEND = 12
** DP_ERROR_WRITE = 13
** UNKNOWN_DP_ERROR = 14
** ACCESS_DENIED = 15
** DP_OUT_OF_MEMORY = 16
** DISK_FULL = 17
** DP_TIMEOUT = 18
** FILE_NOT_FOUND = 19
** DATAPROVIDER_EXCEPTION = 20
** CONTROL_FLUSH_ERROR = 21
** OTHERS = 22
* IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.
ENDFORM. " SEND_EMAIL
*& Form GET_FILENAME
FORM GET_FILENAME .
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = P_FLNAME.
ENDFORM. " GET_FILENAME -
How to put an image to any part of an e-mail using UTL_SMTP
We need to send an e-mail with the following format.
|COMPANY LOGO (JPEC IMAGE) |
| |
| |
| HTML table |
| |
| |
------------------------------------The exact format is shown here: http://postimage.org/image/76v4e5tmd/
Above the Automatic Payment Advice is the JPEG image.
How do we CONSTRUCT THIS e-mail? Our DB is a 10g R2. We use UTL_SMTP. Problem is how to insert an image to any part of the e-mail (not as a separate attachment)?
Edited by: Channa on May 24, 2012 5:51 AMYes. It is possible. Read this posts of Billy Verreynne to uderstand the MIME format.
Re: Sending HTML mail with inline/embeded images (My code is constructed on this input)
embeded image in email body in pl/sql
DECLARE
/*LOB operation related varriables */
v_src_loc BFILE := BFILENAME('TEMP', 'otn.jpg');
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;
/*UTL_SMTP related varriavles. */
v_connection_handle UTL_SMTP.CONNECTION;
v_from_email_address VARCHAR2(30) := '[email protected]';
v_to_email_address VARCHAR2(30) := '[email protected]';
v_smtp_host VARCHAR2(30) := 'x.xxx.xxx.xxx'; --My mail server, replace it with yours.
v_subject VARCHAR2(30) := 'Your Test Mail';
l_message VARCHAR2(32767) := '<html>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<body background=3D"cid:[email protected]">
..rest of mail
</body>
</html>
/* This send_header procedure is written in the documentation */
PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
BEGIN
UTL_SMTP.WRITE_DATA(v_connection_handle,
pi_name || ': ' || pi_header || UTL_TCP.CRLF);
END;
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);
/*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, v_from_email_address);
UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
UTL_SMTP.OPEN_DATA(v_connection_handle);
send_header('From', '"Sender" <' || v_from_email_address || '>');
send_header('To', '"Recipient" <' || v_to_email_address || '>');
send_header('Subject', v_subject);
--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/related; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Body
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: text/html;' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' charset=US-ASCII' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Transfer-Encoding: quoted-printable' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Attachment
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Disposition: inline; filename="otn.jpg"' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: image/jpg; name="otn.jpg"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-ID: <[email protected]>; ' ||
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);
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,
'--' || 'SAUBHIK.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);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
EXCEPTION
WHEN OTHERS THEN
UTL_SMTP.QUIT(v_connection_handle);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
RAISE;
END;Otn logo is in my database server and It will embade otn logo all over the mail body!.
Edited by: Saubhik on May 24, 2012 9:06 PM
Changed the original IP and email address. I should have done this earlier!: Saubhik on May 25, 2012 11:20 AM -
How to put smileys in my e-mails ?
how to put smileys in my e-mails ?
First, set up the character viewer in your menu bar. Open System Preferences, go to Language and Text, then Input Sources, and turn on the Keyboard/Character Viewer. You'll see a new icon at the top right of the screen. Click on it, click Character Viewer, then Emoji. Drag any icon into a new email.
Matt
Maybe you are looking for
-
ODBC, bulk inserts and dynamic SQL
I am writing an application running on Windows NT 4 and using the oracle ODBC driver (8.01.05.00, that inserts many rows at a time (10000+) into an oracle 8i database. At present, I am using a stored procedure to insert each row into the database. Th
-
What is the file attribute @ and how can I get rid of it
I converted some wav files using Roxio Toast 11 and the output AIF files have a '@' in the file permissions and are not displayed in Finder. What does the '@' mean and how can I get rid of it. Would love to know why Toast adds it but I posted a quest
-
Newbie Dynamic Group by clause
Example create table test( awhite numeric(6,0) , DMonth numeric(2,0) , Goalnumber numeric(2,0) , Objnumber numeric(2,0)); insert into test(awhite,DMonth,Goalnumber,Objnumber) values(5,6,1,1); insert into test(awhite,DMonth,Goalnumber,Objnumber) value
-
Use reference trigger for cyclic recording data
Hi, Before I start, let me briefly introduce what hardware I have and what I want to achieve. I got SCXI-1000 (Chassis), SCXI-1102C (module), SCXI-1303 (terminal block, mainly for temperature sensor input); a couple month ago I bought feedthrou
-
Is there a way to integrate voice recording in Flash and saving the recorded sound file to the user's local PC as an MP3 or WAV file? Is it possible to do this without using Flash Media Server? tnx!