Sending formatted email

Hi,
I am using oracle 10.2.0.4 database
Is there any one who can guide me that how to send a formatted email from oracle using UTL_SMTP package. For example, if i query dba_data_files view as follows
select file_name,bytes,autoextensible from dba_data_files;
Query returnts me a number of rows and i want to send this result through email same in the table format in which the query returns the result.
Thanks in advance.

Salman Qureshi wrote:
Is there any one who can guide me that how to send a formatted email from oracle using UTL_SMTP package. For example, if i query dba_data_files view as follows
select file_name,bytes,autoextensible from dba_data_files;You need to format a HTML mail - and format the contents of that query as a HTML table.
Do you know HTML? If not, use a search engine and research how to construct a HTML table with rows and columns.
In PL/SQL, you can use UTL_MAIL to send the mail. The body of the mail (e.g. varchar2(32767) variable) will contain the HTML table. The MIME type of the mail needs to be "+text/html+" in order to inform the mail reader to render the body of that e-mail using a HTML rendering engine.
The PL/SQL code will look something as follows:
  <creating the HTML table in a varchar2 variable called mailBody>
  -- now send that as a HTML e-mail
  UTL_MAIL.Send(
    sender => '[email protected]',
    recipients => '[email protected]',
    subject => 'SQL Table Results',
    message => mailBody,
    mime_type => 'text/html'
...

Similar Messages

  • How to send formatted email text which is maintained in the SE61 by CL_BCS

    Helllo Colleague:
    I maintained some email text template in the SE61, there are some format in these text template. E.g. bold / italics.
    Then I will send these text by the function CL_BCS .
    So how could I send the email with the format which is defined in the SE61? I can get the text information from SE61 by FC:DOCU_GET in 'ITF' format .
    Could you please show some code sample ?
    Thank you
    Best regards
    Wendeng

    so you don't have permission to send email through their mailservers, what a surprise.
    Ever heard of spam? Ever wondered how people manage to send millions of emails through other peoples' servers?
    That's why most companies don't allow you to send email through their servers unless you're located inside their network (and even then require username and password).

  • Sending Formated email content using Mail Adapter !

    Hi,
    I would like to send email notification to customer using mail adapter, could you please to advise how to prepared the content of the email with little bit formated like sample below :
    Dear Madam / Sir
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxx :
    yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
    Best Regards,
    Since the constant function only can accept single line, how i can add change line.
    thank you and Best Regards
    Fernand

    Hi Fernand,
    There are a couple of blogs in SDN regarding sending formatted mail using Mail adapter. I guess there is one written by Prakash Arunachalam. Just do a search and it will give you some idea on using XSLT to achieve the result.
    If all you need is multi line in the content, use a UDF and use \n when ever you need a new line and \t for tab space.
    Regards,
    Jaishankar

  • Sending Formatted Email from oracle.

    i have created following procedure to send email on specific event from database. I want to send it in specific Format by adding html tags like following. Its not working.
    crlf ||
      <h1>|| 'employee number'|| p_emp_no ||</h1><BR>||'. Please login  Manager Self Service  to approve or Reject request'||  crlf || <BR>||   -- Message body
       '.                                Comments: '||p_comm|| crlf
    );Complete procedure.
    create or replace procedure SCC_EMIL (p_mail_to in char,p_emp_no in number,p_comm in char)
    is
      v_From      VARCHAR2(80) := '[email protected]';
      v_Recipient VARCHAR2(80) := p_mail_to;
      v_Subject   VARCHAR2(200) := 'Promotion System : Apprvla Request for :'||p_emp_no ;
      v_Mail_Host VARCHAR2(30) := 'mail.aite.com.sa';
      v_Mail_Conn utl_smtp.Connection;
      crlf        VARCHAR2(2)  := chr(13)||chr(10);
    BEGIN
    v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
    utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
    utl_smtp.Mail(v_Mail_Conn, v_From);
    utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
    utl_smtp.Data(v_Mail_Conn,
       'Date: '   || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
       'From: '   || v_From || crlf ||
       'Subject: '|| v_Subject || crlf ||
       'To: '     || v_Recipient || crlf ||
       crlf ||
       'employee number'|| p_emp_no ||'. Please login  Manager Self Service  to approve or Reject request'||  crlf ||    -- Message body
       '.                                Comments: '||p_comm|| crlf
    utl_smtp.Quit(v_mail_conn);
    EXCEPTION
    WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
       raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
    END;Edited by: BluShadow on 29-Nov-2011 08:57
    added {noformat}{noformat} tags. Please read {message:id=9360002} and learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    XAVER wrote:
    Output is simple text. not formatted by using HTML tags. i.e. <H1> </H1>That is because the e-mail does not have a valid header and a Mime type that says it is html text and not plain text.
    It is your responsibility to format a valid Mime body as the e-mail. The SMTP protocol is merely the delivery vehicle. It delivers the cargo, whatever it is. Your code needs to package that cargo correctly.
    Have a look at Multipurpose Internet Mail Extensions specifications that governs the formatting of e-mail.
    Or use a more abstract API like UTL_MAIL that enables you to submit HTML as e-mail and simply mark that using the relevant Mime type (e.g. html/text) - it will format that as a proper Mime body and use SMTP to deliver it.

  • How to send Formatted text in send mail step

    Greetings
    I need to send a formatted email in the send mail step of WF, however I don't se any option to change the font/size/color etc. Currently the email body contains only simple text.
    Appreciate your quick response.
    Thanks

    >
    Weise, Roman wrote:
    > Hello Manas,
    >
    > sending a formated email with a standard mail step will not be posible as far as i know. in general sending formated emails only makes sense if you can be sure that you are in a completely consolidated environment, e.g. a company where everyone uses the same mail client with a configuration ensure through a company pc template. if you try to send formated mails to heterogeneous environment you won't be happy as email clients / web mail providers are so different that you will be busy triying to get an acceptable layout for eternity (i deal a lot with mail sending to externals and always have these discusions with my customers).
    >
    > If you are sure you have a consolidated environment you could try to send a smartform through a functional method in a workflow. smartforms allow a high flexibility in layout. If you want to try this option i can give you additional help on the implementation.
    >
    > Best Regards
    >
    > Roman Weise
    Hi Roman,
      I have the same issue and I'm in a consolidated environment. I'd like to know if sending through a smartform will produce an e-mail message with attachment or just a text mail and the steps required to do so.
    thanks in advance
    Stefano

  • How to send out email in HTML format instead of Plain text?

    Can anyone help? Or any website with that information?
    I am trying to send out email using javamail. But i want it to be in HTML format so that i can set font size,coulor and so on.
    Thanks in advance if you have any clue or solution.

    look at this page:http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.html

  • How do I  Send HTML formatted email  using  class in  javax.mail pkg

    How do I Send HTML formatted email using javax.mail pkg class ?i mean is thr any class available in this package to do this ?

    Please see
    http://javaalmanac.com/egs/javax.mail/SendApp.html
    for Quintessential Program to Send E-Mail.
    Then substitute line
    msg.setText(content);
    /with this one
    msg.setContent( content , "text/html");
    it should do in simplest form.

  • How to Send an Email in HTML Format

    I'm trying to send an email to Outlook in HTML format but it's not working. As I have limited knowledge of HTML, can anyone please show me how to do this?
    Your help is highly appreciated.

    Hello,
      You can use function WWW_LIST_TO_HTML to convert list into HTML format. Then use function SO_NEW_DOCUMENT_ATT_SEND_API1 to send it as attachment.
    Thanks,
    Venu

  • Sending an email in HTML format

    in order to change the mail format from PDF to HTML format, first I create  the smartform with the relevant content , secont I create a new class and implement the method with the code mentioned in the blog "sending HTML Email from SAP CRM/ERP"  and I defined at the action profile in IMG (I didn't
    add nothing but the method mentionedin the blog).
    the appointment is saved and the mail is sent in HTML format . but an error message is send to the user at the crm_ic tranzaction. the error message is BS(001) " no status object is available for &".
    the message is raised from program LCRMBSVAF14 / form status_read.
    if I put break-point at the message line(86)  , the message is shown and the crm_ic tranzaction is stoped
    but if I put break-point a few lines before(line no 33)  and track each step the tranzaction function correct and the crm_ic show  an o.k. message  , I can not find a reason why the tranzaction process with break-point and don't pass with out it.
    thank you .

    rj_oregon wrote:
    If you like email me out-of-band and I can send you a full sample .txt file of "hello world" that takes 3K in plain text, 256KByte in rich-text, most of it injected.
    If it looks anything like the sample here, that's unnecessary:
                             Test_Email_Adblock_enabled.txt          
    If what you see is substantially different, though, I'd be interested in seeing it. (I can't e-mail you, though, as I don't know your e-mail address. You can find mine, though, by looking at the contact link at the bottom of any page on my site, listed in my profile here.)
    This is not a feature in adblock, I view it as a bug.
    I agree, it should not be doing that.
    My suspicion is that AdBlock works by adding this code to every page you view, thus rendering the advertising elements invisible. However, in the case of OWA, it must be inserting that code in a bad place, where it shows up in the message. Mail servers will be prone to rejecting such a message, probably because some of the strings that code uses to identify these ads might look malicious. There's nothing that I can see in that code that's actually malicious, though... just a bunch of CSS conditions that make matching elements invisible.

  • Blank message body when sending or receiving HTML formated emails Exchange 2010

    I Have just installed Exchange Server 2010 over the weekend on a customers system.  All clients using either Outlook 2003 or 2007 are unable to see any text in the body of emails that are formatted in HTML.  If they receive an email formatted as HTML there is no body text, if they send an Plain Text formatted email the recipient sees the text in the body.  This problem presents across all Exchange users and affects all HTML formatted emails sent or received since transitioning from Exchange 2007 to 2010.  Plain Text and Rich Text email present with no issues. If we import old email via a pst they afre able to see all email text both HTML and plain text. when we access the clients email account via OWA all emails work but then if we go into outlook 2003/2007 and click the email it removes the body text from the email in both the client and OWA have tried Outlook connection issues with Exchange 2010 mailboxes due to RPC encryption requirement
     http://support.microsoft.com/default.aspx/kb/2006508 and it made no difference at all.
    Thanks
    Update: Have just tested further and all pc seem to work ok with either 2003 or outlook 2007 on.  The problem only seems to be happening on the remothe desktop services server which has outlook 2007 ( have also tried outlook 2003 with same results)

    We have just migrated to Exchange 2010 and have had some blank emails come in to our system.  We think we have a reason and fix for
    it. Hopefully this helps someone else…
    Staffs have their own private mailbox (as you would expect) but also share common mailboxes like "Support" and "Info". When an email came
    into the inbox on a shared mailbox, it might be blank. Plain text emails seemed to be okay. 
    We found that when an email came in, it was readable for about two or three seconds (you need to be setup to send a test and check the inbox quickly - we used Outlook 2007 with the reading pane turned on) and then it blanked out!. We checked the incoming
    email by using the arrow keys to select it and then select the email below the new email, if you go back and forth between them you can see the good new email suddenly goes blank.
    So send another test, but this time make sure the email is set to “Plain Text”. Our email turned up fine, two seconds latter
    it had a NOD32 signature appended to the end of it saying that it had been scanned by NOD32 (you may have seen this kind of note appended to the end of emails before).
    What appeared to be happening is that one or more users sitting at their desks in Outlook had different settings configured in NOD32 (they
    were supposed to be using the server based profile that we control). We thought we had the server doing the AV work, but several of our client PCs had NOD32 enabled to integrate with Outlook. New items received in the shared Inbox’s were being scanned
    by the client PCs and having a signature appended which was mucking up the HTML format of the email and Exchange 2010 blanked them out.
    Make sure your AV products aren’t corrupting the email formats causing them to be displayed blank. Try tests using OWA only and don't
    access the mailbox using Outlook.
    Thanks.

  • I have a large PDF that I cannot send via email because of its size, 76 MB. How do I shrink this file or convert it to another format so I can email this, less than 20MB? Thanks for your help

    I have a large PDF that I cannot send via email because of its size, 76 MB. How do I shrink this file or convert it to another format so I can email this, less than 20MB? Thanks for your help

    Open the file in Preview and select "Save as..." from the File menu. Select "Reduce File Size" from the Quartz Filter menu and save. The size probably won't be reduced enough, though. You may have to split the file into several parts and mail them separately. Or upload it to a web server and send the link.

  • Can not send HTML formatted email since Mavericks?

    Hi..
    I was using Thunderbird happily in Mountain Lion and all was well. But as soon as I upgraded to Mountain Lion I can no longer send any HTML formatted emails at all. Everything I paste into Thunderbird get instantly converted to 'plain text'. Apart from manually editing basics like font colour, italics, bold I can't do much else.
    'Compose messages in HTML' is checked across all accounts, and 'Delivery Format' is set to 'Rich Text HTML'.
    Yet thunderbird refuses to render any pasted HTML formatted material.
    If I can not find a solution to this I will have to find an alternate mail client as rich formatting is critical for me.

    I just wiped Thunderbird completely from my system (Mavericks) and reinstalled from scratch. Yet still it will not render any HTML pasted into an email copied from Safari.
    I did however manage to paste HTML from Firefox and then Chrome into Thunderbird and they both rendered perfectly.
    But.. things get a bit strange. I am able to copy HTML from any webpage opened in Safari and paste it into a Googlemail email also opened in Safari and it renders fine.
    This is such a pain as Safari is my browser of choice and Thunderbird my email client of choice. But they just don''t want to work together in Mavericks.
    :((

  • Outlook Conditional Formatting by sender's email address?

    Is it possible to set Conditional Formatting based on the sender's email address (rather than the name displayed in the From field)?
    We're using Outlook 2010 in cached mode with an Exchange server.
    Thanks!

    Hi,
    Currently it's by design. If we change the display name by VBA, we may set the condition based on the Sender's email address:
    http://www.slipstick.com/outlook/contacts/bulk-change-outlook-contacts-email-display-name-format/
    You can also refer to the thread you noticed earlier, our moderator also posted an answer to the original question:
    http://social.technet.microsoft.com/Forums/office/en-US/0257072a-2068-40bb-94ae-d12c992d4ea1/conditional-format-problem-in-outlook-2010-to-from-fields?forum=outlook#d85fda41-9f3e-47b3-af30-37099bd8119f
    Regards,
    Melon Chen
    TechNet Community Support

  • How i can send an email with attachement of any type format file in form10g

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

  • How i can send an email with attachement of any type format file in form10

    I developed an application in forms 10g my application send an email via outlook but i want to attach any type of PDF or WORD document how i can attach the file and send this
    email via outlook if any one know please share your valuable experience with me.
    Thanks.
    deemy

    Hello,
    There is a javamail bean in the Oracle Forms 10gR2 Demos available on OTN
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    Francois

Maybe you are looking for

  • DNS  after reducing the advertised EDNS UDP packet size to 512 octets

    hello There is something wrong with my DNS server, it open internet webs so slow,and i have no idea with this . 04-Mar-2011 14:31:57.264 zone 0.0.127.in-addr.arpa/IN/com.apple.ServerAdmin.DNS.public: loaded serial 1997022700 04-Mar-2011 14:31:57.264

  • T510 not connecting to apple 30' display through mini dock

    I am having some difficulties connecting my T510 (NVS 3100m) though my thinkpad mini dock plus series 3 (4338). I am using dvi cable. So far, the only resolution i am capable of is 1280x800.... instead of 2560x1600. Any suggestions? If possible, i wo

  • Volume change sound Stopped Working! HELP!

    For some reason out of the blue...the sound i hear when I turn the volume up or down on my mac suddenly stopped playing I went to System Prefrences > Sound and tried everything but i cannot get that feature back..and i did not even disable it!

  • [SOLVED] nvidia-settings startup delay

    Does anyone happen to know why nvidia-settings takes a good 3-4 minutes to open after open it from the menu or the terminal, sudo or as user? I'm on xfce and didn't have this problem on Cinnamon or Ubuntu Gnome-Shell. I have to use this settings pane

  • Important notice for HERE products

    When Microsoft bought the Devices and Services division from Nokia in the spring 2014, a Transition Service Agreement (TSA) was agreed where Microsoft committed to support the HERE owned products for 6 months from the closing of the deal, these 6 mon