Send an email via form

Hi everyone
I have a quiz in a form format, that i would like people to answer and by pressing on submit button the form to be sent to a specified email address.
Does any body know how to do so (in a simple way, because it's my first time with oracle applications and with pl/sql)
Thanks
Esther

Jacky,
The code that I have posted is meant to be used if you are using UTL_SMTP (It is used to send mails through Oracle Database).
This is the logic I have used. You need to put the codes at appropriate place to work.
1) I have totally used UTL_SMPT & DBMS_JOB (For scheduling jobs). Every thing is done at Database end.
2) The Portal Form provides an interface to insert data in a table. It inserts a minimum of the following: sender name, recepient name, subject & Message.
3) Now I have scheduled DBMS_JOB to call a procedure that picks data from this table,
and sends the mail to the sender. After sending I am deleting the mails that has been send and storing them in a history table for reference.
Now to use it all you need to do is create these pocedures & tables in the database.
Use the form which you have created to populate the table with sender,recepient,subject & message (You can use a database trigger to sort and populate data into this table if your form is based on another table).
You can set the DBMS_JOB to whatever interval you want according to your need.
Hope I didn't confused you,
Try reading Oracle Doc on:
DBMS_JOB, UTL_SMTP
Thanx,
Chetan.
null

Similar Messages

  • Sending emails via Forms or pl/sql

    Does anyone know how to implement UTL_SMPT for sending emails via Forms or pl/sql ?
    If not, any other suggestions for sending a newsletter-type of email to a fairly large list of people ?
    Thanks,
    Bob

    If your are using microsoft windows you can achieve this by using MAPI SESSION & MAPI MESSAGE ActiveX Control.
    These controls are not installed in windows by default, you have to install these from some cd like visual basic, visual studio etc.
    Zulqarnain

  • Sending external email via SAPCONNECT

    Hi all,
    I want to know how to send external email through sap.
    Thanks in advance,
    Manosh.

    HI,
    Try this  code:
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Reward points if found helpful....
    Cheers,
    Chandra Sekhar.

  • Unable to send out emails via outlook express since 06/29/2010

    Task '[email protected]" - Sending' reported error (0x80042109) : 'Outlook is unable to connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).'        This is a copy/paste of error message from Office Outlook  2003
    Our household has been unable to "send" outgoing emails since 06/29/2010.  This includes a wireless laptop and a PC. We both lost the ability to send emails same day.  We changed NOTHING and did not share emails with each other that would have corrupted our system. During this time I have had 2 Verizon techs dance around in the PC doing all the same things I did as well as what  the automated assistant did.  The last tech said the Outlook Express 6.0 was corrupted, and to unistall it and then reinstall;  this time 2 hours later, I think he just gave up).  That did not work either.  I tried using the Outlook Office and still got an error message for outging. Everything is set up as it was when it was working until 06/29/2010.  I was told that there was a new server being installed and that things wold be working by 07/02/2010... I have tried taking down the firewall, turning off virus protection (McAfee), changing from outgoing.yahoo.verizon.net to just outgoing.verizon.net, checking boxes, unchecked boxes. SMPT is set to 587.  We get incoming fine.  I hate using the "Verizon email site" as too much monkey motion to get to mail, but that's what we have been doing.  I even tried setting up a GMail account, again got mail still could not send.  Any ideas?

    Thank you for your response!  I even tried sending an email via dos prompt  with Telnet, got past "HELO", but when trying to get a  "RCPT TO"  (using outgoing.yahoo.verizon.net)  I got an "authorization required" response and then was dropped.  I have been passed around without a solution. I am about ready to change ISP, but really hate to as most of the time (years now) this has been a decent ISP. If Verizon is having a problem just say so, I can handle it, honesty would be nice, refreshing and not wasting so much of my time as well as the techs!

  • Sending an email via AppleScript and Dialogue Boxes

    I am trying to write a script to send an email via Mail of which the body of the message is from a dialogue box. I decided upon using Automator and AppleScript. I have, so far, the following workflow:
    1. Run Apple Script:
    set mypass to text returned of (display dialog "What are you doing?" with icon 1 buttons {"Tweet", "Cancel"} default button "Tweet" default answer "")
    2. New Mail Message.
    3. Send Outgoing Messages.
    4. Run Apple Script:
    on run {input, parameters}
    tell application "System Events" to set visible of process "Mail" to false
    return input
    end run
    I wand this workflow to allow the user to input an answer and this answer to be in the message field of the email. I can use the "Ask for Text" action in Automator but it does not allow for any control over the appearance of the dialogue box. The first script returns the result "<whatever is typed>" (ie. "Test") in the Results field below the script box, as does the "Ask for Text" action but it does not insert it into the message. Does anyone know what is going wrong here?
    I am relatively new to AppleScript which is why I am using Automator but would like any information on how this could be done entirely in AppleScript. My previous attempts at sending email using script was unsuccessful.
    My aim is to save this as an Application with a proper icon.

    see my reply to your post in the snow leopard forum.
    http://discussions.apple.com/thread.jspa?messageID=10318297&#10318297

  • I cant send an email via UTL_MAIL : ERROR NO 530

    hi .. i want to send an email via UTL_MAIL package. I am using ORACLE XE 10g.
    I am trying this code :
    declare
    i INTEGER;
    BEGIN
    UTL_MAIL.send('[email protected]','[email protected]',NULL,NULL,'DENEMEKONU','DENEMEMESAJ',NULL,NULL);
    END;
    then, i encounter this error:
    ORA-29279: SMTP permanent error: 530 5.7.0 Must issue a STARTTLS command first.....
    I made settings of smtp mail with:
    ALTER SYSTEM SET SMTP_OUT_SERVER='smtp.gmail.com';
    But i am getting this error consistently.
    How can i solve this problem, thanx.

    Hello Kadir,
    any errors, NDRs, logs that you could provide? How do you know the messages are not getting trough to that address?
    Regards,
    Andreas

  • Sending an email from forms

    hi all,
    i need your help.i.e how to send an email from forms .we actually want that facility in our project.we are trying for that but not yet geting .please help me giving information about email in forms.
    thank you in advance

    If you are using Forms on the web, one of the most easiest way to do it is to use the Java mailing support from sun. You can load it into the rdbms 8i or later and use it. There is a step by stepp detailed description on
    www.oracle.com > publications > Oracle Magazine > Ask Tom. If you just type java mail it will be between the first ten I suppose, it's a popular topic.
    HTH,
    Tamas

  • Error 1172 occurred when sending smtp email via labview

    I found these two useful vi example to send smtp email using Labview:
    http://decibel.ni.com/content/docs/DOC-7451
    http://decibel.ni.com/content/docs/DOC-2401
    However, I got error 1172 saying "No connection could be made because the target machine actively refused it 74.125.91.109:587". I'm using gmail to send emails and pretty sure that all the settings in the VI are correct. According to http://mail.google.com/support/bin/answer.py?answer=13287, I tried both 587 and 465 as the port, and nothing would help. 587 will give the 1172 error and 465 will hang the vi for a while after stopping it. This 1172 error is unlikely due to the suggestion from the 2nd link, "Note: If you receive Error -1172 with this example, try logging into the Gmail account with your browser.  This error can occur with Gmail accounts that have been inactive for a period of time.  You must log in with a browser and verify CAPTCHA text to reactivate the account." because the error kept on even when I login to my gmail account.
    I got myself a solution from http://stackoverflow.com/questions/2737823/unable-to-send-smtp-mail-with-net-network-issue, which says to turn off the antivirus software. I turned off McAfee on my PC and it did work. Now, I'm able to send email, even when I log out my account. However, I'm not happy since I have to keep my antivirus off. My question is, is there any way to walk around this issue? i.e. being able to send email with antivirus on?
    My 2nd question: how to send message to multiple recipients? The string array to the "recipient" does not work, and the form of "[email protected];[email protected]" does not work neither. Do I have to create multiple property nodes for the recipients or better way to do it?
    Many thanks 
    Message Edited by holyna on 06-14-2010 11:34 PM

    Hi Bhuvanesh,
    I noticed that the original thread here hasn't been updated in over a year. In the future, it will be helpful if you begin a new topic for your issue.
    I will first address your second question concerning sending SMS messages using LabVIEW. The only way LabVIEW can send an SMS text message is by passing an e-mail to the appropriate SMS gateway service. This gateway will vary by cellular provider. You will need to obtain the SMS gateway service information for each carrier you wish to push text messages to. 
    As far as the error you are receiving, we will need more information in order to narrow down your problem. What is the exact error message you're receiving? Are you receiving "1172: No connection..." or some other variation? A screen capture of your code would also be very useful.
    Regards,
    Andy C.
    Applications Engineering
    National Instruments

  • Need to send an email via workflow if a field changes

    Hi,
    so I have this field called temination date in an infopath 2010 form. When (if) a user changes that field, I need to send an email out to other users, but I can't figure out how to do it, I have tried making another field called temination date before, but
    the problem I am having with it is getting it to populate. I should say that the field temination date before was just a regular list field, not an infopath field, not sure if that matters.
    any help at all would be greatly appreciated
    Best regards, Mike

    Mike,
    From your description, here is what I understand.
    Your InfoPath form saves to a form library having 2 columns Termination Date [Date and Time data type, promoted from InfoPath Form] and Termination Date Before [Date data type, created on Form library].
    On save[submit] of the form, a workflow [created using SharePoint Designer] triggers, with the below logic.
    If CurrentItem.Termination Date Before  is blank Then assign the Termination Date to Termination Date Before
    else send an email Termination Date changed from Termination Date Before to Termination Date, set Termination Date Before to Termination Date 
    Is the difficulty you are facing is when you assign Termination Date to Termination Date Before?
    As Ram suggested, can you try modifying your workflow logic with just as : log to history list CurrentItem.Termination Date, change the termination date and save the form, verify the workflow triggered, verify the correct value logged to the
    workflow history list by opening the workflow instance from items workflows?
    -- Shan

  • Sending external email from forms

    Hello.
    I want to send an email using a form and a report. The report is the attachment of the email. I run the report from form using this command
    v_rep := RUN_REPORT_OBJECT(repid);
    If i send the mail to an internal address, works properly. If i want to send the email to an external address i have this error:
    FRM-41214
    Error when running report ORA - 0000: normal, successful completion
    I made a check with telnet on my computer and i managed to send an mail to an external address.
    Anyone has any idea?
    Thanks.

    I looked at the logs on the SMTP server, the extern mail doesn't even reach the SMTP server queue.
    I enabled the trace for the report server and I get this error:
    [2008/6/6 0:52:18:703] Exception 50152 (): Error while sending mail - Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
    at oracle.reports.utility.Utility.newRWException(Utility.java:756)
    at oracle.reports.server.MailService.send(MailService.java:492)
    at oracle.reports.server.DesMail.sendFile(DesMail.java:186)
    at oracle.reports.server.Destination.send(Destination.java:489)
    at oracle.reports.server.JobObject.distribute(JobObject.java:1582)
    at oracle.reports.server.JobManager.updateJobStatus(JobManager.java:2231)
    at oracle.reports.server.EngineCommImpl.updateEngineJobStatus(EngineCommImpl.java:134)
    at oracle.reports.server._EngineCommImplBase._invoke(_EngineCommImplBase.java:94)
    at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
    at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
    at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
    at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
    Thanks

  • Send confirmation email with form data

    Hi:
    I need to have a form do several things when the user hits submit and I'm hoping someone can give me some insite:
    1. It needs to insert record into my DB (got that one figured out)
    2. It then needs to send two emails with all of the form information, the first one to the email address that the user inputs in a field, the second to a general box (ie [email protected]).  This is where I am seriously stuck.
    Any help you can offer would be much appreciated!
    thx!

    I'm using the Dreamweaver Insert Record (it's a MySQL db  with PHPmyAdmin as the face).  This seems like it should be a fairly common and standard request and I just can't seem to find the right answer.  I can post code, if that would help.
    ab

  • Sending an email via mailto: URLs

    Hi all,
    is it possible (and how! :) ) to send an email from within a JAva application using the 'mailto:' URL in order to use the locally installed email client?
    What I need is to be able to use the local mail client to send an email with an attached file and a return receipt from within my app.
    Any suggestions?
    TIA,
    Luca.

    Since you want the return receipt, then you have to have a place for that return receipt to be returned to. If you are just "bouncing" a mail off of another application, you do not have a return path to recieve the receipt.
    The "bouncing" mail off of the local client is not doable with the mailto--if you try a mailto link it opens your local client with a pre-addressed mail (if you are lucky).
    You need to use the Java Mail API.

  • Sending an Email via ColdFusion as a Service leads to ActionScript-Error "Server is undefined to setup the connection"

    Hi,
    Ben Forta shows in his video "ColdFusion9 exposed as Flex Services" how to send an Email using ColdFusion as a Service.
    I tried out this example with Flashbuilder4 Beta2 but I got the following ActionSript-Error:
    Error: Server is undefined to setup the connection
        at coldfusion.service::BasicService/initializeConnection()[D:\p4\depot\ColdFusion\cf_main\to ols\AIRIntegration\Services\src\coldfusion\service\BasicService.as:278]
        at coldfusion.service::BasicService/call()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegrati on\Services\src\coldfusion\service\BasicService.as:226]
        at coldfusion.service.mxml::Mail/execute()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegrati on\Services\src\coldfusion\service\mxml\Mail.as:370]
        at CFaaS/button1_clickHandler()[C:\Dokumente und Einstellungen\walter\Adobe Flash Builder Beta 2\CFaaS\src\CFaaS.mxml:18]
        at CFaaS/___CFaaS_Button1_click()[C:\Dokumente und Einstellungen\walter\Adobe Flash Builder Beta 2\CFaaS\src\CFaaS.mxml:93]
    Who has an idea what to do?
    Thanks in advance,
    Walter

    Hi,
    We tried this out and it works like a charm
    Actually even we hit the issue you have mentioned but on further investigation we could get things working.
    Please follow these settings, we are not sure if you have done all of these:
    a) In CF9 administrator, under Mail section please type your server name, username and password. Check the ' Verify mail server connection'
    checkbox and click 'Submit Changes'. Make sure you get the message 'Connection Verification Successful'.
    b) Under Security-> 'User Manager' section in CF9 administration,  add an user using 'Add User' with the following info:
    username, password, confirm password , check both RDS and administrative access and add 'Exposed Services' by selecting the required services.
    eg: Mail Service and click 'Add User'.
    c) Go to 'Security->Allow IP Address in CF9 administrator and enter your IP address and say 'Add'.
    d) After add the following tag in addition to CF:Mail,
    <cf:Config  cfServer="" cfPort="8501" servicePassword="" serviceUserName="" />(the values entered here should be same as the ones configured under 'Add User' and 'Allow IP address' section).
    Please find attached the mxml file (TestCF.mxml) which has the Flex code.
    Also, add the 'CFService.swc' into your project. Go to  Project->Flex Build Path->Add SWC and point to D:\ColdFusionCentaur\wwwroot\CFIDE\scripts\air (subject to CF9 installed location).
    Please try the workflow by following these steps and let us know if things work fine
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • My N9 can't send a email via using icloud smtp ser...

    I follow the guideline from iCloud mail server information to setup email account, but every time i was trying to send an email, a pop-up message show : 'Can't connect to SMTP server :" smtp.mail.me.com" or it doesn't exist '. Everyone can help me to configure out why? Thank you so much!

    N9 imap mail sending does not work with .mac/.me (iCloud) mail. I have these settings (automatic and also manually set from Apple page).
    Mails stays at outbox with smtp server error (lates N9 update)
    SMTP (outgoing mail server) information:
    Server name: smtp.mail.me.com
    SSL Required: Yes
    Port: 587
    SMTP Authentication Required: Yes
    Username: [email protected] (use your @me.com address from your iCloud account)
    Password: Your iCloud password
    http://support.apple.com/kb/HT4864

  • Sending work emails via orange livebox

    Ok...i have a major headache. I am using an orange wireless livebox to connect to the internet while at home (which works fine). The problem i have is that i can not send work emails from home. I should imagine it has something to do with the outgoing server address being different in work to home, but even when i manually put the orange outgoing server add in preferences, the mail wont send. Does anyone else have this problem as it is doing my head in now. I was using ntl for my broadband up until i switched to orange and had zero problems with this work email from home...Why on earth would it be so different now? And yes, i have just phoned orange and had to spell out my complaint to an Indian lady who didnt understand me anyway!...Im losing the will to live here. HELP HELP HELP

    Ahh yes, im sure i can get it to work by putting in the orange outgoing server address, but its so frustrating. It worked perfectly with NTL from home before...I just dont understand why orange have to be so different.

Maybe you are looking for