Apex emailing functionality

Hello all,
i have trawled the net for info on the apex email functionality, nothing seems to be what i am after i don't think!
I would like to be able to set up something that emails a group of select people (which i can specify) every time someone inserts a new row into a table using a form on apex. How would I go about doing this?
Using: apex version 3.2.1 (due to upgrade shortly, there isnt many of us on the apex team, just me in fact!) and HTTP Server to host
Thanks in advance !

Hi,
You can use util_tcp package for this
See below
01. Create below procedure
PROCEDURE Send_Mail (sender    IN VARCHAR2, recipient IN VARCHAR2, subject IN VARCHAR2, message   IN VARCHAR2)
IS
    rc NUMBER;--integer;
    mailhost   VARCHAR2(30) := '127.0.0.1';
    mail_port NUMBER(2) :=25;
    mail_conn   utl_tcp.connection;
BEGIN
    --debug_message('-------------------------------------:: Send_Email ::-------------------------------------');
    mail_conn := utl_tcp.open_connection(mailhost, mail_port);
    dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'HELO '||mailhost);
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'MAIL FROM: '||sender);
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'RCPT TO: '||recipient);
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'DATA');                 -- Start message body
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'Subject: '||subject);
      rc := utl_tcp.write_line(mail_conn, message);
      rc := utl_tcp.write_line(mail_conn, '.');                    -- End of message body
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      rc := utl_tcp.write_line(mail_conn, 'QUIT');
      dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
      utl_tcp.close_connection(mail_conn);
    EXCEPTION
        WHEN OTHERS THEN
             dbms_output.put_line(SQLCODE||'-'||SQLERRM);
END Send_Mail;02. Then create a trigger on your table as below and call this procedure
CREATE TRIGGER your_table_name_trg
BEFORE INSERT
ON your_table_name REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
BEGIN
Send_Mail(sender='[email protected]', recipient='recipient email addresses', subject=>'subject of the email' , message=>'Content of the email');
END your_table_name_trg;* If this answer is helpfull or correct then please mark it and grant the points.

Similar Messages

  • APEX Email without APEX

    I have an email I want to send out nightly but to make it simpler to setup I was wondering if there way a way to gain access to APEX's sendmail routines without being actually inside of APEX. There is no information in the emails that is dependent on any particular user being logged in to apex, I just want to use the email functionality with DBMS_JOBs. Any suggestions?

    Are you sure you're not confusing UTL_MAIL with UTL_SMTP?
    Although UTL_MAIL does require a DB parameter to be set up, its use is comparable with APEX_MAIL:
    UTL_MAIL.SEND (
       sender      IN    VARCHAR2 CHARACTER SET ANY_CS,
       recipients  IN    VARCHAR2 CHARACTER SET ANY_CS,
       cc          IN    VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
       bcc         IN    VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
       subject     IN    VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
       message     IN    VARCHAR2 CHARACTER SET ANY_CS,
       mime_type   IN    VARCHAR2 DEFAULT 'text/plain; charset=us-ascii',
       priority    IN    PLS_INTEGER DEFAULT NULL);
    APEX_MAIL.SEND(
        p_to                        IN    VARCHAR2,
        p_from                      IN    VARCHAR2,
        p_body                      IN  [ VARCHAR2 | CLOB ],
        p_body_html                 IN  [ VARCHAR2 | CLOB ] DEFAULT NULL,
        p_subj                      IN    VARCHAR2 DEFAULT NULL,
        p_cc                        IN    VARCHAR2 DEFAULT NULL,
        p_bcc                       IN    VARCHAR2 DEFAULT NULL,
        p_replyto                   IN    VARCHAR2);APEX_MAIL does win on HTML and attachment capabilities though (seriously Oracle, why cripple UTL_MAIL by limiting attachments to 32K VARCHAR2/RAW?)

  • How can I re-enable the "are you sure you want to delete this email" function?

    When I click delete my emails get deleted with one click. I accidentally click delete and they get lost in my trash folder often. How can I enable the "are you sure you want to delete this email" function?

    The following previous discussion may help: Re: Delete Confirmation Warning.  I want back.

  • Is there a way to disable 'Save as' and 'Send Email' function in Acrobat XI?

    Hi,
    Is there a way to disable 'Save as' and 'Send Email' function in Acrobat XI?
    Thnx in advance.

    I would hope there would be no way to disable Save AS that would reduce the applicationss capability. What are you trying to prevent happening?

  • Acrobat 9.0 - "attach to email" function no longer works (Win 7, MS Outlook 2010)

    Dear All,
    All of a sudden, my "attach to email" function no longer works.  If I open a PDF in Acrobat 9.0, and I try to "attach to email," nothing happens.  This feature has always worked for me in the past.  When I check for updates, Acrobat reports that I'm up to date.  I recently updated Flash Player 16 and Reader XI (11.0.10).
    My OS is Windows 7, 64 bit, and I use MS Outlook 2010.
    Thanks so much for your time.

    Hi rlee711,
    You might need to refer this kb file to resolve the issue:
    Attach To Email doesn't work | Acrobat 9.4.2
    Although, Acrobat 9 is not compatible with Outlook 10, I would like you to prefer using only the supported product.
    To understand in detail, please refer the link given below:
    Compatible web browsers and PDFMaker applications
    Regards,
    Anubha

  • How to change the password and username in the scan to email function of a HP laserjet 300

    Trying to set up the scan to email function. Using the printer pad, I get as far as getting to  SMTP outgoing and then I get an error message that the username or password is incorrect.    I do not know what the correct  username or password is.
    I would like to get rid of what ever the incorrrect information is and  redo the information.  NO one seems to understand the problem.  Any help?

    @Ray2905 
    ‎Thank you for using HP Support Forum. I have brought your issue to the appropriate team within HP. They will likely request information from you in order to look up your case details or product serial number. Please look for a private message from an identified HP contact. Additionally, keep in mind not to publicly post ( serial numbers and case details).
    If you are unfamiliar with the Forum's private messaging please click here to learn more.
    Thank you,
    Omar
    I Work for HP

  • Acrobat 9.4.2 update breaks 'attach to email' functionality

    Everyone - The recent 9.4.2 CPSID_83708 Acrobat update has caused the 'attach to email' function not to work.  This is happening for at least two of my users whose computers are running  Windows XP Professional. I just installed the update on my Windows Vista machine in an effort to recreate the issue, but the problem did not manifest itself in my Vista machine.
    I have read with interest the print problems that several users are reporting related to this patch. I have had no problems printing, but the 'attach to email' issue is extremely troubling to us.  I realize that the work-around is to send the attachments directly from our email program which we are doing.  However, this does not decrease the urgency to get this resolved.  Some of our users are extremely accustomed to accomplishing tasks in a certain manner, and much stress results when I try to change their habits.
    When they click 'attach to email', an error message comes up that says 'Adobe Acrobat 9.4.2 has encountered a problem and needs to close.'  I am attaching the detailed information that I could view from the error window below.  Please advise on how I can uninstall this 'uninstallable' patch.  I have currently advised users to opt out of any Adobe updates, but I am sure that people will continue to receive them.
    Thanks in advance for any help with this.
    Penny Downey

    Could someone from Adobe respond to this specific issue so that we know we are being heard?  Will the fix for the print issue also resolve the 'attach to email' problem?  Is there any work around other than telling users to attach directly from their email programs?
    Thanks in advance for your response to our concerns.
    Penny

  • Standard Report RFKABLOO i need to add email functionality

    In Standard Report RFKABLOO i need to add email functionality. I am a bit
    Confused with the field groups used and insert statements as:
    INSERT
      icdpos-tabname
      icdpos-tabkey
      icdpos-fname
      icdpos-chngind
      icdpos-f_old
      icdpos-f_new
      fldtype
      fldleng
    INTO daten
    Its having some includes too flags set. Can anyone suggest how to proceed.

    Hi,
    did you try STR+F7?
    do you mean report RFKABL00 (00 -> zero zero) or oo?
    We only have RFKABL00 (zero zero)!
    regards, dieter

  • How to use email function in crystal report ?

    Post Author: kudo
    CA Forum: .NET
    Hi I'm a novice by touching .net not more than 2 months. Can somebody guide me how to use email function provided in crystal report components?(Better put a sample code so that I can understand well.)  ps: I'm using VS2005 VB.net.Thanks.

    Post Author: mewdied
    CA Forum: .NET
    'EXPORT to EMAIL        ''' Code for exporting the report to Mapi (.Net Windows application)        ''' *For a Web application you must export to disk as a PDF file first.
            crReportDocument.Load(Application.StartupPath + "\World Sales Report.rpt")        crMicrosoftMailDestinationOptions = New MicrosoftMailDestinationOptions        With crMicrosoftMailDestinationOptions            .MailCCList = "[email protected]"            .MailToList = "[email protected]"            .MailSubject = "Attached exported report"            .UserName = "admin"            .Password = "password"        End With
            crExportOptions = crReportDocument.ExportOptions        With crExportOptions            .DestinationOptions = crMicrosoftMailDestinationOptions            .ExportDestinationType = ExportDestinationType.MicrosoftMail            .ExportFormatType = ExportFormatType.PortableDocFormat        End With
            'Add some error handling        Try            crReportDocument.Export()            MsgBox("Report exported successfully.")        Catch err As Exception            MessageBox.Show(err.ToString())        End Try
    Hope this helps

  • Font size issue with the email functionality of infopath form

    Hi,
    We have a SharePoint list created and customised the form to send the form via email using email functionality in infopath form.
    We have made the font size of the form fields( rich text box) to 11. But it is showing as 10 in email. Also for a text box we set the font size to 14. But it is 13.5 in the email.
    Could anyone please let me know how to fix this issue?

    http://social.technet.microsoft.com/Forums/sharepoint/en-US/afbd9fc3-b8d3-4ef9-a8bf-9cb136d12039/formatting-problem-with-email-from-an-browser-enabled-infopath-2010-form-in-sharepoint-2010?forum=sharepointcustomizationprevious
    Yes, this is normal. Forms Services has to convert the form to an aspx page, and things get lost in translation when this gets submitted via email.  My workaround has always been to set static widths to columns/controls, but you said that didn't work
    for you?  It's always worked for me.
    https://go4answers.webhost4life.com/Example/infopath-send-form-email-162481.aspx
    http://www.formotus.com/15413/blog-infopath/making-the-most-of-email-submit-with-infopath-and-formotus-forms

  • Unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    Just a quick bump... Anyone got any thoughts on this?

  • Proper syntax for email function including a repeat region

    Hey Guys, a fellow ADDT developer and myself ran into a odd challenge recently and was wondering if someone knew a shorter answer.
    LET ME BE CLEAR..I’m not looking for a suggestion, we have resolved the problem..we ARE LOOKING FOR PROPER or shortest FORMAT.
    (we used a submit redirect to a php page that used the “Send Page Section”  and then redirected back..the email looks great)
    This may be a mood point since ADDT is going away but, until then, we feel this will be an useful post because quite often you may have multiple products to email from your SQL statement.
    With that said. We used the send email function on submit.
    1.       Our email content was a HTML content file. Since it was not a php file our repeat region obviously did not work.
    2.       We substituted the HTML file for PHP (just for giggles)..no joy
    3.       We tried regular content as a string..no joy
    We know how to get single rows with the  {table.column} format…but we need to list all undetermined number of products/rows.
    So how would the string or function re-write look  if you needed a repeat region.
    EX:
    emailContent (“ this” . ‘does’. “work”);  regular string
    emailContent (“ this” . $var   . “work”);  regular string
    emailContent (“ this” .   do{  $row; } while( xxx = xxx)  . “work”);  DOES NOT WORK
    emailContent (“ this” .   while( xxx = xxx)  {  $row; }   . “work”);     DOES NOT WORK
    I assume the conflict is you can’t have a function like DO or While in the string….but I also can’t use a php include file.
    There must be a shorter, cleaner syntax that won’t require an advanced set of arrays or for each???
    so  how would a nice clean example of  repeat region results  inside email content, or include file for email contnent, look?
    Thanks

    David, in theory I agree with you, but to a large degree I am completely changing the logic of my human interface. My existing code pre-processes the raw data and saves the results to disk for any future usage. 
    It can then rapidly rebuild all pages for the entire Intranet site when your personal view of the data is changed. 
    After the full creation of all pages, the fixed pages can be viewed using your browser. 
    When you want to change your view, you run the code which completely rebuilds every Intranet page.
    My new software will approach the data differently.  My raw data will be stored with no pre-processing. The pre-processing will occur as the user changes dates and the pages will be built individually on demand, one at a time.
    The second phase of my Windows Form app will be to create pop-up windows that allow the users to modify the definitions for their custom views of the market. 
    When a view is changed, the software will be able to pre-process, as needed, the current date’s data and rebuild the current page with any new changes.
    I intend to create a Refresh.cpp file.  The various segments of the Form’s code will set variable such as date change, view changed, watch list changed, etc. and then call Refresh(). 
    The refresh code will then be able to do the minimum recalculation necessary to rebuild the proper HTML stream. 
    This is another reason to break up the code into various cpp segments such as: LoadRawData, RecalculateViews, BuildPage, etc.
    PS: David, I tried to send you a personal e-mail using your home page link. 
    Hope that was OK and not against forum rules!

  • Regarding the email function in Iphoto

    When I email ordinary through mail, I add a attachment in the email, then it is shown inline and as a attachment.
    But when I use the email function in iphoto it only inlines the picture, it doesnt add the file as regular attachment, is there anyway I can change that?

    the reason why I need this so you understand me.
    is that I use to blog from email.
    if I email regular no problem at all with my attachment, but if I email through iphoto my blog doesnt recognize the picture in the email so it dont get added.

  • Email function only allows log on by email address

    The Email function only allows an email address to be used as the log on.
    My ISP's email system uses a single word hostname, therefore I cannot set up an email account with valid SMTP log on credentials.
    This is obviously OK for systems like GMail, where xyz@gmail is used together with a password but there are many systems that require just xyz and a password.

    Hi,
    The fix for this bug, might fix the issue you have.
    NX-OS 5.2(6b) Release Notes
    http://www.cisco.com/en/US/docs/switches/datacenter/mds9000/sw/5_2/release/notes/nx-os/mds_nxos_rn_526b.html#wp916553
    CSCuc03438
    Symptom: The first SSH login on a Cisco MDS 9100 or 9200 Series switch always fails.
    Workaround: This issue is resolved
    Regards,
    David.

  • Email functionality?

    The following text I found at the URL below that talks about delivering your content via email. Is there documentation on how to use and implement custom delivery channels? Also could you tell me what email functionality Ebusiness 11.5.10 or where are documents on it?
    http://www.oracle.com/technology/products/xml-publisher/index.html
    Deliver to Anywhere
    Deliver your content via printer, e-mail, fax, WebDav, or publish your report to a portal. The Delivery Manager's open architecture allows for easy implementation of custom delivery channels, as well.
    Thank you,
    Mark

    I was able to use a pl/sql and a generic email program to send out reports generated from BI publisher.
    This may look complicated but is easy if you break it out .
    Requirement:- Sales order summary report need to be send to sales agents as a nightly run.
    The process is simple
    1) create a generic email program that will accept the directory and has the capability to read blob then attach to the email.
    2) create a DIRECTORY in oracle database to point to APPLOUT
    3) create a custom package that will submit the concurrent program that will create the pdf report.note make sure to add the layout before submitting the concurrent program sample
    APPS.FND_REQUEST.ADD_LAYOUT('XBOL','XXCPD_OEXDRCAP','en-US','US','PDF');
    4) Based on your environment the output pdf will be created in the APPLOUT location in the format SHORT_NAME_REQUESTID_1.pdf
    5) call your generic email program to email this pdf.
    This is only an alternative method instead of messing around with java code. What i have seen is if the pl/sql is generic this is a repeatable and transportable process.
    Thank you,
    Tom
    WWW.CROOTPAD.COM

Maybe you are looking for

  • How do I print a label that has the artist/album on the side?

    I have tried printing labels with iTunes but these are apparently for the thin CD covers. I am looking for a way to use iTunes to print out labels that has the artist and album on the side for use with regular CD covers so that I can look at the case

  • Maximum ram: imac 2.4ghz core 2 duo (2007)

    hi all, I have a 24" imac (2007) model that I would like to upgrade. The original specs say that 4gb is the maximum amount. I am not sure whether this was a hardward or software limitation (or both). However, I have recently found ram available from

  • Getting error "Object variable or with block variable not set" when trying to open a FR report in studio

    Problem Description We are on FR 11.1.2.2.305 installed on AIX. a user is getting this error: "Object variable or with block variable not set" when trying to open a FR report from FR studio client installed on windows xp . Initialy, we thought it may

  • Compilation albums in iTunes 11

    This thread is as a result of a post in December 2012, in another thread ( https://discussions.apple.com/message/20450908#20450908 ) by jacdan. I felt it would be preferable if this discussion was kept separate from the original post. Until now, iTun

  • File Archiving System

    Hi I need help on developing a system of File Archiving using forms 5.0 (oracle 8) my email [email protected]