Sending an email from my database

Hi!
I wanna send an email from within a procedure from my database, Im thinking of using the utl_smtp package, I know I need acces from my database server to the smtp server, that can be done... when u use the utl_smtp package u need to specify the smtp host, the email address of the sender, the email address of the receptor, and some other stuff, what I wonder is: Where do u specify the password of the email address of the sender?, I mean, it doesnt make sense that u use an email address to send an email and u dont specify the password of that account
In all the samples Ive seen all over internet I havent found something that tells me something about it...
Any Help???

A lot of smtp servers do not require a username/password when sending mail, only when receiving mail.
If you need verification, you can do it with utl_smtp:
utl_smtp.command( conn, 'AUTH LOGIN'); 
utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( cuser ))) ); 
utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( cpassword ))) ); 

Similar Messages

  • How to send an email from the database

    i have create a post insert trigger at the database level for the emp table and that trigger call a procedure and that procedure send a email to the new employee, i the trigger send the firt name , second name , last name and the email address to the procedure .so my questions is about the command that will send the email to the new employee ,and the send email will look like this
    Dear "fist name "second name" "last name"
    welocme to..........................................................

    This thread could help answer some of your questions:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2391265038428
    C.

  • 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?

  • Sending an email from Lotus Notes release 5.0.4a

    I need to write java code for sending an email from Lotus Notes release 5.0.4a.
    Initially, I tried using Lotus Domino Toolkit for java, but the current release, "Lotus Domino ToolKit for Java/Corba release 5.0.8" is not compatible with the notes client/server we are using(5.0.4a).
    Now, I am trying to use "Lotus Domino Toolkit 2.1" which supports notes version 5.0.3 and higher, but I couldnot find out how to use it to send email.
    Is there are other way in which we can connect to Lotus Notes for sending email. I cannot use SMTP as the Lotus Notes administrator is afraid of security issues so there is no possibility that I can connect to Domino server using java mail API by enabling SMTP on the Domino server.
    I would be thankful if somebody can help me to do this.

    First off - This is very "off topic"
    The Domino SMTP server is not hard to lock down. Any Notes Admin worth his/her salt should know how to do it. Try to persuade them to run the SMTP stuff using name and password authentication only, or restrict access to an IP address range. This is all easy stuff.
    Otherwise DIIOP/CORBA is one way to go. If your toolkit jar files don't work with the server then try using the ones on the server. Look in %noteshome%\data\domino\java for the ncso.jar file.
    This works for me on an AS/400 java VM to WinNT/Linux Domino servers of various versions.
    How to create an email using this method is again not difficult. All you really need is a blank database template. You have to create a document with certain fields in it (all documented) and then save it. That's all there is to it.
    Word of warning DIIOP is not very rapid and careless coding can create problems. Ensure that once you have finished a session you make sure you close it else you will have continual connection problems.
    Try searching around the domino/notes groups on how to actually do this.
    SH

  • Sending a mail from oracle database

    Hi,
    I have a requirement to send a mail from oracle database.I use UTL_TCP package for this.Although my procedure is executed successfully,i dont get the mails in my inbox.Please help me to figure out a solution.
    Thanks in advance....

    Hi, you must use UTL_SMTP package for send emails, it has more performance and features for debug. You must look the next code, this is a example for send emails.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    c := UTL_SMTP.OPEN_CONNECTION('smtp-server.acme.com');
    UTL_SMTP.HELO(c, 'foo.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Sender" <[email protected]>');
    send_header('To', '"Recipient" <[email protected]>');
    send_header('Subject', 'Hello');
    UTL_SMTP.WRITE_DATA(c, UTL_TCP.CRLF || 'Hello, world!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    BEGIN
    UTL_SMTP.QUIT(c);
    EXCEPTION
    WHEN UTL_SMTP.TRANSIENT_ERROR OR UTL_SMTP.PERMANENT_ERROR THEN
    NULL; -- When the SMTP server is down or unavailable, we don't have
    -- a connection to the server. The QUIT call will raise an
    -- exception that we can ignore.
    END;
    raise_application_error(-20000,
    'Failed to send mail due to the following error: ' || sqlerrm);
    END;
    Also review the next link for get more information about the UTL_SMTP packege.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#sthref15587
    Regards.

  • How to send an email from oracle?

    Hi I want to send email from oracle database.
    i have tried following procedure
    create or replace
    2 PROCEDURE send_mail (p_sender IN VARCHAR2,
    3 p_recipient IN VARCHAR2,
    4 p_message IN VARCHAR2)
    5 as
    6 l_mailhost VARCHAR2(255) := 'aria.us.oracle.com';
    7 l_mail_conn utl_smtp.connection;
    8 BEGIN
    9 l_mail_conn := utl_smtp.open_connection(l_mailhost, 25);
    10 utl_smtp.helo(l_mail_conn, l_mailhost);
    11 utl_smtp.mail(l_mail_conn, p_sender);
    12 utl_smtp.rcpt(l_mail_conn, p_recipient);
    13 utl_smtp.open_data(l_mail_conn );
    14 utl_smtp.write_data(l_mail_conn, p_message);
    15 utl_smtp.close_data(l_mail_conn );
    16 utl_smtp.quit(l_mail_conn);
    17 end;
    and when i execute the following
    begin
    send_mail( '[email protected]',
    '[email protected]',
    'Hello arun' );
    end;
    I get the following errors
    ERROR at line 1:
    ORA-29278: SMTP transient error: 421 Service not available
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 97
    ORA-06512: at "SYS.UTL_SMTP", line 139
    ORA-06512: at "TEST.SEND_MAIL", line 8
    ORA-06512: at line 2
    Please help
    Regards
    Arun

    C:\>telnet aria.us.oracle.com 25Only if you work ofr Oracle & start behind their firewall would I expect this to work.
    The SMTP server to which PL/SQL connects needs to be YOUR corporate email (MTA) server & configured to RELAY message.
    Contact your LOCAL postmaster/Network Admin
    NONE of this is related to Oracle RDBMS!

  • Email from Oracle database to any e-mail address....

    Hi Guys,
    I have been looking so many examples and material about sending e-mail from oracle database to any other e-mail address but couldn't find a clue.
    Can someone tell me a simple way in Oracle9i database to send email messages on different e-mail addresses. Please with the help of code.
    I just need to send a simple textual e-mail on 2 or more e-mail addresses. Thats all!
    I want to do in database by creating a procedure or package just because i need to use this package on web also. I am using databse 9i release 1. Forms 6i for development and 9iAS to deploy my forms on web.
    Please help, its really very urgent!
    Imran Baig

    For more about.. it check
    http://asktom.oracle.com/pls/ask/f?p=4950:8:9516816346482415741::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2118740358226
    --Binny                                                                                                                                                                                                                                                                                                                                   

  • Cannot send an email from my alias Mobile Me account from the iPhone.

    I have a Mobile Me email account which works perfectly on my Mac and iPhone. I created a an Alias Mobile Me Account on the web.
    I am able to create a new email from the alias account on the Mac.
    The iPhone will not recognize the alias account, I cannot add it or sync the account.
    I cannot send an email from my alias Mobile Me account from the iPhone.

    To all frustrated MobileMe alias owners who want to send email from iPhone - please go to the feedback area of the apple.com and leave messages regarding this issue. I had a lengthy conversation with a tech support guy who agreed that this is a needed fix - he said to initiate a grass roots effort - and that by all of us leaving messages it will eventually get attention and fixed. Why would Apple give us the ability to create alias's, use them on mobileme website, on our mac mail programs, but NOT the iPhone, which is the MOBILE device. Silly. Please protest!! Thanks.

  • I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great

    I cannot send an email from my iPad 2? No problem receiving, why does this happen? Have tried the suggestions for setting up email and after doing the sync mail through iTunes receiving worked great but still cannot send? Any help would be great!

    The fact that you can receive means you have a valid e mail address, and have established the connection to the incoming server, so all of that works.  Since the send does not work, that means your outgoing server is rejecting whatever settings you used formthe outgoing set up.  Try them again. 
    Google your particular isp, and ipad and many times you will find the exact settings needed for your isp.  Or tell us here, and soneone else may be on the same isp.  Some mail services need you to change a port, or have a unique name for the outgoing server.  
    Kep trying.

  • 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 am sending an email from one account on iphone 4s but the replies are coming into another account on my phone

    I have had an iphone 4s for about a year and have 4 email accounts that come in on it: verizon, gmail, my work, and icloud.  Periodically, I send an email from one account, it shows the message as sent from that account in my sent mail, but the recipient receives it from the gmail account and therefore replies to the gmail.  Has anyone had this happen?  It is almost as if my messages are bouncing into gmail when I send them, although on my phone it shows as having been sent from another account.  I have not had this happen on my computer where I have all of these emails coming in as well.  I thought perhaps it was me not being careful about which account I was sending from when using my phone, but the mail I sent this morning I was very careful to make sure was from verizon, the sent mail on my phone shows it was sent from verizon, and the reply came in on gmail.  Gmail isn't even the default email address- verizon is! My iphone is using version 6.1.3. Does anyone have any ideas? This is a major problem for me so I appreciate any ideas!  Thank you!!!

    I am not sure whether this is related, but I had a problem with Gmail where each time I sent and email via my iPhone it would bounce back in my Gmail account as unread. You migh want to check this Google article explaining why this happens and how to avoid it:
    https://support.google.com/mail/answer/1710338?ctx=gmail&hl=en-GB&authuser=0

  • I cannot send Yahoo eMail from iPad or iPhone, but I can receive

    I cannot send Yahoo eMail from iPad or iPhone, but I can receive.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
     Cheers, Tom

  • I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    I send an email from my Iphone to a friend.  My friend receives it on her Iphone, but as text message.  She replies and it goes back to my daughter's phone, a completely different email and phone number.  Why?

    We went through my friend's phone and my daughter's email and phone number are not in it.  I have never given my daughter's iphone number to my friend.  Is it something to do with gmail or my apple id?  My daughter (14) has been using my computer as her "base" for HER Iphone. 
    My friend does use her iphone number as an email address as well.
    For instance:  her phone number might look like this:  (493) 305-3958
    and her email address would look like this:  [email protected]
    If I Iphone/email my friend, she receives it as a text message.  Then if she replies to that text message, it goes to my daughter's phone and not mine.  It's completely crazy!  We searched her phone contacts and did not find my daughter's phone number anywhere or attached anywhere to mine.  Since when does Iphone emailing wind up in the text messaging area?

  • HT1688 How do I send an email from my Iphone to a "group" that I have established in my Yahoo account

    How do I send an email from my Iphone to a "group" that I have established in my Yahoo account?

    So I have bought a couple of apps on my iphone and would like to transfer them to my itunes library, but not sure how.
    iTunes > File > Transfer purchases
    When I plug in my iphone and try and sync the two, I get a warning from itunes that everything on my iphone will be wiped and everything from my itunes library will be moved to it.
    Have you changed the computer you are syncing with?

  • Sending encrypted emails from the iPad is not working

    I can't get sending encrypted emails working on my iPad3 running iOS 8.0.2
    Let me explain what I did:
    1. I created S/MIME certificates for 2 email addresses on my iMac in Keychain Access. One email address exists only on the iMac the other only on the iPad.
    2. I set "When using this certificate" to "Always Trust" in both certificates.
    3. I exported 1 S/MIME certificate (p12) and installed it on the iPad. Then I deleted this certificate and its private&public keys in iMac Keychain Access
    4. I exchanged public certificates between the 2 devices. I installed one certificate in iMac Keychain Access and the other in iPad/Settings/General/Profiles.
    5. On the iMac in the iPad certificate I set "When using this certificate" to "Always Trust"
    6. I tested whether I can send and receive signed and/or encrypted emails
    Results:
    1. From the iMac I can send signed and/or encrypted emails to the iPad.
        On the iPad I can read the encrypted emails. The signature is not trusted
    2. On the iPad I can send signed messages to the iMac. On the iMac the signature is trusted.
        I cannot send encrypted emails from the iPad to the iMac. The iPad doesn't know about the public certificate in iPad/Settings/General/Profiles
    So much for the straight forward part. Now it gets a bit more complicated and confusing.
    1. I deleted the iMac certificate in the iPad/Settings/General/Profiles. Then in iPad Mail I opened the signed mail coming from the iMac.
        I viewed the untrusted certificate in Mail and installed it. From this point on all signed emails from the iMac are trusted.
        Strangely the by this method installed certificate doesn't appear in iPad/Settings/General/Profiles.
        Furthermore I still cannot send encrypted messages to the iMac. This certificate installation seems to be used only to check trust worthiness of the signature.
        Installing on top the iMac public certificate in iPad/Settings/General/Profiles doesn't enable to send encrypted messages from the iPad either.
    To be sure that this problem relates to the iPad certificate management and is not related to an error by me I did the following:
    1. I transferred a p12 file for a certificate that I created in my iMac to a PC running Windows7.
    2. I transferred a p12 file plus its public key (.pem) that I created in my iMac to another iMac into Keychain Access. (I have not tested if the pem is needed).
    3. On the other iMac and the PC I made sure that the certificates are trusted.
        On the PC that means in the Certificate Manager the p12 needs to be in the "Personal" folder and in the "Trusted Root Certification Authorities" folder.
        The public keys need to be in the "Trusted People" folder and the "Other People" folder. One can just copy/paste the certificates.
    4. In both cases I deleted the certificate and public/private keys on my iMac.
    5. I exchanged public certificates between the devices.
    6. I tested exchanging signed and/or encrypted emails between my iMac and the PC and my iMac and the other iMac.
    Result:
    1. I can send signed and/or encrypted emails to the other iMac and the PC
    2. The PC and the other iMac trust the signature from my iMac and can read the encrypted emails
    3. My iMac can read encrypted emails from the PC and the other iMac
    4. My iMac trusts emails with signatures from the PC and the other iMac.
    Everything is working as it should.
    After the above test I wanted to see whether I can set up encrypted email exchange between the iPad and the PC. Strangely iPad Mail recognized the public certificate from the PC installed in iPad/Settings/General/Profiles and allowed me to send an encrypted email to the PC. However, on the PC I was unable to read the encrypted email. And the other way around, encrypted emails send from the PC to the iPad cannot be read on the iPad.
    My conclusion from all this testing is that iPad mail encryption is still "under construction".

    I was able to resolve the above described problem to some degree. Setting up sending and receiving encrypted emails between iOS and OSX I have working.
    What is still not working is reading encrypted emails on the iPad/iOS8 received from Windows 7 PC. And sending encrypted emails to Windows 7 PC.
    The details about how I solved part of the problem are described here.

Maybe you are looking for

  • BPM 11g: problem trying invoke a process instance from Java

    Hi all, I'm trying use this java code http://kr.forums.oracle.com/forums/thread.jspa?messageID=9244238 bpmServiceClientFactory = BPMServiceClientFactory.getInstance(properties, null, null); bpmContext = bpmServiceClientFactory.getBPMUserAuthenticatio

  • STEPS in BPM for synchornous.

    Hi, I have to persist one field using BPM for synchonous. Assume it as Empid.  I am getting it from JMS and am sending to SOAP which is a synchornous interface. While sending to SOAP, i am stripping it out and sending, along with the response receive

  • I can't copy and paste from Word into CSS5?

    I run in Windows 7 and have many documents in Word, but cannot get any of them to Paste into Contribute.  I have had to re-type all the material directly. Any help?

  • Font mapping in Oracle 6i Report Server

    Dear All, I am creating a report which is required to display the Palatino Linotype font in the PDF format by using the Report Builder in MS Windows XP. After deploy to Oracle 6i report server which is running in Solaris, I was facing a problem to ge

  • Newbie question on iSeries command in SM69

    I have been asked to create ZCOPY in SM69 to copy a file(ie test.txt) from /usr/interfaces/inbound to /usr/interfaces/outbound.  I know you can use CPYDOC on the iSeries, but how would I go about doing this in SAP?