APEX SEND EMAIL FUNCTION NOT SENDING EMAIL

Hi All,
For some reason that I can't figure out is not send any email... Could yo please help me to find it?
DECLARE
CreationDate date;
ClosureDate date;
IncidentsQty NUMBER;
Tool varchar(100);
BEGIN
SELECT COUNT(STUCK_RELATED_TO_PROBLEM) into IncidentsQty
FROM INCIDENTS
WHERE STUCK_RELATED_TO_PROBLEM = :P57_INCIDENT_ID;
SELECT IDATE  INTO CreationDate
FROM PROBLEMS
WHERE ID = :P57_INCIDENT_ID;
SELECT CDATE  INTO ClosureDate
FROM PROBLEMS
WHERE ID = :P57_INCIDENT_ID;
SELECT TOOL  INTO Tool
FROM PROBLEMS
WHERE ID = :P57_INCIDENT_ID;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
APEX_MAIL.send(
p_to =>  '[email protected]',
p_from => :app_user,
p_body => 'SERVICE DESK NOTIFICATIONS: NEW UPDATE HAS BEEN REPORTED INTO AN PROBLEM',
p_body_html => '<p>The details of the problem closed are the following: <br>
<p>Creation date: ' || CreationDate || ' <br>
Closure date:  '|| ClosureDate ||'<br>
Incidents Qty: '|| IncidentsQty ||'<br>
Observations: '|| :P57_IUPDATE ||'</p><br>
p_SUBJ => 'The problem for the tool ' || TOOL || ' (ID# '|| :P57_INCIDENT_ID ||') has been closed.',
p_cc => '',
p_bcc => NULL ,
p_replyto => NULL
END;

Hello Bernardo,
>
For some reason that I can't figure out is not send any email... Could yo please help me to find it?
>
Please do provide necessary information so the picture about your problem is clear for the forum members.
The blog post by one of the eminent person working with Oracle Technologies @Tom Kyte might help:
http://tkyte.blogspot.in/2005/06/how-to-ask-questions.html
Now coming to your posted procedure snippet:
APEX_MAIL.send (
p_to =>  '[email protected]',
p_from => :app_user,
p_body => 'SERVICE DESK NOTIFICATIONS: NEW UPDATE HAS BEEN REPORTED INTO AN PROBLEM',
p_body_html => '<p>The details of the problem closed are the following: <br>
<p>Creation date: ' || CreationDate || ' <br>
Closure date:  '|| ClosureDate ||'<br>
Incidents Qty: '|| IncidentsQty ||'<br>
Observations: '|| :P57_IUPDATE ||'</p><br>',
p_SUBJ => 'The problem for the tool ' || TOOL || ' (ID# '|| :P57_INCIDENT_ID ||') has been closed.',
p_cc => '',
p_bcc => NULL ,
p_replyto => NULL
);As you have not given APEX Version information I will go with APEX Version Application Express 4.2.0.00.27.
I would recommend you to go through the documentation of [url http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_mail.htm#CIHDIEJI]APEX_MAIL to help you debug the problem.
This is what i want you to check with your email configuration:
<ul>
<li>Have you configured the email settings on the Instance Settings page.
Refer: http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35129/adm_mg_service_set.htm#BEJBCEEH</li>
<li>Have you checked the configuration works fine? You can use the examples given in the documentation of APEX_MAIL.SEND Procedure.
Refer: http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_mail.htm#CHDDAAJE
Note: User SQL Commands from your APEX Workspace for this purpose.
Also after sending email check for the error in APEX_MAIL_QUEUE or APEX_MAIL_LOG using query:
-- Check whether the mail has been queued
SELECT *
   FROM APEX_MAIL_QUEUE;
-- Push the mail for delivery
BEGIN
  APEX_MAIL.PUSH_QUEUE;
END;
-- Check whether the mail has been delivered without any error
-- check for MAIL_SEND_ERROR column
SELECT *
   FROM APEX_MAIL_LOG;</li>
<li>Are you using Oracle Database Release 11.1 or higher version ? If yes then you have to configure network services to enable the host to send email. Refer: http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/sec_admin_ssl.htm#HTMDB12006</li>
<li>Are you invoking the APEX_MAIL procedures through a database package? If yes then you have to set the SECURITY_GROUP_ID.
Refer the starting of APEX_MAIL documentation.
Use the following code before invoking APEX_MAIL procedures:
p_app_id should be the Application Number of your APEX application.
for c1 in (
   select workspace_id
     from apex_applications
    where application_id = p_app_id )
loop
   apex_util.set_security_group_id(p_security_group_id =>
c1.workspace_id);
end loop;</li>
</ul>
This is what i find doubting about the code snippet:
<ul>
<li>Is APP_USER passing valid email ID?</li>
<li>Note the usage of utl_tcp.crlf in the APEX_MAIL.SEND procedure examples in the documentation.</li>
<li>Why have you passed empty string to the parameter p_cc ? Note that empty string is not equal to NULL.</li>
<li>Instead of passing data directly to the parameters you can use variables, assign data to variables and pass variables instead.</li>
</ul>
In order to get accurate/appropriate response you should include at least following information with your question:
<ul>
<li>Full APEX version</li>
<li>Full Database version</li>
<li>APEX Web server architecture (EPG, OHS or APEX listener)</li>
<li>Browser(s) and version(s) used</li>
<li>Operating system with version, architecture(32/64)</li>
</ul>
The above information will help the forum members to ascertain the problem context and post most relevant response.
Please read the [url https://wikis.oracle.com/display/Forums/Forums+FAQ]FAQ and [url https://forums.oracle.com/forums/ann.jspa?annID=1324]forum instructions for more information on using OTN forums effectively.
Please perform a [url https://forums.oracle.com/forums/search!default.jspa]forum search before posting a question as this will help reduce duplicate threads.
Please mark the reply as helpful or correct as this will help other members on the forum with similar question.
Hope it helps!
Regards,
Kiran

Similar Messages

  • Email will not send

    Email will not send , but I can receive ?

    Are you getting any errors when you try to send? Or does it just get stuck in your outbox sending? Simple thing to do is reset your iPad by holding down the home and power button until you see the silver apple then just let the iPad start normally. If the issues still persist as mentioned above got to Settings>mail, contacts, and calendars and just turn of mail then turn back on. See if you get any errors if not check your mail again and attempt to send the email. If all above fail. Go back to settings and then mail, contacts, and calendars then select the email account that you are having issues with then delete the account. Once deleted select the option to add account and re add your email account back to your iPad. Let me know if this works for you.

  • After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    My gmail, which is correctly configured for Mail with gmail SMTP and Google IMAP, works for awhile on Mail, which I leave open while working on other applications. But several times a day I get msg from Google: "We recently blocked a sign-in attempt to your Google Account" . . . and requiring me to verify my account details, re-enter passwords, confirm security settings (or change them from "disable" to "enable less secure methods" and so on). In Mail I also have tried "taking all accounts online", and re-entering my gmail password inside Mail account settings. These steps successfully re-set comms between gmail and Mail ... for awhile, then it happens again. Enough occurrences over a work day that I just quit Mail and revert to accessing gmail directly. Apple Care advisor and an Apple knowledge base article say that Apple can't deal with this, as gmail is third-party app, and they refer me to gmail, and so far I've found nothing helpful there.
    From today I also have several instances of a window saying "Mail has unexpectedly closed" and asking me to Re-open it.
    I also use Yahoo mail, which stops working with Mac Mail at the same time as gmail, but I do not receive notices to re-verify from Yahoo.
    I recently upgraded from Mavericks to Yosemite. The Mail problem happened occasionally with Mavericks but is far more frequent with Yosemite.

  • Have a 2 year old imac and the email will not send as it is stuck on drafts file

    have a 2 year old imac and the email will not send as it is stuck on the drafts file -- any ideas please?

    As Stated... The iPad 2 does not offer this Feature.
    iOS System Requirements  >  http://support.apple.com/kb/HT3574
    Understanding  >  http://support.apple.com/kb/HT4517

  • HT5621 i created a new apple id. The verication email is not send to my email id. So i am unable to use the new apple id

    Hi,
    i created a new apple id. The verication email is not send to my email id. So i am unable to use the new apple id

    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Step 3 is important, no matter whether you do this on a Mac or an iPad / iPhone:
    Important: Before proceeding to the next step, you must download and install a free application. ...
    Important: Before proceeding to the next step, you must download and install the free application by tapping Free followed by tapping Install App. ...

  • HT201320 I have a new ipad mini - I am able to receive emails but not send - same with text. I have tried to follow the support advice. I have deleted my aol account and added it again. I have compared every setting with my husband, who has an ipad? Pleas

    I have a new ipad mini - I am able to receive emails but not send - same with text. I have tried to follow the support advice. I have deleted my aol account and added it again. I have compared every setting with my husband, who has an ipad? Please help

    ps when syncing it jumps through steps 1 - 4 real fast, i seem to remeber iphone showing the number of tracks transferring and names, but i see nothing? then it sits on 5 saying "waiting for changes to be applied"

  • HT201363 Hi I have forgotten my id questions and the recovery email will not send despite my several attempts and checks. I am now currently locked from my Apple ID account could someone help me reset my id questions thank you

    HHow do I reset my id questions if the recovery email will not send ??????

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (113787)

  • I set up my verizon email account on my iPhone 5, but I can only receive emails and not send them.

    I set up my Verizon email account on my iPhone 5,but now my phone is only letting me recieve emails and not send any.

    You could go to icloud.com on your computer, then download your iCloud calendar as an .ics file as explained here: http://support.apple.com/kb/HT4910 (under Calendar...icloud.com Calendar), then import this to a supported program on your computer such as Outlook or Mac iCal (if you have one) and sync it to your phone using iTunes; or if you don't have a supported program, import it to an external service such as Google Calendar (see http://www.howtogeek.com/howto/30834/add-an-ical-or-.ics-calendar-to-google-cale ndar/) and sync it to your phone using a gmail exchange account (as explained here: http://support.google.com/mail/bin/answer.py?hl=en&answer=138740).

  • HT203551 I have an iphone 4, the calls are with Telstra but internet is with dodo, I can recieve emails but not send them?Does anybody know how to remedy this?

    I have an iphone 4, the calls are with telstra but internet is with Dodo.I can recieve emails but not send them?Could anyone please remedy this?

    Welcome to the Apple Community.
    i assume the email account is your iCloud email account. have you tried turning off settings > iCloud > mail, restarting the phone and then re-enabling mail again.

  • I can receive emails, but not send

    I'm in Lion 10.7, and can receive emails, but not send.

    Check in Mail Prefs>Accounts - check that the outgoing server is correct.
    MJ

  • TS3899 iPhone 5 email will not send however emails sent via Pages or yahoo are sending ok? Help

    iPhone 5 email will not send however emails sent via Pages or yahoo are sending ok? Help

    I inserted the code and i am still getting the same error. Here's what i'm getting.
    Developer Details:
    E-mail couldn't be sent. Error returned: authentication failure [SMTP: Invalid response code received from server (code: 535, response: 5.7.3 Authentication unsuccessful)]. (EMAIL_FAILED)
    tNG Execution Trace - VIEW
    * tNG_insert.executeTransaction
    o STARTER.Trigger_Default_Starter
    o tNG_insert.doTransaction
    + BEFORE.Trigger_Default_FormValidation
    + BEFORE.Trigger_Registration_CheckUniqueUsername
    + BEFORE.Trigger_Registration_CheckPassword
    + BEFORE.Trigger_Registration_PrepareActivation
    + tNG_insert.prepareSQL
    + tNG_insert.executeTransaction - execute sql
    + tNG_insert.postExecuteSql
    + AFTER.Trigger_Registration_AddDynamicFields
    Error--> + AFTER.Trigger_ActivationEmail*
    + ERROR.Trigger_Default_Insert_RollBack
    * tNG_insert.getRecordset
    * tNG_insert.getFakeRsArr
    * tNG_insert.getLocalRecordset
    * tNG_insert.getFakeRecordset
    * tNG_insert.getFakeRecordset
    Are there any other file I can alter for authentication? Or perhaps i need to insert the code sting I was given into another file?

  • My emails will not send from my outbox in my apple email.  How do I fix this issue?

    My emails will not send from my outbox in my apple email.  How do I fix this issue?

    What message do you have?
    Do your outgoing SMTP servers are online or offline (Mail > Preferences > Accounts > select account and check under Outgoing Mail Server)

  • Is there any final answer to why emails will not send when away from home IP?  Have san diego road runner.  emails send fine from home, but do not send when using another IP.

    Is there a final answer to why emails do not send from iphones when away from home IP?

    This is a common anti-spam technique for ISPs to prevent mail from being sent from anywhere other than your service location. Ask Road Runner if there are any specific settings you can use to circumvent this.

  • TS2755 My emails will not send on my iphone 5C?  Any suggestions

    My emails will not send on my iphone 5C?  Anyone have a correction for that?

    Hey pamela9801,
    I would first try out these troubleshooting steps:
    Try these basic troubleshooting steps first
    Tap Safari and attempt to load a webpage (try any webpage). If you can load a webpage, then your device has Internet access. If you are unable to load a webpage, follow these troubleshooting steps.Try to use an alternate Internet connection if available:
    Try a different Wi-Fi connection
    If your iOS device has an active cellular data plan, tap Settings > Wi-Fi and turn off Wi-Fi.
    If the affected email account is provided by your Internet provider, see if your issue is resolved while connected to your home Wi-Fi network.*
    Log in to your email provider's website to ensure that the account is active and the password is correct.
    Restart your iOS device.
    Delete the affected email account from your device.
    Tap Settings > Mail, Contacts, Calendars.
    Choose the affected email account, then tap Delete Account.
    Add your account again.
    Then, if that doesn't work, I would continue along with the rest of the suggestions in the following article:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/TS3899
    Welcome to Apple Support Communities!
    Cheers,
    Delgadoh

  • A strange one-can recieve email, but not send

    Okay, I have a powerbook G4 with an airport (graphite) and a siemens wireless gateway/modem provided by T**us
    my mom's ISP. She can get on the internet okay (providing the signal doesn't get dropped, which it does) and downloads are fine, and she can recieve email, but not send. I have tried changing the smtp port to 587 from 25. Nothing from the activity monitor and no "whoosh". I have also tried setting up a new account (pop3) which the connection
    doctor says is okay for sending and recieving. Any suggestions before I spend an hour or so with T**us' tech support
    which for Macs isn't that good--frankly, I think the airport needs to be out of the picture---maybe it's fighting with the gateway??? :confused:
    John B

    Hi John: Did you get the "Send" issue figured out with your computer? If not, here are some things to check out. It sounds like you are using Telus. If so the settings for incoming and outgoing servers is as follows: Incoming > "pop.telus.net" Outgoing > "smtp.telus.net". Server port is 25, with no SSL enabled.
    Good Luck
    Stedman

Maybe you are looking for

  • Work center Change

    Hi All, How to change the work center once its get combined? Can I change my child order work center after creation of combined order?

  • How do i combine two user accounts into one

    how do i combine two user accounts into one

  • Payment against a check number

    Dear All, Im wondering whether i can post an outgoing payment and choose from a list the number of the check i want to make the payment against (from my check lot on the system).  Regards, Roba Motaweh Edited by: Roba Motaweh on Feb 22, 2011 3:11 PM

  • Login in console denying the username?

    Hi there, some minutes ago i tried to login on one of my virtual consoles and did a small typo on the username. The reaction was quite surprising, maybe you get it when looking at the output: Arch Linux (Core Dump) 2.6.23-kamikaze (flusenfalle) fluse

  • GR price displaying zero

    hi gurus,                 we did the GR AFTER PO BUT THE PRICE IS 40 USD in po, DISPLAYING ZERO AMOUNT   IN GR Please give me the solution for this problem Regards SAP MM