Issue in sending mails from Apex -Please help

Getting following error while processing the statment.
ORA-01403: no data found
Statement processed.
create or replace procedure proc_bgv_email_accept as
id_email number;
l_startdate date;
l_vacancy varchar2 (300);
l_declinedate date;
l_emailsenddate date;
today_date date;
accepted_date date;
l_id NUMBER;
candstat varchar2(3);
l_subject VARCHAR2(255);
l_body CLOB := '';
-- ' HTML enabled mail client.' || utl_tcp.crlf;
l_body_html CLOB;
l_mgr_emailid varchar2(255);
l_candid_emailid varchar2(255);
l_from_emailid varchar2(255) :='[email protected]';
begin
select sysdate into today_date from dual;
for cur1 in (select ID,candidate,hiring_manager,vacancy,hiring_manager_email,candidate_email from bgv where upper(trim(change_reason))=upper(trim('Offer Accepted by Applicant')) and to_char(dataload,'mm/dd/yyyy')=to_char(sysdate,'mm/dd/yyyy'))
loop
select nvl(id,0),nvl(EMAILSENTDATE,'8/28/1983'),nvl(rejcand,'N') into id_email,l_emailsenddate,candstat from email_sent_log where id=cur1.id;
select nvl(proposed_start_date,'8/28/1983'),nvl(REJECTION_DATE,'8/28/1983') into l_startdate,l_declinedate from bgv where id=cur1.id;
l_subject:='Please confirm';
l_candid_emailid :=cur1.candidate_email;
l_mgr_emailid :=cur1.hiring_manager_email;
l_body_html:='<html>
<link rel=stylesheet href=http://aru.us.oracle.com:8000/olaf/css/aru_blaf.css type="text/css">
<body>
<span>
<table border=0 cellpadding=0 cellspacing=0 width=800>
<tr>
<td class=OraBGAccentDark height=1><img src=http://aru.us.oracle.com:8000/images/clear_dot.gif></td>
</tr>
<tr>
<td class=OraInstructionText><font face="Georgia">
Dear'|| cur1.candidate ||' </b>,<p/></p>
Please confirm your LOV
<p/><p/>
Best Regards,<p/>
Raj</p></font></td></tr>
</table>
<tr>
<td class=OraBGAccentDark height=1><img src=http://aru.us.oracle.com:8000/images/clear_dot.gif></td>
</tr>
</span>
</body>
</html>';
l_id := APEX_MAIL.SEND (
P_TO => l_candid_emailid,
P_CC => l_mgr_emailid,
--P_BCC       => '[email protected]',
P_FROM => l_from_emailid,
P_BODY => l_body_html,
P_BODY_HTML => l_body_html,
P_SUBJ => l_subject);
APEX_MAIL.PUSH_QUEUE;
end loop;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
end;
Edited by: user771319 on Feb 29, 2012 9:05 AM

the error could be here:
select nvl(id,0),nvl(EMAILSENTDATE,'8/28/1983'),nvl(rejcand,'N') into id_email,l_emailsenddate,candstat from email_sent_log where id=cur1.id;replace that line with:
begin
    select nvl(id,0),nvl(EMAILSENTDATE,'8/28/1983'),nvl(rejcand,'N')
    into id_email,l_emailsenddate,candstat
    from email_sent_log
    where id=cur1.id;
EXCEPTION
    when NO_DATA_FOUND then
        id_email := 0;
        l_emailsenddate := to_date('08/28/1983','MM/DD/YYYY');
        candstar := 'N';
end;

Similar Messages

  • Sending mail from apex appliocation

    Dear friends
    Can anyone please tell me how to send mail from apex application to outside mail like gmail or yahoo
    i have one report created which i want to send it to my mail from apex
    Please hepl me....

    If it is an interactive report that you are try it on, you could probably use subscriptions to get the report to your email.
    Thanks

  • Mail stalls and freezes when using "Send Mail" from Filemaker.  HELP!!!!

    When I run Send Mail from Filemaker, there seems to be a limit to the number of email addresses Mac Mail can accept for broadcasting the same email to many people. It seems to stall and freeze at around 100 email addresses. Is there a fix for this or a setting that I have overlooked? I need to be able to broadcast mail to hundreds of recipients. Help????

    Hi,
    This is likely not an issue with FileMaker but with your email provider that prevents you from 'spamming'. You'd need to send your emails in 'batches'. SMTPit might help here.

  • Have a proble with a Send Mail server..Please Help Me..!!

    i Have a issue with my mail server running over linux server, i have a especific problem when i try to authentificate in server. i test with a 10.4 and 10.5 S.O. The trouble is when i try to send mail from my server, the mail can not send the mail but can receive the mail, the mail.app send the error it can't not send mail over the server. My server using the plaint text authentication and never send the mail. But a test with the microsof entourage and i can send mail without problems, the issue only happen with mail. Only can send mail if put the static ip address in my mac whithout dhcp not send and not valide with server. I test from out side of my server and other ISP but i not have result.

    Have you tried holding the MENU and SELECT (center) buttons until you see the Apple logo to reset it?
    Cheers!
    -Bryan

  • Not receiving incoming mail, but can send mail...Please Help!!

    Hi there,
    For the past 3 days, I have been able to send mail from my "mail" but not receive any new mail. I know I am getting mail, since it appears when i go to my gmail account, though after several attempts to change settings and such, I still cannot receive any new mail. Weirdly enough, I received some mail from 2004 on my mailbox, but nothing new.
    I have changed internet modems, and different wireless locations, nothing!
    Please please, any suggestions, would be much appreciated.
    Thanks,
    Karen

    So I am having this problem too! I am receiving my mail just fine on my older G3 running OS X 10.4.11
    It appears that the last mail I have in my box on this newer computer is from Friday around 2 pm. I am also a Cox customer, but because I am receiving it on the older computer--I don't see how it could be on their end. Any ideas--please post. Of course support is closed today!
    Becky

  • Sending Mail from APEX

    hi ,
    we use : Application Express 4.1.1.00.23 with database 11.2 express edition
    i am facing a problem when sending email from my application
    when i go to mail queue from " administraion service" i recive error :
    ORA-29278: SMTP transient error: 421 Service not available.
    i have Enabling Network Services in Oracle Database 11g alredy by running some scripts for Granting Connect Privileges from site : http://docs.oracle.com/cd/E10513_01/doc/install.310/e10496/otn_install.htm#BEHGBHDF
    also i have test the mail server by using telnet XXXXX.XXX.com 25 and it have been connected with not problems.
    Please help !
    Thanks
    Hammam

    Hi,
    Have you configured email correctly?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/adm_mg_service_set.htm#sthref258
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Problem sending mail from APEX...

    Hi everybody,
    I've looking for how to send email from my APEX application; I've been reading the forum and I've done a testing using the APEX_MAIL.send procedure. I don't know exactly how the APEX_MAIL works but it seems that my code should work. Unfortunately, it doesn't work... I should receive emails but I don't receive any of them.
    DECLARE
    l_body CLOB;
    BEGIN
    l_body := 'Thank you for your interest in the HTMLDB_MAIL package.'||utl_tcp.crlf||utl_tcp.crlf;
    l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
    l_body := l_body ||' The HTMLDB Dev Team'||utl_tcp.crlf;
    APEX_MAIL.send(
    p_to => '[email protected]', -- change to your email address
    p_from => '[email protected]', -- change to a real senders email address
    p_body => l_body,
    p_subj => 'HTMLDB_MAIL Package - Plain Text message');
    wwv_flow_mail.push_queue(
    P_SMTP_HOSTNAME => 'localhost',
    P_SMTP_PORTNO => '25'
    EXCEPTION WHEN OTHERS THEN htp.p('Error');
    END;
    I execute it and there is no exception; it appears the "Procedure executed" message, but I don't receive the emails.
    Maybe I am doing wrong the push_queue process? Maybe the Hostname is wrong? Should I do something else in APEX to send the mails?
    Thank you very very much
    Message was edited by:
    sergicloser

    Hello,
    >> I'm not running on a local instance, but connected to a server.
    By local instance I meant not on apex.oracle.com. In that case, configuration issues should be considered.
    >> I've just run the SQL: Select * from apex_mail_queue
    and it has returned no data... This means that there is no emails in the queue, is it?
    The system will try to successfully send your e-mail for 10 times. If all these attempts failed, the e-mail will be removed from queue. You should send your e-mail prior to running the SQL query.
    >> The code doesn't return any error message.
    Error message will only be recorded in the queue log, which can be viewed using the apex_mail_queue view.
    >> It seems that I have a configuration problem maybe?
    That may be the case. The APEX_MAIL package is built on top of the Oracle supplied UTL_SMTP package, which must be installed and configured on your database. Is this the case with your system? (the error message in the apex_mail_queue will give you a clear indication of that).
    Regards,
    Arie.

  • Sending mail from apex application

    Hi Everyone
    I configured the APEX mail settings,
    when I am sending the mail from DATABASE by UTL_MAIL by(SQLPLUS) logging in as sysdba the mail is sending,but if I use in apex SEND E-mail process its not sending the mail,
    In ADMIN side,Manage Instance-->Mail queue I checked and clicked the SEND ALL MAIL,
    simply it showing as "mail sent" but am not receiving any mail,and also there is no ERROR(Error field is blank)
    What willl be the problem and where can I check it,or what is the alternative way?kindly help me.
    Thank you.
    Regards,
    Sabyasachi

    Hi,
    Have you configured email to your instance?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/adm_mg_service_set.htm#sthref258
    Depend your database version, do you have give needed ACL?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21673/otn_install.htm#BABBHCID
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21673/otn_install.htm#CBHBJDDE
    Have you check mail log and queue if there is some useful info about problem?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/adm_mg_service_set.htm#sthref307
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Issues when sending mail from sap to outlook in .csv FORMAT

    hI all,
    Im using 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    FM TO send a mail from SAP to user with attachment in .csv format but the data isnot getting displayed correctly ...
    I thnk it is competely displayed in ASCII format ..
    Can anybody give me suggestionson the same
    thanks

    Hi.
    How is the user opening the .csv attachment?
    I'm guessing that it should be opened with Excel.
    Are you using an attachment document type of 'XLS'?
    If not, then the attachment won't be opened with Excel unless the user right-clicks on it and does 'Open with'.
    Even then, the user will have to use the Excel import wizard.
    Is a .csv file what you want?
    You can use the ABAP OLE stuff to write a native Excel file that can be attached to an email.
    Or you can (at the cost of more work) write the Excel file (still type XLS) using XML, which gives you more control, and still works when your program is run in the background.
    John

  • Cannot send mail...please help!

    Hello,
    My mail is all of a sudden not allowing me to send emails, however I can receive them. When I try to send an email it pops up with the following error message:
    "This message could not be delivered and will remain in your Outbox until it can be delivered.
    The connection to the server "smtp.mac.com" on port 25 timed out."
    Can someone please tell me how to fix this??!!
    Thank you

    Who is your internet service provider used for connecting to the internet?
    Are you also accessing an email account and SMTP server that is provided by your internet service provider with the Mail application and if so, are you able to send messages with this account?
    Try this first:
    Go to Mail > Preferences > Accounts and under the Account Information tab for your .Mac account preferences at the SMTP server selection, select the Server Settings button below for the .Mac SMTP server.
    Enter 587 in place of 25 in the Server Port field and when finished, select OK to save the changed setting.
    This should work and if not and you are also accessing an email account and SMTP server with Mail that is provided by your internet service provider and you can send messages with this account, select/use your internet service provider's SMTP server to send messages with your .Mac account.
    Likely your ISP made a recent change regarding the use of an SMTP server that is outside of their network or not provided by the ISP on Port 25 and neglected to inform their customers.

  • How to send  Mail from APEX 4.1?

    Dear all,
    In APEX 4.1,
    I have a form based on the Leave_table,
    it has 5 fields,
    If the user filled all the fields and if the user clicks the APPLY/SUBMIT button the Data will be stored into the LEAVE_table ,
    Is this Possible to send the mail with the data entered as a report to a particular (manager)mail_id?
    and also the mail to contain two link/button to REJECT or APPROVE the leave applied ?
    Can anyone give me the solution?
    Thank you.
    Regards,
    Gurujothi.

    [APEX_MAIL|http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_mail.htm]

  • Issue  in sending mail from webdynpro application

    Error :
    javax.mail.SendFailedException: Sending failed;  nested exception is: javax.mail.MessagingException: Unknown SMTP host: mail.yochanatech.com ;  nested exception is: java.net.UnknownHostException: mail.yochanatech.com
    In visual administrator 
    SMTP hostname : mail.yochantech.com
    this my code ;
         String host ="mail.yochanatech.com "; // Specify the host
    //        Get the From Address
    //     String from = wdContext.currentContextElement().getFromAddress();
         String from ="[email protected]";
    //        Get the To Address
    //     String to = wdContext.currentContextElement().getToAddress();
         String to="[email protected]";
    //        Initialize Session
         Properties props = System.getProperties();
         props.put("mail.smtp.host", host);
         Session session = Session.getDefaultInstance(props, null);
    //        Create new MimeMessage
         MimeMessage message = new MimeMessage(session);
         IWDMessageManager messageMgr = wdControllerAPI.getComponent().getMessageManager();
         try {
    // Set the From Address
              message.setFrom(new InternetAddress(from));
    //             Set the To Address
              message.addRecipient(Message.RecipientType.TO,
              new InternetAddress(to));
    //             Set the Subject
              message.setSubject("Test Mail");
    //             Set the Text
    //          message.setText(wdContext.currentContextElement().getTextMessage());
              message.setText("test mail trigered");
    //             Send message
              Transport.send(message);
              messageMgr.reportSuccess("Mail Sent Successfully");
              } catch (AddressException e) {
              messageMgr.reportException(e.toString(),false);
              } catch (MessagingException e) {
              messageMgr.reportException(e.toString(),false);
    when i debug the code
    Transport.send(message);
    it is not exceuting
    Thxs
    ARJUN.G

    Hi Arjun,
                    Check the host name again (the spelling)
    according to u in visual admin it : SMTP hostname : mail.yochantech.com
    In ur code its : mail.yochanatech.com
    regards
    Sumit

  • Sending mails form apex

    Can anyone help me how to send mails from apex to multiple users..
    Thanks,
    Srini

    Hi Srini,
    Have a look here: http://download.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28550/api.htm#CHDDHBGI
    You can use a comma between the mail addresses in the to and that should send the mails to multiple people.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • Can not send mail from PR Workflow to the approver

    Dear all,
    I have issues about send mail from PR Workflow to the approver.
    Now when user create PR and the corresponding user can receive the workflow items in SBWP.
    But no email from the user to approver.
    If I assign authorization SAP_ALL to the user that create PR. The approver can recieve the workflow item PR in SBWP and email to their mail
    Can you tell me about the authorization that can allow the user to send the workflow item PR in SBWP and email to the approver?
    Now user can send mail to external and internal mail and I also configured the mail server in SCOT and can successfully send a mail to users in SO01 by manually creating a message.
    Now the approver not receive any email but can receive a workflow item in SBWP
    Regards,
    Pannee

    Dear all,
    Thank you for all suppport, Now I can solve issues.
    Regards,
    Pannee

  • "This message cannot be sent at this time."  I have been getting this pop-up for 3 days when trying to send out mail.  I don't know what to do!  I cannot send mail from this account on any ISP. Please help!

    "This message cannot be sent at this time."  I have been getting this pop-up for 3 days when trying to send out mail.  I don't know what to do!  I cannot send mail from this account on any ISP. Please help!

    lots of people seem to be havgin a problem sending email from iCloud webmail.
    does your email address have uppercase characters in it?
    if so, try creating an alias in lowercase (go to preferences in iCloud webmail and select 'accounts') and see if email sends okay from that

Maybe you are looking for