Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Couldnt able to generate mail in HTML Format

SaroApr 20 2011 — edited May 17 2011
Hi friends,

I couldnt able to receive a mail in HTML format when a button is pressed, since im receiving only plain text email when i pressed a button.

This is the page email process query

>
 >DECLARE
 >l_mail_id NUMBER;
 >l_body VARCHAR2(4000);
 >l_body_html VARCHAR2(4000);
 >BEGIN
 >l_body_html := '<html>
 ><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 :=
 >'<h1>Laptop Request</h1>'||
 >'Employee Number: '||:P45_EMPLOYEE_NUMBER||'<br/>'||
 >'Email Address: '||:P45_EMAIL_ADDRESS||'<br/>'||
 >'Designation: '||:P45_DESIGNATION||'<br/>' ||
 >'PF Contact No:'||:P45_CONTACT_NO||'<br/>'||
 >'Address For Communication: '||:P45_ADDRESS_COMMUNICATION||'<br/>' ||
 >'Check out Date: '||:P45_CHECK_OUT_DATE||'<br/>' ||
 >'Project Assigned: '||:P45_PROJECT_ASSIGNED||'<br/>' ||
 >'Duration From: '||:P45_DURATION_FROM||'<br/>' ||
 >'Duration To: '||:P45_DURATION_TO||'<br/>' ||
 >'Status: '||:P45_STATUS||'<br/>' || 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,<br />'||utl_tcp.crlf;
 >l_body_html := l_body_html ||'  <span class="sig">The APEX Dev Team</span><br />'||utl_tcp.crlf
 >;
 >l_body := 'Request for an Laptop'||utl_tcp.crlf;
 >l_mail_id := apex_mail.send( 
 >p_to => '<xyz@gmail.com>', 
 >p_from => :P45_EMAIL_ADDRESS,   
 >p_body => l_body, 
 >p_body_html => l_body_html,
 >p_subj => 'Laptop Request With Request No' || :P45_DIS_REQ_ID
 >);
 >apex_mail.push_queue();
 >END;
 >
What might be the issue over here.

Thanks for your help

Saro.

Edited by: Saro on Apr 28, 2011 5:27 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2011
Added on Apr 20 2011
20 comments
408 views