Send email from the server

I need to send email from the database.
Two ways that I am familiar with -
1. using VB/ODBC controls;
2. dbms_pipe
Anyone knows a more 'direct' solution?
Regards
Anatoliy Smirnov
null

by the way how can u send attchments with mails from database.
chetan
try this...(thanks for the subject line help)
the first message line will be read by non MIME compliant readers, the second message line with be in the body of the note, the nest 2 (third and fourth) will come in as attachments ( text ). Change the Content-type for things like word docs or other 8bit docs (Content-type: application/msword) and write_raw_data for the 8Bit parts
CREATE OR REPLACE PROCEDURE send_mail_test (sender IN VARCHAR2,
recipient IN VARCHAR2, subject IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'smtp.naxs.net';
mail_conn utl_smtp.connection;
cv_cCRLF VARCHAR2(10) := UTL_TCP.CRLF;
lv_message varchar2(4000);
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn,'From: ' | | sender | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'To: ' | | recipient | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'Subject:' | | subject | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'MIME-Version: 1.0' | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'Content-Type: multipart/mixed; ');
utl_smtp.write_data(mail_conn,'boundary="NextPart_000_01C002D3.EB460626"' | | cv_cCRLF);
utl_smtp.write_data(mail_conn, cv_cCRLF | | message| |' first mess part'| | cv_cCRLF);
utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' second mess part'| | cv_cCRLF);
utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'Content-Type: text/plain; charset=us-ascii'| | cv_cCRLF);
utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' third mess part'| |cv_cCRLF);
utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
utl_smtp.write_data(mail_conn,'Content-Type: text/plain; charset=us-ascii'| | cv_cCRLF);
utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' fourth mess part'| |cv_cCRLF);
utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626--' | | cv_cCRLF);
utl_smtp.close_data(mail_conn);
-- utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS
THEN
DECLARE
error_code NUMBER := SQLCODE;
error_msg VARCHAR2(2000) := SQLERRM;
error_info VARCHAR2(30);
BEGIN
DBMS_OUTPUT.PUT_LINE('We have an error: '| |error_code| |' '| |error_msg);
END;
END;
show errors;
null

Similar Messages

  • TS3276 I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    Sometimes deleting the account and then re-creating it can solve this issue
    Write down all the information in accounts before doing this
    Highlight the account on the left and click the minus button
    Then click the plus button to add the new account and follow the prompts

  • Authentication Error while Sending Email from SMTP server.

    Authentication Error while Sending Email from SMTP server.  Can receive emails but cannot send emails from this account. 

    no email account was setup on the phone unless it was issued by your company.
    gmail is required but no server address ports to enter.
    my gmail account was setup before i took delivery of the phone but could have been done when phone was activated.
    i added cox pop3 email and had to manually enter both pop3 and smtp servers with both boxes checked on both servers.
    i doubt if it's a verizon issue.

  • I am using Mail 5.3 with two separate gmail addresses. One is personal the other is business. When I send emails from the business address, any auto-replies I get COME TO THE PERSONAL INBOX. I imagine that this is a setting? Please help!

    I am using Mail 5.3 with two separate gmail addresses.
    One is personal the other is business.
    When I send emails from the BUSINESS address, any auto-replies/out of office notices I get come to my PERSONAL INBOX.
    I imagine that this is a setting? Please help!

    Edit the SMTP server list. Add a new one for the business account. Put the correct password and information for it. Give it a description so you will know which server is which. Mke sure the correct server is highlighted in the account selected and check the box to use only that server for that account. Do that for the other account also.

  • Mail downoading old emails from the server

    I have a SBC/Yahoo/ATT/?? account that has been working fine. It was updated to their new secruity and pop server settings a couple of months ago. Since then, I have been prompted several times to re-enter the password when doing send/receive. That was ok, just annoying at times.
    This weekend I opened up mail and it downloaded every email from the server (as if they were new)! I had certain emails set to redirect to my office, and so my office email got filled with redirected messages. It did not delete my messages from the server, but now I have duplicate/triplicate emails on my desktop. What happened and how do I prevent this from occuring again?!
    Please help.

    This is a POP account, right? What are your Preferences > Accounts > Advanced > Remove copy from server settings?

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

  • TS3899 When sending email from the Mail App or through other Apps, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design.

    When sending email from the Mail App or through other Apps on my iPad, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design, especially since I had already checked the From: address.
    iPad 4 running iOS 8.1.3

    3rd party email addresses have to be deleted on every synmced mac product, although I have 1and1.co.uk and my imac updatetes the mails in that account from mac mail.
    Yahoo etc is a 2 step deleting process but good to get your emails pushed when on the go.
    LJ
    http://www.facebook.com/The.Cowboy.Party

  • I have snow leopard.  Using iCloud, I an receive mail on my mac, but suddenly, I am no longer able to send email from the mac.  I can still send it from the icloud web site.  How do I regain the ability to send email from the mac?

    I have snow leopard.  Using iCloud, I can receive email on my mac, but, suddenly, I am no longer able to send email from the mac.  I can send it from iCloud online.  Any thoughts on how to regain the abilty to send email from my mac?  Thanks.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • I have two email accounts that are set up on the same iPad.  I cannot seem to see, read or send email from the second account

    I just set up a second email account on the same iPad but cannot seem to see, read or send email from the second account. 

    I'm using Windows 8 (not 8.1) and whatever the latest Thunderbird version is. They're both IMAP accounts. I was using Windows Live, but I couldn't get that to work, so I switched to TB. It works JUST fine for the one account, but not the other! They're identical except for the "handle". Both off my local ISP, set them up at the same time.

  • On my ipad mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server.

    On my iPad Mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server. 
    My husband and I share an email address and if he misses a day checking email on his notebook, he doesn't receive the items that I have sent to Trash on my iPad Mini.
    Appreciate suggestions.
    [The curious thing is, if I "move" the deleted emails from Trash on my iPad Mini into the Inbox, I can go to my notebook, open my online email and they are back in my ATT/Yahoo Inbox.]

    Is your Yahoo account set up as POP3 or IMAP?

  • Can i delete my emails from the server using the default mail program in mountain lion?

    how can i delete emails from the server in mail on os 10.8.1?

    Hi, check Mail>Preferences>Accounts, both Mailbox Behaviors & Advanced tab to see those settings.

  • Mail Mac has deleted all my emails from the server..how to get them back?

    Mistakenly, I've changed the options in Mail app in Mac, which says "Remove copy from server after retrieving a massage" Immediately, and it deleted all my emails from the server. Is there anyway to return all my 3000 emails back to the server? cuz I want to access them from anywhere :S it's a hotmail account.

    You can create a new IMAP account in Apple Mail, and move all the messages to the IMAP folders. They are synced with the server.
    I don't know if hotmail supports imap though, I would prefer Gmail.

  • Is it possible to read , send emails from the database in oracle8.

    Hi,
    My present project needs me to send emails from the database through procedures. There is an oracle package UTL_HTTP in oracle8 which could be used to read emails from database. So kindly tell how to go about sending an email from the database. Is this feature available in Oracle8i.
    Thank you.

    Okay , Here's my Javascript wgich is in an onload process.
    Javascript variable addr_str displays the correct result.
    My hidden field is called P101_CHECKVAL.
    <html>
    <title>CodeAve.com(JavaScript: Display All URL Variables)</title>
    <body bgcolor="#FFFFFF">
    <script language="JavaScript">
    <!--
    // Create variable is_input to see if there is a ? in the url
    var is_input = document.URL.indexOf('P101_CHECKVAL:');
    // Check the position of the ? in the url
    if (is_input != -1)
    // Create variable from ? in the url to the end of the string
    addr_str = document.URL.substring(is_input+1, document.URL.length);
    // Loop through the url and write out values found
    // or a line break to seperate values by the &
    for (count = 0; count < addr_str.length; count++)
    if (addr_str.charAt(count) == "&")
    // Write a line break for each & found
    {document.write ("<br>");}
    else
    // Write the part of the url
    {document.write (addr_str.charAt(count));}
    // If there is no ? in the url state no values found
    else
    {document.write("No values detected");}
    -->
    </script>
    </body>
    </html>
    Everytime I put the HTML_get code into the javascript, it basically tells me I have an error on the page. So what exactly do I put that sets P101_CHECKVAL equal to the value of addr_str?

  • TS3899 How do I get my list of contacts from Gmail to my iPad2 so I can send email from the iPad?

    How do I get my list of contacts from Gmail to my iPad2 so I can send email from the iPad?

    Take a look at this help site that I found by using Google ...
    http://support.google.com/mobile/bin/answer.py?hl=en&answer=138740

  • Deleted email from the server

    I know about downloading and removing email from the server by using the "Remove copy from server after retrieving a message" option in the Account preferences tab but I want to keep all of my messages on the server for a few weeks but want to delete spam from the server immediatly. does someone have a script or is there a setting that i'm missing.
    Thanks
    Bill

    Please see the following link. Answer is at the bottom. Ray Tollett
    http://discussions.apple.com/message.jspa?messageID=5292324#5292324

Maybe you are looking for

  • I'm trying to sign in on my account but an error sign come's up from window's saying test connection any ideas......

    I'm trying to sign in on my itunes account but windows error come's up saying test connection any ideas.....

  • Using images with Transparency in Photobooks

    I'm to a point where I would like to use images that utilize transparency in Aperture photo books. Is this possible? So far, PSD files that I've cropped with PS's lasso tools to have transparent areas surrounding their subject tend to change this are

  • VHS TO FCP TO QT NOW NEED AVI HIGH QUALITY

    We have a two minute segment given to use in vhs format (poor quality) to begin with. I imported into FCP 4 and exported high qual quicktime and it plays & looks okay on both mac and pc. However, we need to insert video into powerpoint on pc. I'm hav

  • Asset Procurement in SRM 5.0

    Hi All, We are using Classic Scenario.Trying to use the account assignment category " Asset". 1.Maintained account assignments categories=AS(Standard), 2.Defined G/L account for product category and account assignment category" for AS. 2.Flagged one

  • Monitor profile applied twice?

    Hi guys, the colors in Lightroom (and Photoshop Elements 7 Raw import window as well) look green and flat. I could fix this problem in the PSE7 editor window by switching off the monitor color profile. But I cannot find any similar handle in LR and P