Sending email with form items embedded

I would like to send an email from my apex application that has a form embedded with a submit button to send the filled out form back to intended email address. I've tried the following in the sql workshop but got an error
DECLARE
l_body clob;
l_to varchar2(50);
l_from varchar2(50);
l_sub varchar2(75);
begin
l_body := '<html><body><form method="post" action="mailto:[email protected]" enctype="text/plain"> Name: <input type="text" name="Name" size="30"> <p> Address: <input type="text" name="Address" size="30"> <p> <input type="submit" value="Submit"> </form></body></html> ';
l_to := '[email protected]';
l_from := '[email protected]';
l_sub := 'Test Form';
    apex_mail.send(
    p_to => l_to,
    p_replyto => l_from,
    p_from => l_from,
    p_body_html => l_body,
    p_subj => l_sub);
   APEX_MAIL.PUSH_QUEUE;
end;
ORA-06550: line 12, column 5:
PLS-00306: wrong number or types of arguments in call to 'SEND'
ORA-06550: line 12, column 5:
PL/SQL: Statement ignored
*1. DECLARE*
2.  l_body clob;
3.  l_to varchar2(50);Edited by: PktAces on Apr 12, 2010 12:30 PM
Also, ideally I wanted to be able to submit an update from an email that I sent, but I'm not sure that is possible or desirable on a security sense. Any thoughts on this?
Edited by: PktAces on Apr 12, 2010 12:32 PM

This is one that is in production. It is implemented as a trigger, but if you substitute variables for columns, it will work.
Note that this depends on having the UTL_MAIL package installed and the Mail Server set up. I like it a lot more than the UTL_SMTP, as it just takes one call.
create or replace TRIGGER  "BI_TC"
  before insert on TC
  for each row
DECLARE
  e_id        NUMBER;
  c_id        NUMBER;
  emp_nm      VARCHAR2(100);
  clrk_id     NUMBER;
  e_clrk      VARCHAR2(47);
  e_org       NUMBER;
  e_sender    VARCHAR2(50);
  e_recip_lst VARCHAR2(255);  --
  e_cc        VARCHAR2(100);
  e_bcc       VARCHAR2(100);
  e_subj      VARCHAR2(50);
  e_msg_ln1   VARCHAR2(100);
  e_msg_ln2   VARCHAR2(100);
  e_msg_ln3   VARCHAR2(100);
  e_msg_ln4   VARCHAR2(100);
  e_msg_ln5   VARCHAR2(100);
  e_msg       VARCHAR2(1000);
  CRLF        CHAR(2) := CHR(13) || CHR(11);  --
begin
  IF :NEW.INJURY_FLAG = 1 THEN
    e_id          :=  :NEW.EMP_ID;
    c_id          :=  :NEW.TC_ID;
    e_org         :=  :NEW.VEH_LOC;
    clrk_id       :=  :NEW.TC_ENTRY_EMP_ID;
    select EMP_FNAME ||' '|| EMP_MNAME ||' '|| EMP_LNAME into emp_nm
      from EMPLOYEES
     where EMP_ID = e_id;  --
    select ADMIN_USERNAME into e_clrk
      from APEX_ACCESS_CONTROL
     where ID = clrk_id;
    select RECIPIENTS, CC, BCC
      into e_recip_lst, e_cc, e_bcc
      from SAFETY_NOTIFICATIONS
     where ORG_ID = e_org;  --
      e_sender    :=  '[email protected]';
      e_subj      :=  'Loss Reported';
      e_msg_ln1   :=  'Employee: ' || emp_nm || ' (' || e_id || ')' || CRLF;
      e_msg_ln2   :=  'Was reported as sustaining a loss' || CRLF;
      e_msg_ln3   :=  'by ' || e_clrk ||CRLF;
      e_msg_ln4   :=  CRLF;
      e_msg_ln5   :=  'Sent ' || to_char(sysdate,'MONTH DD,YYYY HH:MI AM');
      e_msg       :=  e_msg_ln1 || e_msg_ln2 || e_msg_ln3 || e_msg_ln4 || e_msg_ln5;
     utl_mail.send(
       sender => e_sender,
       recipients => e_recip_lst,
       cc => e_cc,
       bcc => e_bcc,
       subject => e_subj,
       message => e_msg);
  END IF;
end;
/This one is an email that generates if the employee reports an accident. Note that the list of recipients is table-driven, allowing a manager to set up who receives the emails. Emails are stored in a semi-colon-separated list in a text field.

Similar Messages

  • Send email with form values

    I have a form that has around 20 field values that need to be emailed to someone. I have sent emails before using JavaMail on my Tomcat 4.1.27 container.
    I assume there is a better way to send all 20 values besides forwarding each value to the JavaMail program?
    Please advise best way to do this.

    Hi
    1. Yes, He can the dropdown list , in the attached PDF File.
    2. First you can import that PDF file into your form layout then
    You can connect the form with OLEDB data connection after that, drag and drop the button in the layout, and you can rename that button "UPDATE"
    Select that button then select CLICK event and script as JavaScript and write the following code in that
           xfa.sourceSet.DataConnection.update();
            the contents will update in the sap table
    Thanks
    Sriiiiiii(Srikanth)

  • Send Emails with Forms

    How can I open a window's email when I press a button and call
    when-button-press trigger?
    If anyone know the answers, please write me to [email protected]
    null

    Hi all!
    But I still need to click Send button from mail box. Do you know how to automatic to send without clcik nay button.
    PLease let me know, thank you
    my email address : [email protected]
    Thanks again
    MT
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by linh:
    I used forms5.0 and report 3.0 to do email. It brings up MS Exchange. In the when_button_trigger, I call send_email procedure. I create the parameter list and use run_product to call report. The user needs adobe Acrobat to read your message *.PDF file.
    Here is the code:
    Add_Parameter(pl_id, 'DESTYPE',TEXT_PARAMETER,'MAIL');
    Add_Parameter(pl_id, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
    Add_Parameter(pl_id, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
    Run_Product(REPORTS, 'PLS_EMAIL', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    Report 3.0 has bug. It won't take the email address. The email address is specify in DESNAME. Oracle said it is fixed in form 6.0. My users do not mind typing who to send.
    Hope it works for you.<HR></BLOCKQUOTE>
    null

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • CRM 2013 Online - sending email with CRM Online and jQuery

    Hi,
    I have a html page in webresource in a CRM 2013 Online form.  There is a button to send an e-mail from the html page.  Because this is an embedded html, I will not be able to create a plug-in to trigger 'send an e-mail'.  The best bet
    is to send an e-mail via javascript.
    I found an article about 'Sending email with SharePoint and jQuery',
    http://geekswithblogs.net/ThorvaldBoe/archive/2014/07/03/sending-email-with-sharepoint-and-jquery.aspx
    Is there a similar Jquery way we can send e-mail from CRM 2013 Online?  Thanks.

    Hello,
    Actually you can send email through plugin using Actions feature. Recheck my articles about the feature -
    http://a33ik.blogspot.com/search/label/Action
    In case you anyway want to send your email directly you should recheck following articles:
    http://mileyja.blogspot.com/2012/02/create-email-activity-in-microsoft.html
    http://mileyja.blogspot.com/2012/02/send-email-synchronously-in-microsoft.html
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Sharepoint Online - Send email with attachment

    Hi All,
    is there some way how to send email with attachment, which is attached to list item in host web?
    I tried some of solutions but none of them not working.
    Server side:
    For example event receiver after added list item with attachment - Because it is office 365, in SandBox solution I can´t use SmtpClient class.
    Any other ideas?
    Client side:
    For example client web part with REST call. It works fine until I don´t need access to attachment.
    string oDataUrlAttach = "/_api/Web/lists/getbytitle('ListName')/Items(6)/AttachmentFiles('Document.docx')/$value";
                HttpWebRequest itemRequestAttach = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + oDataUrlAttach);
                itemRequest.Method = "GET";
                itemRequest.Accept = "application/atom+xml";
                itemRequest.ContentType = "application/atom+xml;type=entry";
                itemRequest.Headers.Add("Authorization", "Bearer " + accessToken);
                HttpWebResponse itemResponseAttach = (HttpWebResponse)itemRequestAttach.GetResponse();
    Here I get error: The remote server returned an error: (403) Forbidden.
    But other calls are OK. I can get all items from my list except attachments.
    Any ideas?
    Thank you.

    Why hasn't this been answered?
    Sam Ogle

  • Can I use DeliveryManager just to send email with no document?

    Can I use "oracle.apps.xdo.delivery.DeliveryManager" to just send email without any document attached? or
    Is this only used to deliver the documents by email?
    I just want to use DeliveryManager just to send email with content in the body of the email. I am using BI Publisher API.
    Can any of you provide sample input for the above?

    Hi,
    You can use iMovie to record the message and save it as an email sized item and send the file as email like before.
    For those iChat AV users without a Cam and the AIM users without a cam you can do One-Way Viedo chats.
    Once you have a recorded Video file you can also drop the file on any Buddies name in you iChat Buddy list rather than using email.
    For those using other services you can set up a Jabber account and enable the required Transport/Gateways and send the files that way.
    http://www.jabber.org.au/ichat = Australian Page
    AllForces
    These are the two main information pages on how iChat can connect to the other IM services.
    Jabber Public Server list
    That would appear to be everybody.
    Ralph

  • When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a symbol on every line. How to stop this from happening?

    When send email with emoticons to a pc user, emoticons show as an empty box. Also, email content has a > symbol on every line. How to stop this from happening?

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • Send Email with Attachment in BSP?

    Hello,
         I have trouble about sending Email in BSP .
         I don't know how to <b>Send Email with attachment in BSP</b> . Please give me some advice .
        Thank you very much!

    Here is a sample application..
    <b>Layout</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Send Mail with Attachment " >
        <htmlb:form id           = "form1"
                    encodingType = "multipart/form-data" >
          <htmlb:label for  = "MAILTO"
                       text = "Mail to" />
          <htmlb:inputField id    = "MAILTO"
                            size  = "20"
                            value = "<%= mail_to %>"
                            type  = "string" />
          <htmlb:fileUpload id          = "myUpload"
                            onUpload    = "HandleUpload"
                            upload_text = "Attach"
                            size        = "90" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Page attributes:</b>
    mail_to     TYPE     ADR6-SMTP_ADDR     E-Mail Address
    <b> Event handler OnInputprocessing..</b>
    DATA: fileUpload TYPE REF TO CL_HTMLB_FILEUPLOAD,
          file_content TYPE XSTRING,
          file_length TYPE STRING,
          file_mime_type TYPE STRING,
          file_name TYPE STRING.
    fileUpload ?= CL_HTMLB_MANAGER=>GET_DATA(
                           request = request
                           id      = 'myUpload'
                           name    = 'fileUpload' ).
    if fileUpload is not INITIAL.
      file_name      = fileUpload->file_name.
      file_mime_type = fileUpload->file_content_type.
      file_length    = fileUpload->file_length.
      file_content   = fileUpload->file_content.
      mail_to = request->get_form_field( `MAILTO` ).
    * Send mail part..
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
            lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    * Message body and subject
      DATA:
            lt_message_body TYPE bcsy_text VALUE IS INITIAL,
            lt_att_content_hex type solix_tab,
            lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear Vendor,' TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Please find the attached report.'
      TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Visit report' ).
      data: data_tab type solix_tab,
      p_data type XSTRING.
    * Pass the data of the document we have uploaded..
      p_data = file_content.
      call function 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer     = p_data
        TABLES
          binary_tab = data_tab.
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Visit Report'
          i_att_content_hex = data_tab ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    * Add attachment
    * Pass the document to send request
      lo_send_request->set_document( lo_document ).
    * Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send type ADR6-SMTP_ADDR value '[email protected]'.
    * Set sender
      l_send = mail_to.
      lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender ).
    * Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
      lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
    ** Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    * Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
    endif.
    Hope this will be helpful.
    Raja T

  • TS3899 Cannot send email with new iPad air.  Works fine with old iPad and iPhone.

    Cannot send email with new iPad air.  Works fine with old iPad and iPhone.  I have deleted account and reinstalled.

    Thanks.  I got the problem fixed.  Spent time with the Apple folks and was kicked up to a senior advisor.  It seems the problem was with my internet provider - Tmie Warner.  Remember I could use the old ipad and the iphone to send mail.  I checked all the specifics between the three units.  It seems that TW is changing over from the RR.com  to TWC.com.  Since the new ipad air was just set up, it fell under the new TWC mail specifics. 

  • How do I use my iPhone's hot spot to send email with Mail ?

    Hi,
    My land line is dead ... so no phone nor internet at home.  But I can use my iPhone'hot spot to get on the web from my iMac.  Great ... it works !
    Oups !   I cannot send email from my computer using my iPhone's hot spot with Mail.
    How do I do that ?
    Regards.
    Robert Lespérance

    Hi Templeton Peck,
    Thanks for droping in my thread ...
    Doesn't the fact that I can surf the web with my iPhone's hot spot and that I cannot use Mail normally has I normally do give you a clue what the problem could be ?
    What other information can I give you other than normally I can surf and send email with my regular ISP.  Now that my ISP is dead I am using my iPhone's hotspot to surf the web awaiting that my ISP's connoection returns. Surfing is OK but I cannot send emails with through Mail.
    When I want to send an email from my computer, I get a message asking me to select the the SMTP server.  Then I select my usual ISP server, but the message comes back telling me it does not work.
    Is there any other configuration to do ?

  • I'm not able to send emails with mail.ru. Receiving and reading is not a problem. When I create a email with mail.ru its not possible to send it although its stored in my mail.ru account as "still to be send". What can it be??

    I'm not able to send emails with mail.ru. Receiving is not a problem. Creating a mail is also not a problem and the mail will be stored at mail.ru as still to be send, only problem is its not possible to send. I noticed the buttons for sending change colour when used but they don't perform. What it is?

    Don't know what changed, but all of a sudden able to send emails by mail.ru ...... sorry for bothering.

  • I have 2 email accounts the second one i have only recently added, i have sent one email from my second account but i cant seem to send anymore, it says "cant send email with selected server" i am still able to send emails from my first account. Any ideas

    I have 2 email accounts, the second i only just recently added, i was able to send an email from this account after i added the account but am not able to send anymore emails. It says "unable to send email with selected server" there are no other servers to choose from. please help! TIA

    Hi apmichael,
    If you are having issues sending email from one of your mail accounts on your iPhone, you may find the following article helpful:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/ts3899
    Regards,
    - Brenden

  • Problems sending emails with iPhone 3G and outlook exchange

    I have a problem sending email with exchange. Receiving and answering mail works fine and calender updates work fine. However when I initiate an email from the phone it syncs and ends up in the sent folder in the computer but never reaches the recipient. I have tried this many times with different recipients and phones. It only happens from my iphone and ipad. Any suggestions?
    Any help much appreciated

    The iPhone you returned is still syncing against your server and locking out your account. Someone possibly has access to your mail data. I'd recommend having your Exchange Administrator install the Microsoft Exchange Server ActiveSync Web Administration Tool (http://www.microsoft.com/downloads/details.aspx?FamilyID=E6851D23-D145-4DBF-A2CC -E0B4C6301453&displaylang=en) and attempt to wipe/delete/block that other iPhone.
    Message was edited by: ethanm

  • Is there any problem to use multiple threads to send email with JavaMail

    Dear all,
    I am using JavaMail 1.3.2 to send emails with SMTP, it works very well for a long time.
    But one day, I found that the email service hanged and I could never send email again until I restart the tomcat. I found that the reason was a deadlock had been created, the required resource for sending email had not been released.
    I guess the error is due to multiple threads are sending email at the same time. I made a test to create seperate thread for sending each email. After few days, I found this deadlock happened again. So, my question is: Can I use JavaMail with multiple threads? If not, I may need to sychronized all the thread that using JavaMail. I would like to make sure this is the reason for causing the deadlock problem.
    Here is part of my code for using JavaMail:
    transport = session.getTransport("smtp");
    transport.connect(email_host, smtp_user, smtp_pass);
    message.saveChanges();
    transport.sendMessage(message,message.getAllRecipients());
    which is very standard call, and it worked well for a long time.
    Here is part for my thread dump on tomcat:
    (Thread-339)
    - waiting to lock <0x5447c180> (a sun.nio.cs.StandardCharsets)
    (Thread-342)
    - locked <0x5447c180> (a sun.nio.cs.StandardCharsets)
    It seems that these happened after call the method transport.sendMessage() or message.updateChanges()
    , and the underlying implementation may require the JRE StandardCharsets object. But the object had been locked and never be released. So, the sendMessage() or updateChanges() can't be completed.
    Please give me some helps if you have any idea about it.
    Thanks very much!
    Sirius

    Note that the Nightly build gets updated daily (and sometimes more than once in case of a respin) and it is always possible that something goes wrong and it doesn't work properly, so be prepared for issues if you decide to stay with the Nightly build and make sure to have the current release with its own profile installed as well in case of problems.
    See also:
    * http://kb.mozillazine.org/Testing_pre-release_versions
    *http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    *http://kb.mozillazine.org/Shortcut_to_a_specific_profile
    *http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox

Maybe you are looking for

  • Can't see EJB objects in Application Navigator after migration

    Hello I can't see any objects in Application Navigator after migration from previous version of JDeveloper (9.2.0.5), in System Navigator view I can see all sources. Has somebody any idea what the reason is? Tom

  • Emails are automatically moved to Recover deleted Items folder

    Hi, We have a user and he is receiving his emails in Inbox but after few seconds it will be automatically moved to Recover Deleted Items. We checked his Outlook and also in OWA and we couldn't see any rule. Even though I ran /cleanrules switch but st

  • Can I use old landline number

    Maybe some can help me. I live with my parents in Waterford, Ireland. The local area code is 051, and I have a choice of new numbers that can receive calls. Is it possible to use our old landline number, as people may need to contact us. We are anxio

  • Video after video

    Hi All, I'll having a video presentation thru Keynote soon. Get ready the slides now. I'm wondering, do keynote possible to play a video after a video automatically? Just like video in slide 2 will auto play after video in slide 1 stopped then? Or, A

  • CS5 Flash Embed Code and IE8

    When using the default HTML embed code generated by Flash CS5, what appears to be an "object not found" icon is displayed momentarily as the HTML file is loaded in IE8 under a restricted bandwidth situation.  (Admittedly, I haven't had a chance to te