Email in apex
Hi,
I wants to implement email feature in apex database application.
I have implemented database application for leave request. My requirement is, when user enter leave details and click on 'apply' button email should send to the approver.
Please let me know how to implement this. what r the setups required and what needs to be done in apply button.
Thanks & Regards,
Sagarika
Hi Sagarika,
Fortunately the APEX Mail API is very well documented
Please see: http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_mail.htm#CIHDIEJI
I believe this should give you all the information you need.
Thanks
Paul
Similar Messages
-
Attaching a BI Publisher report to an email from Apex
Hello,
My Apex application runs reports using a BI Publisher server- using a defined query and rtf template.
The end user clicks on a button and a pdf report opens up- works perfect.
Now, I need the click of the button to send an email having this report as an attachment.
I am familiar with sending email from Apex + attachment.
My problem is to create the report somewhere on the server without opening in a new browser window, then to attach the report that has just been create using BI Publisher to the email.
Does anyone know how this can be accomplished?
Thanks
RaniHi Tony,
Just found out about a completely different solution:
Thanks for your help.
Rani
Solution:
declare
datoteka blob;
st_poste number;
begin
datoteka:=apex_util.get_print_document(
p_application_id=>'183',
p_report_query_name=>'REVIEW_COORD',
p_report_layout_name=>'REVIEW_COORD',
p_report_layout_type=>'rtf',
p_document_format=>'pdf');
st_poste:=apex_mail.send(
p_to=>'[email protected]',
p_from=>'[email protected]',
p_body=>'Test',
p_subj=>'Subject');
apex_mail.add_attachment(
p_mail_id=>st_poste,
p_attachment=>datoteka,
p_filename=>'REVIEW_COORD.pdf',
p_mime_type=>'application/pdf');
apex_mail.push_queue;
end ; -
hi
can any one have application, which is having sending email option
or
tell me how to send email from apex applicationAnd you could take a look at the APEX_MAIL package and documentation in the API here : http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_mail.htm#CIHDIEJI
-
Dear Experts,
I want to ask You if you know a simple way to parse email with APEX standart utility and then to insert data from that email into the Oracle table, so that then these data would show up on APEX reports.
Thank you in advanceIf you're talking about APEX receiving emails, then parsing them into a table, there's nothing built-in to do that. I have worked with Oracle BPEL Process Manager and it has the ability to monitor one or more mail accounts (POP or IMAP), parse incoming emails, then take action on those emails. It's a totally different product than APEX, but it does what you want out-of-the-box. I believe this is even one of the tutorials that ships with BPEL.
Tyler -
Error while sending email via APEX
I get the following error message when trying to send an email to a WORKSPACE owner via APEX:
ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "MAIL FROM:" unrecognized or missing
This is very weird, when I go to the email queue the column "from" appears as empty and it should come from the email configured from "Administration Email Address".
Any help will be welcome,
Thanks.post ur code plz
-
Hi,
I am trying to send an email from my application using apex.oraclecorp.com
Below is the process defined.
DECLARE
l_body CLOB;
l_body_html CLOB;
v_name varchar2(900);
r_name varchar2(900);
st_date date;
ed_date date;
BEGIN
FOR C1 IN (select "USERNAME" name
from IT_PEOPLE where PERSON_ROLE =2) LOOP
l_body := 'To view the content of this message, please use an HTML Enabled mail client.'||utl_tcp.crlf;
l_body_html := '<html>
<head>
<style type="text/css">
body{font-family: Arial, Helvetica, sans-serif;
font-size:10pt;
margin:30px;
background-color:#ffffff;}
span.sig{font-style:italic;
font-weight:bold;
color:#811919;}
</style>
</head>
<body>'||utl_tcp.crlf;
l_body_html := l_body_html || '<p> Hi'|| ' ' || Replace(Initcap(C1.name),'.',' ') ||',</p>' || 'Please note that you have to enter the Status for your relevant projects.'||'  '|| 'Kindly ensure that it is done by Friday.' || '   ' || '<br>  ' ||
'<br>  ****** This is an auto-generated email. Please do not reply to this email. ******</br>'||utl_tcp.crlf;
l_body_html := l_body_html ||' <br>Thank You</br>'||utl_tcp.crlf;
l_body_html := l_body_html ||'<br>OMS Project Management Team</br>'||utl_tcp.crlf;
htmldb_mail.send(
p_to => c1.name || '@oracle.com',
p_from => '[email protected]',
p_body => l_body,
p_body_html => l_body_html,
p_subj => '*** Enter Project Status ***'
HTMLDB_MAIL.PUSH_QUEUE('smtp01.oracle.com','25');
End Loop;
END;
Below is the condition.
CONDITION : PL/SQL Function body returns Boolean
DECLARE
V_Date varchar2(12);
BEGIN
select to_char(sysdate,'DAY') into V_Date from DUAL;
IF V_Date = 'THURSDAY' THEN
RETURN true;
END IF ;
END;
It does not seem to be working. I have currently put it on the home page. Would it fire when anyone goes to the home and it's Thursday. What page would be the best place to put this?
This is the first time I am working on APEX.
Could someone please help with this.
Thanks,
ShijuHi user,
Please edit your profile and choose a nickname ...
1-Did you read the docs about sending email using APEX_MAIL.SEND
http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_mail.htm#AEAPI341
2- Did you notice that you can create a page process to send an email...
In your case, the Process Point should be: On load After header
Best Regards,
Fateh
If you believe that my answer was helpful or correct, the please mark the answer as helpful or correct. -
Hi everyone,
Is there any way to receive emails directly into the database using apex?
Thank you,
Alex.Hi Alex,
in this thread you can find an example of a PL/SQL function (database function) fetching mail from a POP3 server. It still is basic and depending on your needs you might need to extend it.
Re: Read Mail Folder
I've been playing with it some time ago and it works great without JAVA, but there still is some coding to be done. I also recall a package somewhere on the interet which was doing the same but also not finished.
So you won't do this from APEX but direct from the database and coördinate it from APEX.
Regards
Bas
btw if you extend this function I'm always intersted, haven't had the time yet to fine tune it but it would be a great addition to many apps
Edited by: Bas de Klerk on 18-jan-2013 4:21 -
How to attach an form to email in Apex
Hi friends,
I have a form page with three items in a display only manner.......
In these form region i have a button called submit.......
If i clicked the submit button means, the form page has to be send as an email to the recipient........How to achieve it friends....
But inorder to send a report as a email-----> i can do it by clicking Actions------download-----email.......
so that i can send report as a email.........
How i can send a form page as an email soon after pressing the submit button to the recipient.....
Thanks,
Saro...Hi Thomas,
Sorry for the late reply....
ya i have captured the form fields, with his details in the email in the display only manner....
This is the following pl-sql email process that i wrote to send an email.....
DECLARE
l_mail_id NUMBER;
l_body VARCHAR2(4000);
l_body_html VARCHAR2(4000);
BEGIN
l_body_html := '<html>
<head>
<style type="text/css">
body{font-family: Arial, Helvetica, sans-serif;
font-size:10pt;
margin:30px;
background-color:#ffffff;}
span.sig{font-style:italic;
font-weight:bold;
color:#811919;}
</style>
</head><body>'||utl_tcp.crlf;
l_body_html :=
'<h1>Laptop Request</h1>'||
'Employee Number: '||:P45_EMPLOYEE_NUMBER||'
'||
'Email Address: '||:P45_EMAIL_ADDRESS||'
'||
'Designation: '||:P45_DESIGNATION||'
' ||
'PF Contact No:'||:P45_CONTACT_NO||'
'||
'Address For Communication: '||:P45_ADDRESS_COMMUNICATION||'
' ||
'Check out Date: '||:P45_CHECK_OUT_DATE||'
' ||
'Project Assigned: '||:P45_PROJECT_ASSIGNED||'
' ||
'Duration From: '||:P45_DURATION_FROM||'
' ||
'Duration To: '||:P45_DURATION_TO||'
' ||
'Status: '||:P45_STATUS||'
' || utl_tcp.crlf;
l_body_html := l_body_html ||'<p>Thank you for your interest in the <strong>APEX MAIL</strong> </p>'||utl_tcp.crlf;
l_body_html := l_body_html ||' Sincerely,
'||utl_tcp.crlf;
l_body_html := l_body_html ||' <span class="sig">The APEX Dev Team</span>
'||utl_tcp.crlf
l_body := 'Request for an Laptop'||utl_tcp.crlf;
l_mail_id := apex_mail.send(
p_to => '<[email protected]>',
p_from => :P45_EMAIL_ADDRESS,
p_body => l_body,
p_body_html => l_body_html,
p_subj => 'Laptop Request With Request No' || :P45_DIS_REQ_ID
apex_mail.push_queue();
END;
Ya, i receiving email but everything is like a plain text.........
It is possible to generate it in an HTML format, so that the form will look as it is like in the application....
For example:
If you see in the report means, through Action------->download-------->email
you can see the reports that generate in an HTML format........
Im asking in the same HTML format for my form to generate, soon after pressing the Button.........
Anychanges in the Process to be done in achieving it....
Thanks
Saro.. -
I have an email I want to send out nightly but to make it simpler to setup I was wondering if there way a way to gain access to APEX's sendmail routines without being actually inside of APEX. There is no information in the emails that is dependent on any particular user being logged in to apex, I just want to use the email functionality with DBMS_JOBs. Any suggestions?
Are you sure you're not confusing UTL_MAIL with UTL_SMTP?
Although UTL_MAIL does require a DB parameter to be set up, its use is comparable with APEX_MAIL:
UTL_MAIL.SEND (
sender IN VARCHAR2 CHARACTER SET ANY_CS,
recipients IN VARCHAR2 CHARACTER SET ANY_CS,
cc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
bcc IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
subject IN VARCHAR2 CHARACTER SET ANY_CS DEFAULT NULL,
message IN VARCHAR2 CHARACTER SET ANY_CS,
mime_type IN VARCHAR2 DEFAULT 'text/plain; charset=us-ascii',
priority IN PLS_INTEGER DEFAULT NULL);
APEX_MAIL.SEND(
p_to IN VARCHAR2,
p_from IN VARCHAR2,
p_body IN [ VARCHAR2 | CLOB ],
p_body_html IN [ VARCHAR2 | CLOB ] DEFAULT NULL,
p_subj IN VARCHAR2 DEFAULT NULL,
p_cc IN VARCHAR2 DEFAULT NULL,
p_bcc IN VARCHAR2 DEFAULT NULL,
p_replyto IN VARCHAR2);APEX_MAIL does win on HTML and attachment capabilities though (seriously Oracle, why cripple UTL_MAIL by limiting attachments to 32K VARCHAR2/RAW?) -
Sending email from apex 4.0 with oracle 11g ee
Hi,
I the past when working with apex 3 I was able to work with apex mailsend very nice.
In apex 4.0 with oracle 11g ee I'm not able to send emails anymore.
Last error message in the queue is:
ORA-29279: SMTP permanent error: 550 through this server without authentication.
the smtp server has not been changed, the code is fine
How I can go further?
Many thanks,
FlorinThis is a different subject:
Apex Reports and links to external content
What you are asking should be possible.
Risk: everyone who uses the link needs to have the same drive mapping if you are using letters on a Windows PC. As long as that is not a usability issue, you are fine.
I would recommend you review the LINK syntax in the report column.
Your text seems like you have already attempted this.
>
Click Here , i.e. href="file:///E:/Echo Destination/1212040003.docx"
. . . . . . . from XYZ
Here I am unable to open this document via click on this column link on report............
Thanks..To confirm the link syntax you want first, Write a simple HTML file with the link to make sure you have the correct quoting and the link content is correct.
What does the REPORT resulting HTML look like when you examine it on the page?
I would expect something like:
<a href=file:///E:/Echo Destination/1212040003.docx> go to file </a>If the result is different, then we can discuss why it isn't what you are expecting.
--Tim St.
http://enkitec.com -
Hi friends,
I'm trying to create some procedures to send emails to users when some specific situations happens to the database, using APEX.
In the maillog from Apex Admin, I always get the error ORA-24247 network access denied by access control list (ACL).
I searched in foruns and manuals and got the procedure to enable in http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/otn_install.htm#BEHGBHDF, but I could not make it work.
It says the table DBA_NETWORK_ACLS does not exist.
How should I proceed?
Thanks!Hi,
try to run this with sys user in your apex database
check this http://www.askdbaonline.com/?cat=14
login as sysdba
begin
begin
dbms_network_acl_admin.drop_acl(
acl => ‘all-network-PUBLIC.xml’
exception
when others then null;
end;
dbms_network_acl_admin.create_acl(
acl => ‘all-network-PUBLIC.xml’,
description => ‘Network connects for all’,
principal => ‘PUBLIC’,
is_grant => true,
privilege => ‘connect’
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
acl => ‘all-network-PUBLIC.xml’,
principal => ‘PUBLIC’,
is_grant => true,
privilege => ‘resolve’
dbms_network_acl_admin.assign_acl(
acl => ‘all-network-PUBLIC.xml’,
host => ‘*’
end;
commit;Regards,
Little Foot -
Hi,
Now APEX has some good API to send out emails -- but any idea how to retrieve emails from mail server using APEX or pl/sql packages?
Basically something to retrieve emails to database table and use APEX to build a UI to read them.
Thanks!
thchengHi,
have a look at http://sql-plsql-de.blogspot.com/2007/12/emails-aus-einem-postfach-abrufen.html
It describes a Java stored procedure to read emails which is wrapped by a PL/SQL wrapper. The posting is written in German, but you can use a translation service like Google to read it in English.
Patrick
My APEX Blog: http://www.inside-oracle-apex.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New! -
Hello,
I want to implement email functinality in my apex application but as I m a newbie, i dont know anything about how to configure SMTP server and all. Anyone please help me and send me one by one steps to implement this functionality so that when i click on a link say send email then by taking email addresses of sender & receiver and the body & subject of email from the screen or from database , email will be sent.
Please help as soon as possible
Thanks in advanceI have a process which will call When SEND MAIL Button Pressed
begin
HTMLDB_MAIL.SEND(
P_TO => :P20_TO,
P_FROM => :P20_FROM,
P_BODY => :P20_BODY,
P_SUBJ => :P20_SUBJECT);
End;
On the page I have the following items
P20_TO, P20_FROM, P20_BODY, P20_SUBJECT as Text field and a button SEND MAIL.
when i clicked on the button its not sending the mail.
I have changed my SMTP host address with the one i m using.I checked it (when i ping that address in command prompt its working.)
Nothing else I changed in MANAGE SERVICE.
Is there anymore changes required to make the email work.
please tell me where is the problem -
Sending digitally signed emails from APEX
We need the ability to digitally sign an email or group of emails generated from an APEX application via MS Exchange. Has anyone been able to do this?
Post this to APEX forum....
Sim -
Emails from APEX being delivered late
I have APEX 3.2 and emails are taking several hours to deliver. If I check the mail queue and click on "Deliver all mail", then only they are delivered. Otherwise they are taking several hours.
any clues ?
abhayHi,
additionally you could force the mails in queue to be sent by calling the procedure APEX_MAIL.PUSH_QUEUE. For details, you may want to have a look on the API documentation:
http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_mail.htm#CHDJGGHG
Note that depending on the amount of concurrent mail send actions this might slow down response times, because this call will usually wait for the queue to be done with the mail send process before it returns and a session may have to wait for the queue to be ready for being "pushed" again if the queue has just been "pushed" by another session.
-Udo
Maybe you are looking for
-
Questions about BT Home Hub 4A event log - WIFI c...
Hope someone can help please ? I had BT inifinity installed 2 weeks ago with the HH 4 (type A) and everything has worked - connection found, no problem. This week, my ipod touch was unable to join the network but the iphone 5, another ipod and a tabl
-
Why is it so hard to put music on my brand new iphone 4s?
I purposely bought the 64GB version of the new iPhone 4s so that I could also use it as an iPod. First off-I can't edit any of the music's information or cover art once it's in the phone. Half of the albums that I synched just speed through song afte
-
Preview: Export to PDF sends document to Printer
Problem: In preview, when I export anything to PDF, it is instead sent to my printer. I'm using Mavericks. This suddenly started happening for no apparent reason having worked fine previously. Help anyone please!
-
How to use query-database() function in transformation?
Hi All, How to use query-database() function in transformation? It is giving four fields but if i write select query in sqlquery field it is saying select node is not found.... plz help me out Regards Pavankumar Edited by: [email protected] on Jul 29
-
When I have a document with two columns in indesign CS5.5 and footnotes page. If there's a note in the first column, the paragraph that begins in the second column is not correctly tag. This is shown with an automatic tag <P>, and with this symbol "¶