HTML format mail from UTL_SMTP

Hi ,
I am on Oracle 8.1.7 on Unix. I am using utl_smtp package to send emails from database and successfully sending plain text emails.
I want to send HTML formatted mails. How can I do that ?
Please suggest .
Regards

I have used the package bu I have not uset it to send
e-mails with HTML Format. Check from the page 1807.
UTL_SMTP
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96612.pdf
Joel P�rez

Similar Messages

  • Error when sending HTML format mail from Oracle 9i forms

    Dear All,
    i have created one procedure with 15 in parameter by which i can send mail in HTML format. due to length problem i am using 15 parameter, every parameter has length 32767, i am splitting HTML coding after every parameter length fulfilled
    when 3 or 4 parameter only fulfilled mail comes well, but more than 4 parameter fulfilled mail is not coming, will any one of you kindly please help me to resolve this
    following procedure i am using.......
    PROCEDURE P_SEND_MAIL( subject_p varchar2, salutation_p varchar2, plan_hdr_msg_p varchar2,
    plan_dtl_msg_p_1 varchar2, plan_dtl_msg_p_2 varchar2, plan_dtl_msg_p_3 varchar2, plan_dtl_msg_p_4 varchar2,
    plan_dtl_msg_p_5 varchar2, plan_dtl_msg_p_6 varchar2, plan_dtl_msg_p_7 varchar2, plan_dtl_msg_p_8 varchar2,
    plan_dtl_msg_p_9 varchar2, plan_dtl_msg_p_10 varchar2, plan_dtl_msg_p_11 varchar2, plan_dtl_msg_p_12 varchar2,
    plan_dtl_msg_p_13 varchar2, plan_dtl_msg_p_14 varchar2, plan_dtl_msg_p_15 varchar2, summary_p varchar2,
    cmplmntry_sign_msg_p varchar2, mailto_p varchar2 ) IS
    mail_from varchar2(100);
         mailhost varchar2(30) := 'MAIL-SRVR';
         crlf varchar2(10) := CHR(13)||CHR(10);
         mess_bdy varchar2(10000);
         Port number := 25;
         conn UTL_SMTP.CONNECTION;
    begin
         mail_from := 'IT-Department';
         mess_bdy := 'Date: ' ||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )|| crlf ||
         'From:' ||mail_from|| crlf ||
         'Subject:'||subject_p|| crlf ||
         'To: ' ||mailto_P|| crlf ||'' || crlf;
         conn:= utl_smtp.open_connection( mailhost, Port );
         utl_smtp.helo( conn, mailhost );
         utl_smtp.mail( conn, mail_from);
         utl_smtp.rcpt( conn, mailto_P );
         utl_smtp.data( conn, 'MIME-Version: 1.0' ||CHR(13)|| CHR(10)||
         'Content-type: text/html' || CHR(13)||CHR(10)||
         mess_bdy||salutation_p||plan_hdr_msg_p
         ||plan_dtl_msg_p_1||plan_dtl_msg_p_2||plan_dtl_msg_p_3||plan_dtl_msg_p_4||plan_dtl_msg_p_5
         ||plan_dtl_msg_p_6||plan_dtl_msg_p_7||plan_dtl_msg_p_8||plan_dtl_msg_p_9||plan_dtl_msg_p_10
         ||plan_dtl_msg_p_11||plan_dtl_msg_p_12||plan_dtl_msg_p_13||plan_dtl_msg_p_14||plan_dtl_msg_p_15
         ||summary_p||cmplmntry_sign_msg_p);
         utl_smtp.quit( conn );
    exception
         when others then
         null;
    END;

    did u encounter any error?
    Be more clear in ur saying. As i understood that - is when coming to 5th parameter u r not able to access it. Is it right?
    Message was edited by:
    USER_X

  • How to send formatted mail from form 6i

    Hi,
    There is requirment in my project to send formatted mail from form 6i.The database used in 9i.In normal form we can send normal mail.However our requirment is such that the mail content should have company logao pics and it should display data in coloured format based on data fetched from database.How can this be done.
    l

    What method are you using to send email from your form now? If you are using UTL_SMTP, you can set the MIME_TYPE = 'HTML' as Francois suggests. If you are using an OLE call to Outlook or a email JavaBean? The method you use to send email will dictate how you send Rich Text/HTML email messages.
    Craig...

  • UTL_MAIL: ORA-29279..... 501 badly formatted MAIL FROM user - no " "

    Hi guys,
    I’m trying to redesign a current process that requires a large amount of manual intervention. As such I’d like to utilise UTL_MAIL to send notifications of system events but have been unable to get it to execute on my dev database (installed on my local PC).
    O/S ver:
    Windows XP SP3
    Oracle ver:
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    I’ve configured the smtp_out_server parameter:
    SQL> sho parameter smtp_out_server;
    NAME                                 TYPE        VALUE
    smtp_out_server                  string        XXX.XXX.XXX.80:25
    And installed the required Oracle built in packages:
    SQL> @C:\oracle_builtins\utlmail.sql
    Package created.
    Synonym created.
    SQL> @C:\oracle_builtins\prvtmail.plb
    Package body created.
    No errors.
    I’ve compiled a simple test version of the code:
    CREATE OR REPLACE PROCEDURE test_email IS
    BEGIN
    UTL_MAIL.send(sender     => '[email protected]',
    recipients => '[email protected]',
    subject    => 'UTL_MAIL test subject',
    message    => 'UTL_MAIL test body');
    END;
    +/+
    SQL> @C:\procs\email_proc.sql
    Procedure created.
    However when I execute it I get the attached error(s):
    SQL> execute test_email ;
    BEGIN test_email ; END;
    *+
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 501 badly formatted MAIL FROM user - no <
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 222
    ORA-06512: at "SYS.UTL_MAIL", line 397
    ORA-06512: at "SYS.UTL_MAIL", line 608
    ORA-06512: at "SYS.TEST_EMAIL", line 3
    ORA-06512: at line 1
    I’ve also confirmed with our mail team that the sender is included in our firewall config and should not be being blocked……
    Any ideas? Does the package produce any log files / alerts that I could check or is it possible to execute in a verbose mode so I can debug?
    Thanks,
    Chris

    Welcome to the forum.
    That error comes from your SMTP server, and it indicates there's something wrong with the email address.
    You could try the following and see if that works:
    CREATE OR REPLACE PROCEDURE test_email
    IS
    BEGIN
      UTL_MAIL.send(sender => 'test <[email protected]>',
                    recipients => '[email protected]',
                    subject => 'UTL_MAIL test subject',
                    message => 'UTL_MAIL test body'
    END;
    /Some more inputs can be read here: Reg.SMTP Error while using UTL_MAIL in Oracle 10g
    Also, when you want post formatted examples, just use the {noformat}{noformat} tag before and after your examples.
    So, when you type:
    {noformat}select *
    from dual;{noformat}
    it will appear as:select *
    from dual;when you post it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How Do I Display HTML Formatted Text From A Data Table In Crystal Reports?

    I'm creating reports in Crystal XI.  The information being displayed in the reports comes from data tables where the text is formatted in HTML.
    I've worked with Crystal Reports enough to know that HTML text pulled from a data table doesn't appear in Crystal the same way it does in a web browser.  Crystal Reports ignores all the tags (...unless I'm missing something...) and just displays the text.
    Someone far more Crystal savy than I (...who I don't have access to...) came up with a Formula Field workaround that tricks Crystal Reports into displaying some basic HTML tags.  Here's that workaround:
    <!--
    stringVar TableName := ;
    TableName := Replace (TableName, "<ul>","<br> <br>");
    TableName := Replace (TableName, "<li>", "<br>   &bull; ");
    TableName := Replace (TableName, "</li>", "");
    TableName := Replace (TableName, "</ul>","<br> <br>");
    TableName := Replace (TableName, "<a", "<u><font color='blue'");
    TableName := Replace (TableName, "</a>", "</font></u>");
    TableName
    -->
    QUESTION - Does any similar workaround exist so I can display an HTML Table in Crystal Reports?  If not, is there any way to display HTML formatted text from a data table in Crystal Reports as it would appear in a web browser?

    Hi Steven,
    To display html text in Crystal Reports follows these steps.
    1. Right click on the field and select Paragraph tab.
    2. Under 'Text Interpretation' select 'HTML Text' and click OK.
    I have tried using the way,but it never works.So reply me if there is any way to solve the issue

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to SEND HTML formatted mail??

    How do I put HTML formatted text into an email I want to SEND? -- "Paste as HTML" in edit menu is dimmed, and I can't get it to un-dim... I want to paste formatted text from an HTML editor into an email... can I do this with Mail, or do I need some other app to do this?

    AHHHH
    What you can do to make HTML for Apple Mail is to make it in an HTML editor, open it with Safari use CMD+i - a new mail message will appear in a moment with the web page in the email body.
    You can't do any major editing in Mail, you'll have to go back to the HTML file. But it works.
    You can also use Copy (from a web page) and then (Edit) Paste as HTML (that what Paste as HTML is for, not for creating HTML email). You can also user Paste as HTML to copy/paste a HTML email you receive or part of a HTML email.

  • Word 2010 Send As Attachment does not send a HTML formatted mail

    Hi!
    I'm using Word 2010 to send a document by clicking File->Save & Send->Send Using E-mail->Send as Attachment.
    In the Outlook 2010  new message window I click the ribbon tab Format Text and then I select HTML as the message format.
    I continue to happily compose the HTML body and send it. On the recipient side (also Outlook 2010) the message body comes in Plain text format even tough the source email in the Sent folder is in HTML format.
    Is this a bug or am I missing something obvious?

    Hi,
    It's not a bug as I can tell, the recipient may have configured Outlook to Read all standard mail in plain text, please let the recipient check the following setting:
    Start Outlook 2010.
    Click the File tab in the Ribbon, and then click Options on the menu.
    Click Trust Center on the Options menu.
    Click the Trust Center Settings tab.
    Click E-mail Security.
    Under Read as Plain Text, check if the check box of Read all standard mail in plain text has been selected, untick it and click
    OK to save the setting.
    Send the email again to test, hopefully the recipient can receive the email as the original format.
    Good luck.
    Regards,
    Melon Chen
    TechNet Community Support

  • Error in HTML Format Mail

    I want to send mail in html format. i am using java mail api.
    but i am getting this error for my programe.
    Can nebody tell me how to send mail in html format
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream
    I think problem is somewhere in this part of code..
    InternetAddress internetaddress = new InternetAddress("[email protected]");
    InternetAddress internetaddress1 = new InternetAddress("[email protected]");
    MimeMessage mimemessage = new MimeMessage(session);
    mimemessage.setFrom(internetaddress);
    mimemessage.setRecipient(javax.mail.Message.RecipientType.TO, internetaddress1);
    mimemessage.setSubject("Posting Mail");
    mimemessage.setContent(subject, "text/html");
    Transport.send(mimemessage);

    Hi Varun .
    While going thru your code i felt that your are missing something in your code . but i did not checked it . anyways first u check that u have set your class path to the mail.jar and mailapi.jar properly. then check whetehre u have imported everything properly or not .I am attachimg my piece of code which i used recently to send mails. I hope this will work . Do get back to me after you try this block of code
    try{
    Properties props = System.getProperties();
    props.put("mail.smtp.host", "111.11.1.11");// you smtp servers ip address
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress("x@enigma"));//senders address
    msg.setSubject("Testing");//subject of mail
    msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    // Receiptents address
    String body="<html><body><H1> Welcome to Java Mail</body></html>";//creating and html body
    msg.setContent(message,"text/html");//setting the content of HTML
    Transport.send(msg);/ sending mails
    }catch (AddressException ae) {               
    System.out.println("Address Exception=="+ae);
    }catch (MessagingException me) {
    System.out.println("MessagingException"+me);
    }catch (Exception e) {
    System.out.println("Exception"+e);
    }

  • HTML Formated Email From Oracle Database

    Hello,
    I am generating email alerts from oracle 11g,10g using utl_mail.send.
    I want to genrate/send email in HTML formated.
    How i can send HTML formated email form Oracle Database (11g,10g)
    Thanks In Advance

    hi,
    inside oracle apex 10g. i am using this.
    please try
    begin
    HTMLDB_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => '[email protected]',
    P_BODY => 'test',
    P_BODY_HTML => '<table><tr><td>data</td></tr></table>' || SYSDATE,
    P_SUBJ => 'Test Email working '
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'localhost',
    P_SMTP_PORTNO => '25'
    end;
    Thanks
    LOGA
    www.go-websoft.com
    Apex Consulting & Development

  • Problem reading external HTML format from text file

    I have a text file containing html formatted text which I try to get into a textfield.
    All works fine locally and even on my localhost test server, but when uploading to the real server - I get a blank.
    Anyone have any ideas? THANKS
    The text file :
    &t2=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">Some text here</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">One more line</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">And more text here</FONT></P></TEXTFORMAT>
    and the AS code in the movie:
    viewData.onPress = function() {
         //get text
         loadText()
    var tz
    function loadText() {
    var my_lv:LoadVars = new LoadVars();
    my_lv.onLoad = function(success:Boolean) {
      if (success) {
      //trace(this.toString())
      mytext.htmlText= this.t2;
      } else {
      //trace("Error loading/parsing LoadVars.");
    my_lv.load("myfile.txt");

    Thanks kglad, I did it and it made me find the real problem:
    The text file is generated by PHP script that gets an html formated text from flash (it is an online editing part of an application):
    the AS code to call the php:
    var send_lv:LoadVars = new LoadVars();
    send_lv.t1 = "&t2="+editor.t1.htmlText+"&";
    send_lv.sendAndLoad("write.php", res_lv, "POST");
    the PHP:
    <?php
    $mydata = $_POST["t1"];
    $myFile = "recipe.txt";
    $fh = fopen($myFile, 'w') or die("can't open file");
    fwrite($fh, $mydata);
    fclose($fh);
    print "&done=done";
    ?>
    From some reason the online server adds \ before any " , but WAMP doesn't.
    here is the text generated on localhost (WAMP)
    &t2=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Comic Sans MS" SIZE="14" COLOR="#FF0000" LETTERSPACING="0" KERNING="0">local text</FONT></P></TEXTFORMAT>&
    online server:
    &t2=<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Comic Sans MS\" SIZE=\"14\" COLOR=\"#FF0000\" LETTERSPACING=\"0\" KERNING=\"0\">online text</FONT></P></TEXTFORMAT>&
    I know its not a Flash problem now, but do you have any idea?
    Thanks

  • How to send mail in  HTML  format using SMTP

    I want to send mail in HTML format using SMTP.Can anybody please suggest how to do it.Can anybody send me the code.
    Thnx.

    If you don't know how to send a message using JavaMail see here : http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.html#JavaMailSending
    To send a html format mail you need to set the content type like this (msg is a javax.mail.internet.MimeMessage) :
    String subject = "An Email 4 U";
    String message = "<HTML><BODY>Here is a link<br><a href='http://javasoft.com'>Java</a></BODY></HTML>";
    msg.setSubject(subject);
    msg.setContent(message, "text/html");p.s This isn't really an advanced topic

  • Accessing URL of links in HTML e-mail message via Services

    I'm trying to write a simple service (in Automator) so that when I right-click on a URL, I can send that URL directly to my Instapaper account (rather than opening the link in a browser, and then clicking my bookmarklet to save to Instapaper.)  I have it working for bare URLs included in the text, but I'd like to also be able to do it for hyperlinks in HTML-formatted Mail messages.  Is there a way in Automator to access the underlying URL for a link, rather than the displayed link text?  Clearly some of the built-in items in Mail's context menu (e.g. Open Link, Copy Link) do that, but I can't see how to get access to the URL in Automator.
    Thanks in advance for your help with this,
    Eric

    Hi Scott,
    "Unapealing" it is, but that doesn't get it very high on the long requirements list.
    To make it more appealing to reward points is higher up there and I think everyone would love to see that.
    Nevertheless I added it to the list.
    Best, Mark.
    P.S. On one hand I don't care about points, on the other I get teased in the office when I am not in the top ten, although with all this great contributions from you guys and girls, I am letting go of that goal. So don't bother.
    Message was edited by: Mark Finnern

  • Email html formatted (Text) printing quality issue on hp 6500a (710a)

    I experience some quality problems printing html formatted mails (not attachments, only standard text). The characters are printed with different free space between every char. There is no special sign or format. It happens from different note/netbooks/iphone.
    Pure email-Text-Printing is ok (same text), Attachment-Printing (word-doc arial text only) is ok (same text).
    The  printer has the actual firmware, alle computers and iphone are uptodate. Reset is no solution. Problems are reproducable on other hp 6500 series printers.
    See attached example

    kaaemm,
    Unfortunately, HTML formatted emails are not currently supported. They may go through and print, but results will vary. Only HTML attachments are supported at this time.
    ============================
    If I have solved your issue, please feel free to provide kudos and make sure you mark this thread as solution provided!
    Although I work for HP, my posts and replies are my own opinion and not those of HP.

  • Email in HTML format

    I have a SAP outbound scenario in which I get a value from ECC which I need to email to a distribution list.
    I was wondering if there is anyway I can send the content of the email itself (not as an attachment) in HTML.
    If yes, any useful links / steps to do would be great.
    I know that using XSLT, we can transform an XML into HTML but I donot have the data statically. The data comes from the ECC and I have to make sure to transform to include that particular value itself.
    Is there anyway I could do that ?
    Any useful links would be much appreciated.

    I know that using XSLT, we can transform an XML into HTML but I donot have the data statically. The data comes from
    the ECC and I have to make sure to transform to include that particular value itself.
    Your XSLT code should be using the actual XMl tags and no constants.....then you will get the runtime values in your Email message.....this blog describes how the code should be: /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Regards,
    Abhishek.

Maybe you are looking for

  • Deleting data from a compressed cube

    Hi Gurus, I have an info cube which is getting data fron three different DSO's (DSO1, DSO2, DSO3) and I have Aggregates to the cube and this whole process is automated in a Process chain now I have to delete the data in the cube which is getting load

  • My Audio is Out of Sync in Adobe Flash CS5.5

    When I test my movie and i see it, It's fine. But when I ctrl+enter or test the movie in SWF the audio comes early. I have mutiple audio clips in the movie but once it gets to the last audio clip it comes early. Its p***ing me off. I've tried setting

  • IE7 issue with Thumbnails div & Overflow

    this has to do with layout of the the gallery page and an IE7 CSS issue. I was playing with the Photo gallery demo and decided to resize the thumbnails div to get different shape and found an issue with IE7 and the overflow. if the tumbnail div heigh

  • Connecting TC to router, wirelessly?

    Okay, I know this has been discussed before but I'm struggling to find a really simple and novice-friendly answer. So far: I have set up TC. It's working fine. At the moment, the TC is downstairs in my living room because that's where my router is. I

  • Open Adobe Reader without Tools menu or Fill & Sign menu

    Windows 7 Ultimate SP 1 (x64) Adobe Reader XI 11.0.10 When I open a PDF file, I often get a menu down the right side of the Adobe Reader window.  Usually, it is the Tools menu; but if the PDF file is a fill-in form, I get the Fill & Sign Tools menu.