as it is generated by the forum software in the above coding. The above is working perfectly as i can able to see it in the table manner with a background color.
The same thing it needs to work on in apex while clicking the button, the html table with contents has to be send as an email when an button is pressed, i tried with the below coding, but i couldnt able to see the HTML table with a background color, it is showing in the plain text only. it is not showng html table with a background color in it. This is the coding.
DECLARE
l_mail_id NUMBER;
l_body VARCHAR2(4000);
l_body_html VARCHAR2(4000);
BEGIN
l_body_html := '<html>'||
' <head><title>Report 1</title>'||
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'||
'<base href="http://erpdev01.ti.com:7777/pls/apex/" />'||
'<style type="text/css">'||
'table.apex_ir_html_export {'||
'background-color:#F2F2F5;'||
'border-width:1px 1px 0px 1px;'||
'border-color:#C9CBD3;border-style:solid;}'||
'table.apex_ir_html_export td {'||
'color:#000000;'||
'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
'font-size:9pt;'||
'background-color:#EAEFF5;'||
'padding:8px;'||
'background-color:#F2F2F5;'||
'border-color:#ffffff #ffffff #cccccc #ffffff;'||
'border-style:solid solid solid solid;'||
'border-width:1px 0px 1px 0px;'||
'}'||
'table.apex_ir_html_export th {'||
'font-family:Tahoma,Arial,Helvetica,Geneva,sans-serif;'||
'font-size:9pt;'||
'padding:8px;'||
'background-color:#CFE0F1;'||
'border-color:#ffffff #ffffff #cccccc #ffffff;'||
'border-style:solid solid solid none;'||
'border-width:1px 0px 1px 0px;'||
'white-space:nowrap;'||
'}'||
'</style>'||
'</head>'||
'<style type="text/css">'||
'body{font-family: Arial, Helvetica, sans-serif;'||
'font-size:10pt;'||
'margin:30px;'||
'background-color:#ffffff;}'||
'span.sig{font-style:italic;'||
'font-weight:bold;'||
'color:#811919;}'||
'</style>'||
'</head>'||
'<body>'||utl_tcp.crlf;
l_body_html :=
'<table border="0" cellpadding="0" cellspacing="0" class="apex_ir_html_export">'||
'<thead><tr><th id=></th><th id=></th></tr></thead>'||
'<tr><td>Employee Number</td><td>'||:P36_EMPLOYEE_NUMBER||'</td></tr>'||
'<tr><td>Reason</td><td>'||:P36_Reason||'</td></tr>'||
'<td>Position Title</td><td>'||:P36_POSITION_TITLE||'</td></tr>'||
'<td>Qualification Displayed</td><td>'||:P36_QUALIFICATION_DISPLAYED||'</td></tr>'||
'<td>Qualification Title</td><td>'||:P36_QUALIFICATION_TITLE||'</td></tr>'||
'<td>Mobile Number</td><td>'||:P36_MOBILE_NUMBER||'</td></tr>'||
'<td>Desk Number</td><td>'||:P36_DESK_NUMBER||'</td></tr>'||
'<td>Fax Number</td><td>'||:P36_FAX_NUMBER||'</td></tr>'||
'<td>Email Address</td><td>'||:P36_EMAIL||'</td></tr>'||
'<td>Effective Date</td><td>'||:P36_EFFECTIVE_DATE||'</td></tr>'||
'<td>Location</td><td>'||:P36_LOCATION||'</td></tr>'||
'<td>Type-I</td><td>'||:P36_TYPE1||'</td></tr>'||
'<td>Type-II</td><td>'||:P36_TYPE2||'</td></tr>'||
'<td>Status</td><td>'||:P36_STATUS||'</td></tr></table>'||utl_tcp.crlf;
l_body_html := l_body_html ||'<p>Thank you for your interest in the <strong>APEX MAIL</strong></p>'||utl_tcp.crlf;
l_body_html := l_body_html ||' Sincerely,
'||utl_tcp.crlf;
l_body_html := l_body_html ||' <span class="sig">The APEX Dev Team</span>
'||utl_tcp.crlf;
l_body := 'Request for an Salary Certificate Request'||utl_tcp.crlf;
l_mail_id := apex_mail.send(
p_to => '<abc@ti.com>',
p_bcc => '<bce@ti.com>',
p_from => :P36_EMAIL,
p_body => l_body,
p_body_html => l_body_html,
p_subj => 'Salary Certificate Request With Request No' ||:P36_DIS_REQ_ID
);
apex_mail.push_queue();
END;
kindly ignore div class="jive-quote" and div in the above codings too.
Why it is not generating in a table via email, what is the issue.
Thanks
Saro.
Edited by: Saro on May 17, 2011 12:50 PM