How to send the content as HTML in email?
Hi,
I need to develop a program which sends email in HTML format.
Can u advice me how to do this????
Thanks,
Neeraj
Hi,
You simply set the doc_type to 'HTM' instead of the default 'RAW'.
Regards,
Darren
Similar Messages
-
How to read the content of html page? (written in JSP)
The same with readContent("http://www.urcompany.com/readPage.html")
The body of your topic post is not as clear as its subject.
If you want to know how to write a Java program to retreive the contents served from a URL, see http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
Also read Javadocs for java.net.URL and other relevant classes in java.net -
How to read the content of HTML table
Hi All,
I would like to retrieve the content of the following HTML table and is wondering whether there are any libraries/jars that could do the job easily without having to write a parser possibly in XSLT:
<td class="propType"><b>Address</b></td>
<td class="propType"><b>Company</b></td>
<td class="propType"><b>Department</b></td>
<td class="propType" align="right"><b>Employee</b></td>
<td colspan="6"><strong class="propType">
<td><strong>Firstname</strong></td>
<td><strong>Surname</strong></td>
<td><strong>DOB</strong></td>
<td><strong>Sex</strong></td>
<td class="even">John</td>
<td class="even">Smith</td>
<td class="even">01/02/2001</td>
<td class="even">Male</td>One awkard method is by using the stringbuffer as follows:
String greaterthanSignedList[] = greaterthanSigned.split(">")
to pickup all the text that comes after the greater than (ie ">" sign)...
String lessthanSignedList[] = lessthanSigned.split("</"</" sign) ...
However, I am sure that there must be an easier way to do this such as using existing SAX/DOM/XSLT.. jars to retrieve these values quickly.
Many thanks,
JackHi,
I am wondering if you could be a little patient with your guidance in this area. Perhaps a few points on what are some of the classes that should be used. Even an example would be terrific, if possible.
I have slowly weighing through 2 books - Learning XML by Erik T. Ray (http://www.oreilly.com/catalog/learnxml2/toc.html) and Java & XML by Brett D. McLaughlin & Justin Edelson (http://www.oreilly.com/catalog/9780596101497/toc.html) but would like to dwell into the relevant chapter and by pass anything else that is not relevant to my current in the XML area in order to fast track development.
I am new to XML and would very much appreciate if you could point to the area of specific to focus on getting this job done only.
Many thanks again,
Jack -
ADF : how to send the content of a selectInputText to a dialog
Greetings,
I have linked a selectInputText to a dialog.
I need to transmit the content of the text field to the dialog window.
Does ADF provide a simple way to to do this?Thanks.
In my case, the 'row' variable is not linked to my selectInputText.
So, row.textField does not return anything.
I tried assigning it an ID ( e.g. id="theField" ) and using it in the 'from' field ( e.g. #{theField.textField} ), but it did not work either.
What should I do? -
How to send the content of an agent (PDF Report) to local machine in 11g
Hi all,
I want to export my reports (PDF format) from an agent on a local disk.
Through an action such as javascript. After more research I do not find a solution.
Someone should track it on the subject?
Best regards,
BenOf course !
This is the javascript :
**var fso=new ActiveXObject("Scripting.FileSystemObject");**
**var maintenant=new Date();**
**var jour=maintenant.getDate();**
**var mois=maintenant.getMonth()+1;**
**var an=maintenant.getFullYear();**
**var MaDate = jour + " " + mois + " " + an;**
**var fileName = ['E:\\Extranet\\Reports\\'] + MaDate + " " + Parameter(1) + ['.xls'];**
**var fooFile = fso.CopyFile(Parameter(0), fileName, true);**
(NB : the var MaDate is just for me to specify the date in the filename)
You must also create an action to invoke the javascript. Follow the link to see an example http://hpics.li/7cf7d3e
Best regards,
Ben -
How to send the complete apex page in email.
Hi All,
I have created an apex page which contains 5 sql report region and one IR region. All these regions are dynamic. Now I have created on button to just send an email to the addresses mentioned in the process. Now I want to send this page daily as report by email. i want to display the page in the email body.
Please help me for this issue.
Thanks.
SubhashSubhash,
Here is one approach..
1. Make the report page as PUBLIC ( no Authentication required)
2. Create procedure which will pull the page content and send it to pre-defined e-mail address
2.1 Use utl_http.request to pull the page content
2.2 Store the page content in some PL/SQL variable and pass it as 'p_body_html' parameter to APEX_MAIL.SEND procedure.
3. Schedule the above procedure to run on daily using DBMS_JOB API.
I have not implemented it and its just a thought.
Regards,
Hari -
Urgent Help. How to send the email in HTML format in Version 4.6c
Hi,
Please help me how to send a mail in HTML format with logo and specified format. Is it possible to send the SAPscript or Smartform in HTML format to external mail address. The logo and the format is very important in this e-mail.
quick response will help me better.
Regards,
NaiduHere is a sample program which emails HTML in the body. Of course you can put an HTML tag in there that would point to the logo on some server(internet). Notice we are just putting the HTML code in the MAILTXT table, This is how we do it at my company.
report zrich_0002.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
start-of-selection.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
perform build_text_message.
perform build_receivers.
perform send_mail_nodialog..
* Form BUILD_TEXT_MESSAGE
form build_text_message.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
mailtxt = '<html>'.
append mailtxt.
mailtxt = '<head>'.
append mailtxt.
mailtxt = '<title>Untitled Document</title>'.
append mailtxt.
mailtxt = '<meta http-equiv="Content-Type" content="text/html;'.
append mailtxt.
mailtxt = 'charset=iso-8859-1">'.
append mailtxt.
mailtxt = '</head>'.
append mailtxt.
mailtxt = '<body>'.
append mailtxt.
mailtxt = '<div align="center"><em><font' .
append mailtxt.
mailtxt = 'color="#0000FF" size="+7" face="Arial,'.
append mailtxt.
mailtxt = 'Helvetica, sans-serif">THIS'.
append mailtxt.
mailtxt = ' IS A TEST </font></em><font' .
append mailtxt.
mailtxt = 'color="#0000FF" size="+7" face="Arial,'.
append mailtxt.
mailtxt = 'Helvetica, sans-serif"></font>'.
append mailtxt.
mailtxt = '</div>'.
append mailtxt.
mailtxt = '</body>'.
append mailtxt.
mailtxt = '</html>'.
append mailtxt.
endform.
* Form BUILD_RECEIVERS
form build_receivers.
* mailrec-receiver = '[email protected]'.
mailrec-rec_type = 'U'.
append mailrec.
endform.
* Form SEND_MAIL_NODIALOG
form send_mail_nodialog.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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 <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform.
Regards,
Rich Heilman -
How to send the file contents in the application server to ftp server
Hi,
how to send the file contents in the application server to ftp server.
regards,
sreeTest SAP FTP functions
DATA: BEGIN OF MTAB_DATA OCCURS 0,
LINE(132) TYPE C,
END OF MTAB_DATA.
DATA: MC_PASSWORD(20) TYPE C,
MI_KEY TYPE I VALUE 26101957,
MI_PWD_LEN TYPE I,
MI_HANDLE TYPE I.
START-OF-SELECTION.
MC_PASSWORD = 'password'.
DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
*-- FTP_CONNECT requires an encrypted password to work
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
ID 'DSTLEN' FIELD MI_PWD_LEN.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
USER = 'userid'
PASSWORD = MC_PASSWORD
HOST = 'servername'
RFC_DESTINATION = 'SAPFTP'
IMPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
NOT_CONNECTED = 1
OTHERS = 2.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
HANDLE = MI_HANDLE
COMMAND = 'dir'
TABLES
DATA = MTAB_DATA
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
LOOP AT MTAB_DATA.
WRITE: / MTAB_DATA.
ENDLOOP.
ELSE.
do some error checking.
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
HANDLE = MI_HANDLE
EXCEPTIONS
OTHERS = 1.
Execute external commands (FTP Scripts)
The following code shows the syntax of the FM 'SXPG_COMMAND_EXECUTE'. You pass it the external command created within transaction SM69 and it will execute it.
DATA: ld_comline
LIKE sxpgcolist-name,
ld_param LIKE sxpgcolist-parameters,
ld_status LIKE extcmdexex-status,
ld_output LIKE btcxpm OCCURS 0 WITH HEADER LINE,
ld_subrc LIKE sy-subrc.
REFRESH ld_output.
MOVE 'FTP_DATA_IN' to ld_comline. "Maintained using trans SM69
Execute external command, contained in 'ld_comline'
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = ld_comline
additional_parameters = ld_param "Params passed to script
operatingsystem
= 'UNIX'
IMPORTING
status = ld_status
TABLES
exec_protocol = ld_output
EXCEPTIONS
no_permission
= 1
command_not_found
= 2
parameters_too_long
= 3
security_risk
= 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry
= 13
jobcount_generation_error
= 14
OTHERS
= 15.
IF sy-subrc NE 0.
ENDIF. -
How long does it take for Apple to send the content code for a free upgrade to Mountain Lion?
Has anyone managed to successfully receive the content code in their email for a free ugprade to Mountain Lion?
I bought my MBP on 14 July so I qualified for the free upgrade. Went to the website and filled in the form along with my serial number about 2 nights ago. Still haven't received my content code yet. How long does it take? Should I be speaking to someone already? Who?
Thanks.We are being advised it can take up to 72 hours !
-
How to transfer the content in a StringBuffer into a InputStream
I need append the comment to the buttom of each file. I read the file into the stringbuffer first, appending the comments. After completed, how can I send the content in the StringBuffer back into a InputString in order to continue with some other file manipulation?
I saw a method StringBuffer.toString(), but nothing to transfer back to InputString
Thank you in advanceHow aboutnew StringReader(sb.toString());Since you are working with text data, you should be working with Readers instead of InputStreams.
(And if you are appending data to a file, wouldn't it be more effective to just use the version of FileWriter that allows you to append the data, instead of reading the whole file and writing the updated file back?) -
How to read the content of a text file (by character)?
Guys,
Good day!
I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
Please help me. Thank you so much in advance.
Jojohttp://java.sun.com/javase/6/docs/api/index.html
package java.io
InputStream.read(): int
Reads the next byte of data from the input stream.
Implementation:
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted. -
Help on how to read the content of an XML file from the payload
I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
Im trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
In the Bean I want to read the content of the attached XML file, it could be the order number.
The filename should then be Order number.XML.
<u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
<i><b>Frank</b></i>hi,
check this: http://jakarta.apache.org/poi/ -
How to fecth the contents of a mail from the server by using jsp
hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye.hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye. -
How to send the payload to a jsp using receiver Http adapter?
Hi experts,
I have this scenario from Legacy to XI to external app server.I have a test jsp to execute that functionality .Its a jsp which has 1 textarea named "test" and when I click on the submit buton I get a response back.This way I am able to test this independently.Now from XI when I am executing my scenario I am getting status code '1250' and message as ' http request(test) is null'.Now in the scenario in http adapter I just provide the target host : ip of server ,
service number : port no ,
path: the container or the request handler. But this scenario fails and gives me the above erroneous response.Now Basically I am not able to get how to send the value to the textarea "test"? please provide help as soon as possible.Do we have to put the name of the jsp in the "path" in http adapter and use prolog as test=.I tried this but it doesnt work.
Is there any way to check the URL that it forms after appending the querystring in the url ...?
So please provide help on this or suggest a solution to [email protected] as soon as possible.....
Thanx in advance.
Akshatahey Shekhar,
thanx for that prompt reply but I have configured the communication channel in the same manner as suggested by u.
actually I have this jsp page http://xx.xx.xx.xx:8080/abcdef/try/efg.jsp where there is a textarea "test" which has to be filled and there is a submit button.When I test this http client i.e the above jsp page independently then it goes to handler
http://xx.xx.xx.xx:8080/abcdef/trial/ And it gives a proper response message after clicking on the submit button.
now I want to carry out the same using receiver http adapter. I need to pass the value for this inputfield names "test" on that jsp . so right now I have configyured the adapter as
addressing type: url
target host : xx.xx.xx.xx
service no:8080
path : here I have given the path of handler i.e /abcdef/trial I tried giving the jsp page also but logically I guess it should be the handler.
content type: text/xml; charset=iso-8859-1
xml code: UTF-8
Mask special characters (URL escaping) checked.
now since the name of the inputfield is "test" in the prolog I gave test=
But it doesnt work I get this error "http request parameter [test] is null" in the response message which I guess suggests that it is not able to send the value for the field"test" to that handler.Please suggest how to send this and tell me if there are any other configurations that I have to do in the receiver communication channel.
Thanx ,
Akshata -
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
Maybe you are looking for
-
Not able to post a parked document in G/L
I created a G/L document using FB50. After Simulating it I parked the document. When I try to post the document using FV50, the "Post" tab is not active in the parked document. Can anyone suggest how to post this parked document? Regards
-
WRT54g connected to modem with router
Got a WRT54g connected to a cable modem which acts as a router. The WRT54g gets an IP address (192.168.1.x) from the cable modem and the WRT54g can ping and tracert to sites on the internet (from the diagnostics page). The WRT54g is acting as a DH
-
My iTunes doesn't open!! Please Help!!
The message 'iTunes has stopped working' repeatedly shows, on start up. no other suggestions work. This seems to be a common problem, its increasingly frustrating.
-
Greetings to all ! I need to create an ADF menu with Tabs in first level, and menu bar at second level, but i don't need to write all the code in a managed bean at the faces-config.xml, instead of that, i need to define a managed bean that go to the
-
Ip obtained from WAP, but cannot communicate
I have a Dell Truemobile 1150 wireless pc card. I have all of the device drivers installed (orinoco drivers and pcmcia drivers). I cannot communicate with my WAP and any device on my network. I am using dhcp and have successfully obtained an IP add