Need to send a link in mail using apex

Hi,
I need to send a mail using apex which will contain a link for a specific page. For sending mail , I used the following query:
for c1 in (select EMAIL_ADDRESS
             from USER_DETAILS
            where USER_NAME= :P4_USER_NAME and EMAIL_ADDRESS=:P4_EMAIL_ADDRESS) loop
  if c1.EMAIL_ADDRESS is not null then
    HTMLDB_MAIL.SEND(
      P_TO       =>  c1.EMAIL_ADDRESS,
      P_FROM     => '[email protected]',
      P_BODY     => 'Your new password is '|| 'xyzxyz',
      P_SUBJ     => 'Password detail' );
  end if;
end loop;
But how i will send the required link.
Pls give some idea.
Thanks,
Chandra Bhanu

Hi Chandra,
Try this version of your code, you will alter the url to map to your apex server.
DECLARE
   l_body   VARCHAR2 (4000);
BEGIN
   FOR c1
      IN (SELECT email_address
            FROM user_details
           WHERE     user_name = :p4_user_name
                 AND email_address = :p4_email_address)
   LOOP
      IF c1.email_address IS NOT NULL
      THEN
         -- Include link to login page
         l_body :=
               '<p>Your new password is '
            || 'xyzxyz'
            || '  To access the application and change your password, follow the '
            || 'link below.</p><p><a href="http://'
            || '</p><p><a href="http://edwprd:7777/pls/oitp/f?p=&APP_ID.:LOGIN</a></p>';
         apex_mail.send (p_to     => c1.email_address,
                         p_from   => '[email protected]',
                         p_body   => l_body,
                         p_subj   => 'Password detail');
      END IF;
   END LOOP;
END;
Jeff

Similar Messages

  • When I try and send a link from mail it says I must re-install my OS in my 2012 Mac Air

    when I try and send a link from mail it says I must re-install my OS in my 2012 Mac Air

    Typing in additional text seems to get the job done.  This seems to be a feature of the latest IOS update, I have never had the problem before the last update.
    I use the box with the arrow just to the left of the URL block at the top of the page to send myself links to pages of interest.  Adding the extra text seems like a pointless step, but it does work.
    Thanks.

  • How do I get Apple to send a link I can use to reset my password to my rescue email address?

    I don't know my password. I do know what my Apple ID and rescue email address are. How do I get Apple to send a link I can use to reset my password to my rescue email address?

    Without the Apple ID you can't get a password reset email. The link I gave above can help you recover the Apple ID as well, though, via your security questions. If you don't know those either, then you may be out of luck, though you can try calling Apple Support and asking to speak with Account Security and see if they can help, though you're going to have to prove that you actually own that Apple ID and aren't just trying to get illegal access to someone else's account.
    Regards.

  • Need to send mail using apex

    Hi,
    I am using apex 4.2 and oracle 11g XE. I need to send mail so I used the following code:
    HTMLDB_MAIL.SEND(
          P_TO       =>  '[email protected]',
          P_FROM     =>   [email protected]
          P_SUBJ     =>  'Data in TECHNICAL_DETAIL edited' ,
          P_BODY     =>  'Please click link below for affirmation/rejection of changes' ,
          P_BODY_HTML=>   '<p><a href="http://localhost:8080/apex/f?p=109:25:12079147455079">link</a></p>'
    It is going t apex_mail_queue successfully. Then I used the following code:
    which one i should use:
    1.
         wwv_flow_mail.push_queue(
            P_SMTP_HOSTNAME => xxx
            P_SMTP_PORTNO => 'yyy
    or
    2.
         APEX_MAIL.PUSH_QUEUE(
            P_SMTP_HOSTNAME => xxx
            P_SMTP_PORTNO => yyy
    Also what else I need to send mail and what should i  ask DBA to provide me so that mail can be sent successfully.
    Please give some idea.
    Thanks,
    Chandra Bhanu

    Hi,
    You should use APEX_MAIL.PUSH_QUEUE witch is documented
    APEX_MAIL
    Parameters
    Description
    p_smtp_hostname
    SMTP gateway host name
    p_smtp_portno
    SMTP gateway port number
    Note that these parameter values are provided for backward compatibility, but their respective values are ignored. The SMTP gateway hostname and SMTP gateway port number are exclusively derived from values entered on the Manage Environment Settings when sending email.
    Regards,
    Jari

  • I used to send a link from safari using mail. Suddenly i cannot do this anymore.I have checked all the details but nothing will work

    I have always managed to send  link from safari using mail Suddenly I no longer can do this and mail just sits with the message in outbox. I changed nothing and all the settings look the same. Very frustrating please can anyone help. I use an aol account with outgoing imap and incoming smtp port 587 with no check in ssl box. AOL will not help, and apple are not interested either. I find it frustrating when things that were working suddenly dont for no rason. I am running OSX 10.6.8 Thanks Tracy

    http://support.mozilla.com/en-US/kb/Managing+file+types
    Don't set Firefox for '''mailto'''. <br />
    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • Learning Solution - Need to send a reminder e-mail to all participants

    I need to be able to send a reminder e-mail to all participants in a course.  I would like the e-mail to be sent to the participants 7 days prior to the start date of the course.
    We currently use SMARTFORMS to send an e-mail to a participant when he is booked into a course.  We would like to send the same e-mail to the participant 7 days prior to the start of the course as a reminder. 
    Would I accomplish this using a workflow?  Does anyone know a function that could be used to send the same e-mail again?  We have not been able to find the code to send the e-mail to the participant again.

    Hii Karen,
    We are also facing the same problem, but with the same i also want to know that how to send an e-mail to a participant when he is booked into a course coz for me its not working.
    Could you please tell me the steps to follow.
    Thanks & Regards,
    Nidhi

  • Need to send some notifications by mail (not all notif)

    Hi!
    We run workflow embeded into EBS (11.5.10.2 4RUP). We have a custom workflow that uses Role (WF_LOCAL_ROLES) connected to employee register (ORIG_SYSTEM = 'PER' and orig_system_id = (person_id in per_all_people_f). we get the Role in the db package that starts the workflow and set it to the attribute Recipient.
    I assume there are standard notifications (WF) that are sent to these roles. the roles have a notification_preference = 'SUMMARY' because the administrators/user do not want the system to send many e-mails but a summary e-mail and the user should check theis notif in Applications.
    But... an here is the but....our specifc custom workflow creates a notification that we would like to send as an e-mail. what can we do?
    The mails should be sent specific to users/employees induvidually. I mean the e-mail is specicif constructed per employee, so it is not a good idea to create a Role that connect many users or something. Can we create new roles specific per user/employee with notification_preference = 'MAILHTML' (or other mail pref)??
    Would this work without intefiering with the other role. I need help to understand this functionality and how to get this to work. Thank you in advance!
    Regards,
    Patricia

    Hi,
    The only way that I can think of to do this would be to create an ad-hoc user at runtime which has an email preference set to MAILHTML (or any other preference that sends an email), and an email address set to the email address of the recipient. This would then send an email to the employee, and when the emails have been sent then you can purge the ad hoc directory so that you don't end up with lots of obsolete roles in the database.
    The downside of this is that there is no way for anyone to see the notification from within eBS. Because it isn't sent to the employee, it would not appear in their worklist, which may or may not be acceptable to the business. One possible workaround would be to create another ad-hoc role, and asssign both the employee user and the ad-hoc user to the role, and expand the role on the notification so that multiple copies are sent (one to each member of the role). If the notification requires a response, then you need to write a post notification function to deal with the possibility of multiple responses, which makes the solution more complex still.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Can't send FIOS/Yahoo e-mail using Thunderbird

    I've seen other posts about this but cannot find anything that helped.
    I'm trying to set up Thunderbird to send e-mail using my new FIOS/Yahoo e-mail address which is [email protected]  The ISP on the computer from which I am trying to send is Verizon FIOS.  I can receive e-mails in Thunderbird but cannot send.
    I have tried both using SMTS outgoing.verizon.net and outgoing.yahoo.verizon.net.  For incoming I had to use incoming.yahoo.verizon.net and it works.
    I've tried using Port 25 and Port 587.
    I've input my username both with and without the @verizon.net
    For "Secure Connection" I've tried all choices:  No, TLS, if available, TLS and SSL.
    Whenever I try to send an e-mail it usually asks for my password twice and after inputting it the second time I get a version of this message:
    The message could not be sent because connecting to SMTP server outgoing.verizon.net failed.  The server may be unavailable or is refusing SMTP connections.  Please verify that your SMTP server setting is correct and try again, or else contact your network administrator.
    Any advice?  Thanks.
    Solved!
    Go to Solution.

    somegirl wrote:
    1. Change your server to outgoing.yahoo.verizon.net - This is the correct outbound server for Verizon Yahoo accounts.
    2. Make sure the setting for "outgoing server requires authentication" is selected. - It should auth with your vz username and password
    If you are still having trouble, post the error. (The error you've posted here is for the wrong server.)
    Well, I had already done those things before.  The message I got when I tried is:
    An error occurred while sending mail.  The mail server responded: From address not verified - see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html.  Please verify that your email address is correct in your Mail preferences and try again.
    I had input the email address without the @verizon.net extension.  That's exactly how I input it in the pop3 set-up for receiving e-mail and it works there.
    So I went to the link that is referenced in the error message.  It basically had me go to my Yahoo mail account page.  I was directed to add an account with a different email address.  A verification code was then sent to me via email that I then had to input into the new account's setup page in order to activate my Yahoo mail for smtp use.  Once I input the code and validated I was then able to send e-mails just fine with Thunderbird.  I was able to use my @verizon.net email address and not the new account I had created.
    Bottom line - I had to activate/validate my account before I could send email.  I had not read about this anywhere when trying to figure out what was wrong.

  • Sending Mails Using APEX 4.2

    Hi All
    I am in need to send emails using APEX 4.2. I have seen under page processing there is option called Send Email. But really not sure how to make use of it. My requirement is to trigger a mail on employee's birthday. Following is the screenshot.
    Can anyone help me on this. Any reply would highly be appreciable.
    Process Type
    Process Attributes
    Process
    Messages
    Process Conditions
    Create Page Process - Process Type
    Cancel 
    Next
    Page:
    3 - Edit AR Employees
    Select the category of the process you wish to create:
    Select the category of the process you wish to create:
    PL/SQL
    Reset Pagination
    Plug-ins
    Session State
    Data Manipulation
    Web Services
    Form Pagination
    Send E-Mail
    Close popup window
    Run On Demand Process

    Hello,
    First you need to write a procedure to send e-mails. Please find sample code below to send e-mail to manager, if employee birthday is today
    CREATE OR REPLACE PROCEDURE pr_send_birthday_alerts
    IS
    BEGIN
      /* if V_APP_USER is null, procedure is being executed as job
      set security context */
      IF v('APP_USER') IS NULL THEN
      wwv_flow_api.set_security_group_id;
      END IF;
      -- Trigger mails if employee birthday is today
      -- Send mail to Manager email address
      /* Please change with actual table and column values */
      FOR i IN (SELECT emp.name emp_name, manager.email manager_email, manager.name manager_name FROM t_employee emp, t_employee manager WHERE emp.manager_id = manager.emp_id AND TRUNC(emp.birth_date) = TRUNC(SYSDATE))
      LOOP
      /* Send mail */
      /* Please change Subject and Body according to your need */
      APEX_MAIL.SEND(
      p_to        => i.manager_email,
      p_cc => NULL,
      p_from      => '[email protected]',
      p_subj      => 'Today is '||i.emp_name||' birthday',
      p_body      => NULL
      END LOOP;
      -- push all emails from queue
      APEX_MAIL.PUSH_QUEUE;
    END pr_send_birthday_alerts;
    Next you need to schedule a job which will run above procedure everyday to Send Birthday alerts. Please find sample code below to schedule a procedure to run as Job.
    BEGIN
      /* Change Start date according to your requirement */
      DBMS_SCHEDULER.CREATE_SCHEDULE (
      schedule_name          => 'sch_every_day',
      start_date             => TO_TIMESTAMP_TZ(TO_CHAR(SYSDATE,'YYYY-MM-DD')||' 06:00:00 +02:00','YYYY-MM-DD HH:MI:SS TZH:TZM'),
      repeat_interval        => 'FREQ=DAILY;'
      DBMS_SCHEDULER.CREATE_JOB (
      job_name                => 'job_every_day',
      schedule_name           => 'sch_every_day',
      job_type                => 'STORED_PROCEDURE',
      job_action              => 'pr_send_birthday_alerts',
      enabled                 => TRUE
      COMMIT;
    END;
    So everyday in morning 6:00 A.M. GMT+ 2, system will check if any employee birthday is today and will send alert to his/her manager.
    Please note that these code is not tested.
    Regards,
    Hari

  • Sending attachment in a mail using SO_DOCUMENT_SEND_API1

    Hi,
    I am trying to send an attachment in a mail using the FM SO_DOCUMENT_SEND_API1.
    The contents of the body and the attachement are same.
    The contents of the body are coming in proper format but the attachements are not.
    The body contents are in this way:
    1000013559     0010004994     PBG BROOKF     1000013559     000100     010052000328667000     GA LQ CRE 20OZ 24CS FRT PUN              0.000     CS
    1000013559     0010004994     PBG BROOKF     1000013559     000200     010052000328681000     GA LQ CRE 20OZ 24CS LL              0.000     CS
    But the attachement contents are:
    1000013559     0010004994     PBG BROOKF     1000013559     000100     010052000328667000     GA LQ CRE 20OZ 24CS FRT PUN
             ⸀        䌀匀ഀ਀                                                                                                         u2020
    1000013559     0010004994     PBG BROOKF     1000013559     000200     010052000328681000     GA LQ CRE 20OZ 24CS LL
        ⸀        䌀匀ഀ਀                                                                                                              u2020
    Also the last 2 fields which are quantity and unit fields, are not coming at all in the attachment.
    Please help me solve this issue.
    Thanks,
    Abhishek

    what is the document type of attachment? is it excel?

  • How do I email a page in firefox? I do not want to send a link, but mail the actual page.

    I want to email a page in firefox. I do not want to send a link or copy it to a word or other document and then mail it. Is there a way to do this as in other browsers?
    Thank you.

    Standard email doesn't have much formatting. In fact many people object to receiving heavily formatted email or messages that looks like a webpage. Yes, if you want to send something that looks like a newsletter or a word processing document with graphics etc, creating a PDF file and then emailing that is the preferred method - at least to me.

  • Need to send two attachments in mail

    Hi
    I am using FM  to send attachments SO_DOCUMENT_SEND_API1
    But i need to send two different attachments with different data and structure .how to do this
    Please suggest

    Hai,
    Have a look at this code:
    *Body XLS
      DOC_DATA-obj_name  = 'XLS_File'.
      DOC_DATA-obj_descr = ' Sent: 2. Juli 10:12 AM '.
      CTEXT = 'Attached XLS File'.
      APPEND CTEXT.
      DESCRIBE TABLE CTEXT LINES tab_lines.
      READ TABLE CTEXT INDEX tab_lines.
      DOC_DATA-doc_size = 800 . "( tab_lines - 1 ) * 255 + STRLEN( CTEXT ).
      DOC_DATA-NO_CHANGE = 'X'.
      CLEAR PLIST-transf_bin.
      PLIST-head_start = 1.
      PLIST-head_num = 0.
      PLIST-body_start = 1.
      PLIST-body_num = tab_lines.
      PLIST-doc_type = 'RAW'.
      APPEND PLIST.
    *************************End of Body***********************************
    *Attachment XLS
      n = 1.                                    "for sending 1st attachment
      DESCRIBE TABLE gt_9bku LINES tab_lines.
      DESCRIBE TABLE gt_txtedit LINES tlines.
      PLIST-doc_size = 3200 . "( tab_lines - 1 ) * 255 + STRLEN( tlines ).
      PLIST-transf_bin = 'X'.
      PLIST-head_start = 1.
      PLIST-head_num = 1.
      PLIST-body_start = 1.
      PLIST-body_num = 50.
      PLIST-doc_type = 'XLS'.
      DOC_DATA-obj_name = 'XLS1'.
      DOC_DATA-NO_CHANGE = 'X'.
      PLIST-obj_descr = 'Anhang1'.
      APPEND PLIST.
    ********************END OF XLS ATTACHMENT******************************
    **Body DOC
      DOC_DATA-obj_name  = 'DOC_File'.
      DOC_DATA-obj_descr = ' Sent: 3. Juli 09:52 PM '.
      CTEXT = 'Attached DOC File'.
      APPEND CTEXT.
      DESCRIBE TABLE CTEXT LINES tab_lines.
      READ TABLE CTEXT INDEX tab_lines.
      DOC_DATA-doc_size = 5400 . "( tab_lines - 1 ) * 255 + STRLEN( CTEXT ).
      DOC_DATA-NO_CHANGE = 'X'.
      CLEAR PLIST-transf_bin.
      PLIST-head_start = 1.
      PLIST-head_num = 0.
      PLIST-body_start = 1.
      PLIST-body_num = tab_lines.
      PLIST-doc_type = 'RAW'.
      APPEND PLIST.
    **End of Body***********************************************************
    **Attachment DOC
      n = n + tab_lines.                                    "for sending 2nd attachment
      DESCRIBE TABLE gt_9bku LINES tab_lines.
      DESCRIBE TABLE gt_txtedit LINES tlines.
      PLIST-doc_size = 5400 . "( tab_lines - 1 ) * 255 + STRLEN( tlines ).
      PLIST-transf_bin = 'X'.
      PLIST-head_start = 1.
      PLIST-head_num = 1.
      PLIST-body_start = 1.
      PLIST-body_num = 50.
      PLIST-doc_type = 'DOC'.
      DOC_DATA-obj_name = 'DOC1'.
      DOC_DATA-NO_CHANGE = 'X'.
      PLIST-obj_descr = 'Anhang2'.
      APPEND PLIST.
    *********************END OF DOC ATTACHMENT******************************
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                   = DOC_DATA
    *   PUT_IN_OUTBOX                    = 'X'
      IMPORTING
    *   SENT_TO_ALL                      = 'X'
       NEW_OBJECT_ID                    = OBJECT_ID
      TABLES
        PACKING_LIST                     = PLIST
       CONTENTS_BIN                     = objbin_final
       CONTENTS_TXT                     = CTEXT
        RECEIVERS                        = RECEIVER.
    Sorry that the code isn't properly alligned:(
    Best Regards,
    rama
    Edited by: newtoAbap on Jul 22, 2009 9:34 AM
    Edited by: newtoAbap on Jul 22, 2009 12:41 PM

  • In Elements 11 how do I get the verification code needed to send files as e-mail attachments ?

    In Elements 11 how do I get the verification code to send files as e-mail attachments ?

    I’ve found it usually works best with web mail via Adobe after obtaining verification. I know some email services block bulk email completely and I’ve only tested it with Gmail which works fine. Should also work with other web mail e.g. Yahoo and Hotmail. Give it a try. Before you start it will help to check your internet security settings. If they are set to High, reduce the settings to Medium temporarily. Then follow these instructions.
    1. Log in to your mail provider on the web and add the following email to your address/contacts book.
    [email protected]
    2. Open Organizer and on the menu click:
    Edit >> Preferences >> Sharing
    3. Choose Adobe Email Service from the client dropdown menu.
    4. Add your name and email address to the fields provided and click OK
    5. Test the system (first use only)  by selecting a photo in organizer and choosing Share >> Photo Mail then click Next (Mac users should use attachments)
    6. Choose a contact then click  Next
    7. Click Next Step, then click Next - the sender verification dialog will open.
    8. Check you have spelt your email address correctly and hit the Resend E-Mail button.
    9. Go to your inbox (also check spam) and when the Adobe mailer message is received copy (Ctrl+C) the long verification code.
    10. Return to the verification dialog and paste it (Ctrl+V) into the Sender verification field and click OK. Wait for validation confirmation then click OK to continue

  • I am unable to "open link behind mail" using Mac Mail now. It used to work fine, and just clicking works but not right clicking to open behind mail. Please help

    This used to work on my Mac using Firefox and Mac Mail but now it doesn't. Opening regular links are unaffected. I can still click and open easily. This only happens when I try to use the feature, to open links behind mail. When I right click nothing happens. Nothing is opened.

    Hi GetPaulHoward,
    Thank you for posting your question to the SUMO support forum, however I am not sure this pretains to Mozilla. There is a help forum you can contact at Apple.
    [https://discussions.apple.com/message/23817335#23817335]
    Hope this helps.

  • Until I installed version 3.6.6 on my XP system I would bring up Outlook Express to send a link by mail. Now, selecting "send link" brings up MS Outlook Office which is not my e-mail default.

    Prior to installing 3.6.6 on my MS XP system, when I click on FILE & SEND LINK, instead of getting my mail system OUTLOOK EXPRESS, I get OFFICE OUTLOOK which is on my computer but I have never used it for this. I cannot locate a setting to change this so far. Thank you. C.F. Boykin-
    == This happened ==
    Every time Firefox opened
    == I installed the present Firefox 3.6.6

    maybe it is proxy settings? see: https://support.mozilla.com/en-US/kb/Changing%20the%20e-mail%20program%20used%20by%20Firefox/discuss/79

Maybe you are looking for

  • Macbook pro (early 2011) takes multiple attempts to wake from sleep and turn on.

    I've had a MPB since April 2011 and since I've gotten it I've had this problem. When I want to use the computer, whether from deep sleep or simply turning it on, it sounds like its beginning to turn on but then it makes this clicking noise and stops.

  • HELP!!! I can't find my work

    During the process of editing clips in iMovie, the external firewire drive containing the movie came unplugged and when I quickly secured the plug and tried to save my work, the computer would not respond. Luckily, I felt better because I had just sa

  • User Field as date

    Hi all, i try to get in system form with formtype=133 a system field docdate as frm.items.item("10").specific.string i have a user table vData = CDate(CStr(frm.Items.Item("10").Specific.String) Set xTable = oCompany.UserTables.Item(CStr("TABLE")) xTa

  • URGENT:Schedule date restricted to a date in SO

    Hi All, I was trying to schedule a sales order, but it restricted to date like (31-dec-2008), I can't change this date. Is there any setup for ,why schedule date is restricted to a specific date? Please help. Thanks, Shishir

  • Web Analysis is degrading system performance (java.exe)

    Hello Everyone, We have got a situation here. Each time we start the web analysis studio, java.exe starts taking up 60-70% of the CPU. The system works almost fine for a few minutes, but after opening up a few dashboards and/or some reports, the syst