Steps to send mail after insertion in Oracle APEX
Hi
I am working on one application in which i want to send mail to a user after every insertion.
Edited by: Pankaj Kumar on Feb 2, 2012 3:57 AM
Pankaj Kumar wrote:
Hi
I am working on one application in which i want to send mail to a user after every insertion.
Edited by: Pankaj Kumar on Feb 2, 2012 3:57 AMHi,
See APEX_MAIL API document
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_mail.htm#CIHDIEJI
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Similar Messages
-
Sending mails with attachments using oracle 8i
Hi,
Could anybody please send a sample code for sending mails
with attachments using oracle 8i.
Thanks in advanceFor oracle8i there is an example package from OTN:
http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
You have to re-write the package a bit to work it with BLOBs instead of RAW attachments, but that should be no problem
Hop this helps,
Michiel -
I create trigger but not display massage after insert in oracle 10g
I create trigger but not display massage after insert in oracle 10g
**CREATE OR REPLACE TRIGGER TableName**
**AFTER INSERT OR DELETE OR UPDATE ON test**
**BEGIN**
**if inserting then**
**dbms_output.put('Message');**
**end if;**
**END;**What user interface are you using?
If the tool doesn't support the SQL*Plus syntax (set serveroutput on), it probably has an option somewhere to enable DBMS Output. Not even knowing what tool you're using, it's impossible for us to guess where that option might be configured.
As others have suggested, using DBMS Output to test code is less than ideal because you're dependent on the application you're using to display it to you and not every application can or will do that. If you want to use DBMS_Output, you may need to switch to a different GUI (SQL Developer or SQL*Plus are both free utilities from Oracle). Otherwise, you'd probably be better off having the trigger do something that you can subsequently query (i.e. write a row to a log table).
Justin -
Sending mails after running the audit
Hi,
Please let me know if there is any standard workflow available for sending mails after running the audit. I want to inform students that they have failed in audit because of such and such subrequirement is not met.
Regards
Vinod KumarHi Vinod,
If you are on Ehp4 you can use the BRF as a framework to create a custom developed event/action to send out the e-mail. Or you can copy the standard bulk program of audit calculations and create to functionality to send out e-mails after the run.
There is currently no standard e-mail related to this process. You could check the standard workflow HRIQ_ADM_UG template to retrieve tasks to be copied in your own workflow (example HRIQ_APP1).
Good luck
Rob -
Problems sending mail after update
Is anyone having difficulty sending mail after the most recent ipad IOS update? Getting message saying that cannot connect to outgoing server. Know server is fine for other apple devices.
Can you receive emails on the account?
Reset/restart your router and try gain.
Try deleting the account and setting it up again. -
Can no longer send mail after installing Yosemite
can no longer send mail after installing Yosemite
Hi nwpmike,
When I uncheck "SSL" it's working well, but it's not very secure. When I leave SSL, I got in "Connection Doctor" the message "Trying to log in to this SMTP account failed. Verify that the username and password are correct.", only for the SMTP. For the IMAP, the status in Green. It's also working well on the iPhone 6 with ios8 and other mac with OS X 10.9 and previous versions.
The only thing that can be involved is that the certificat used by my mail provider is expired.
With connection docteur, there is a button "Show Details". Here is the conversation when connecting to the smtp.
READ Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
STARTTLS
WROTE Oct 18 23:33:53.363 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
STARTTLS
WROTE Oct 18 23:33:53.364 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
STARTTLS
READ Oct 18 23:33:53.432 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
220 ready for tls
READ Oct 18 23:33:53.432 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
220 ready for tls
READ Oct 18 23:33:53.433 [kCFStreamSocketSecurityLevelNone] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
220 ready for tls
WROTE Oct 18 23:33:53.642 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
EHLO [10.0.0.108]
READ Oct 18 23:33:53.698 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.699 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x600000ab43a0 -- thread:0x6080032654c0
QUIT
WROTE Oct 18 23:33:53.777 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
EHLO [10.0.0.108]
WROTE Oct 18 23:33:53.778 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
EHLO [10.0.0.108]
READ Oct 18 23:33:53.838 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.838 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6000014a58e0 -- thread:0x600001e6fbc0
QUIT
READ Oct 18 23:33:53.842 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
250-smtp.planet-service.fr
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-PIPELINING
250 8BITMIME
WROTE Oct 18 23:33:53.843 [kCFStreamSocketSecurityLevelTLSv1_0] -- host:smtp.planet-service.fr -- port:587 -- socket:0x6080010b1400 -- thread:0x600003479b00
QUIT -
Send mail after jobs get succeded in EM console
Hi,
Is there solution to send mail after jobs get succeeded and failed in EM console. if job get failed in em console the mail should send with error code .hi
any solution -
Send mail after jobs get succeeded or failed in EM console ?
Hi,
Is there solution to send mail after jobs get succeeded and failed in EM console. if job get failed in em console the mail should send with error codeHi,
For dbms_scheduler this ability is built-in from 11.2 and up. For EM jobs, you might want to ask on the Enterprise Manager forum here
Enterprise Manager
Thanks,
Ravi. -
Send mail after transaction code COR2
Hello gurus,
Anyone knows the badi or userexit which is getting calld after successfull change in TCode COR2?
I need this enhancement to send mail after successfull entery.Dear ,
Transaction Code - COR2 Change Process Order
Following are the list of user exit which are available for Process order Managment.
- PPCO0006 to predefine entries for order header fields when creating
an order
- PPCO0001 to provide information at the time of saving (for
production orders and process orders)
- PPCO0007 to check or change header data when saving
- PPCO0002 to add additional checks that are to take place when
setting the deletion flag or deletion indicator
- PPCO0003 to prevent changes in sales order items that would cause
changes in the process order for static assembly processing
- STATTEXT to format the status line
- PPCO0008 to check components that have been changed or added
Hope this will be useful
Regards
JH -
Sending mail to multiple mailid from apex
Hi,
I need to send mail to multiple users from apex which is taken from a database table column. Is it possible to use LOV to send mail to multiple mail id? I tried with using collection but unable to reach it.
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
p_collection_name => List_of_mailid,
p_query => select column from table where cond='Y');
any ideas.... thanks in advance.What you need to do is, build a string with the multiple e-mail addresses, and then when you want to send mail See this oldie but goodie thread:
Have mutiple email addresses in Apex Email functionality
Thank you,
Tony Miller
Dallas, TX -
How to capture PKID after insert in Oracle
All--
Please help.
This is a general question about Oracle in general, in the hope that someone has solved this problem.
I want to capture the PKID after an insert into Oracle.
I expect that this is just a syntax issue.
I use DataAdapter.Update() passing in a DataTable.
It looks like...
...the trigger is using the sequence correctly...
...the PKID value is provided for insert correctly...
...the insert occurs correctly...
...the output parameter is set by the SP...
...and then the DataAdapter trys to fill the underlying DataTable's PKID column and thats where the problem occurs...
...so, I think,...
...either the cast from OracleType Number (from the SP) to DotNetType decimal (from the DataTable) is failing...
...or...
...for some unknown reason Oracle is actually passing <10007>, with the brackets included, after the insert and casting that to decimal fails... (but, this seems unlikely)...
...or...
...something else?
Any ideas?
(See below for details.)
...this is the error...
Code:
System.ArgumentException: System.InvalidCastException: Specified cast is not valid. at System.Convert.ToDecimal(Object value) at System.Data.Common.DecimalStorage.Set(Int32 record, Object value) at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store <10007> in PKID Column. Expected type is Decimal. at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at Oracle.DataAccess.Client.OracleDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataTable dataTable) at DLSLOD.Private.Business.Entity._LodAccesscode.Save(OracleConnection p_OpenConnection) in c:\vsswap3\wadprojects\dls\dlslod_01\dlslod\private\business\entity\_lodaccesscode.cs:line 715 at DLSLODAdmin.TestLodAccesscode01.SaveNewRow_Click(Object sender, EventArgs e) in c:\vsswap3\wadprojects\dls\dlslod_01\dlslodadmin\testlodaccesscode01.aspx.cs:line 144
...and the SP looks like this...
Code:
CREATE OR REPLACE PROCEDURE LOD_ACCESSCODE_INS
P_PKID OUT LOD_ACCESSCODE.PKID%TYPE,
P_DEPT_PKID IN LOD_ACCESSCODE.DEPT_PKID%TYPE,
P_NAME IN LOD_ACCESSCODE.NAME%TYPE,
P_NOTE IN LOD_ACCESSCODE.NOTE%TYPE,
P_CHANGEACCT IN LOD_ACCESSCODE.CHANGEACCT%TYPE,
P_CHANGEDATE OUT LOD_ACCESSCODE.CHANGEDATE%TYPE
IS
BEGIN
INSERT INTO LOD_ACCESSCODE
DEPT_PKID,
NAME,
NOTE,
CHANGEACCT
VALUES
P_DEPT_PKID,
P_NAME,
P_NOTE,
P_CHANGEACCT
BEGIN
SELECT LOD_ACCESSCODE_SEQ.CURRVAL INTO P_PKID FROM DUAL;
END;
BEGIN
SELECT CHANGEDATE INTO P_CHANGEDATE FROM LOD_ACCESSCODE WHERE PKID = P_PKID;
END;
END LOD_ACCESSCODE_INS;
...and the trigger that fills the PKID is this...
Code:
TRIGGER LOD_ACCESSCODE_TR_SEQ
BEFORE INSERT
ON LOD_ACCESSCODE
FOR EACH ROW
BEGIN
SELECT LOD_ACCESSCODE_SEQ.NEXTVAL
INTO :NEW.PKID
FROM DUAL;
END;
...and my sequence looks like this...
Code:
CREATE SEQUENCE LOD_ACCESSCODE_SEQ INCREMENT BY 1 START WITH 10001 MINVALUE 10001 MAXVALUE 9223372036854775807All--
FYI, this is a follow-up to my post above.
After much Googling, I found no helpful answer to this issue.
Therefore, I have implemented a workaround.
Here is the situation and current solution.
--I do a "select * from SomeTable where 1 = 2" to get the schema from the database into an empty DataTable.
--Internally, DotNet converts from Oracle datatypes to DotNet datatypes. Therefore, the DataTable is created with typed columns. This is great so far.
--Note that in the case of a column with Oracle datatype "NUMBER" DotNet creates a column in the DataTable with the datatype as "decimal". Fine, this should work. DotNet is now sending the message that an Oracle datatype "NUMBER" can and will be converted automatically to a DotNet datatype "decimal".
--Now, I need to make an insert and then put the resulting OUT parameter from an Oracle column with datatype "NUMBER" into that DataTable column with DotNet datatype "decimal". One would think that this should work because DotNet already allowed this conversion once.
--Not so.
--When Oracle returns a column of datatype "NUMBER" as an OUT parameter from a proc, it cannot be cast internally by DotNet from NUMBER to decimal. It fails with a conversion error, as shown in detail above.
--Now, this would make some sense if it were consistent. For example, it may be that C# disallows narrowing casts in this scenario. However, what is not consistent and does not make sense is that DotNet does allow narrowing conversions when selecting the schema and building the initial DataTable. Also, given that the magnitude of an Oracle NUMBER exceeds that of a DotNet decimal (and no other DotNet numeric datatype will hold all possible values of a NUMBER), then DotNet either must allow narrowing conversions in this case OR we would never be able to map the datatypes from one platform to the other, which would be a serious problem.
--Therefore, since one cannot change the way Oracle is behaving, an adjustment needs to be made in the middle-tier. The datatype of the column needs to be set to some friendly datatype that both DotNet and Oracle can agree upon.
What I now do is grab the DataTable, get the column, and forcibly set the datatype to "string". It seems to work just fine, especially since that DataTable is for simple UI binding so, the datatype of the column is not important.
That's the "solution" for now.
An overview of the code is below.
Please send along any thoughts you may have.
Thank you.
--Mark
...here is what the SP now looks like...
Code:
CREATE OR REPLACE PROCEDURE LOD_ACCESSCODE_INS
P_PKID OUT LOD_ACCESSCODE.PKID%TYPE,
P_DEPT_PKID IN LOD_ACCESSCODE.DEPT_PKID%TYPE,
P_NAME IN LOD_ACCESSCODE.NAME%TYPE,
P_NOTE IN LOD_ACCESSCODE.NOTE%TYPE,
P_CHANGEACCT IN LOD_ACCESSCODE.CHANGEACCT%TYPE,
P_CHANGEDATE IN LOD_ACCESSCODE.CHANGEDATE%TYPE
IS
BEGIN
INSERT INTO LOD_ACCESSCODE
DEPT_PKID,
NAME,
NOTE,
CHANGEACCT,
CHANGEDATE
VALUES
P_DEPT_PKID,
P_NAME,
P_NOTE,
P_CHANGEACCT,
P_CHANGEDATE
BEGIN
SELECT LOD_ACCESSCODE_SEQ.CURRVAL INTO P_PKID FROM DUAL;
END;
END LOD_ACCESSCODE_INS;
...and here is the adjustment that I made in the middle-tier....
Code:
System.Type myType;
myType = System.Type.GetType("System.String");
_CurrentDataTable.Columns["PKID"].DataType = myType; -
After up grade I can not send mail from road runner account. Message says server needs password, server says it won't support a password. Any thoughts?
UPDATE: I was able to set up the account using Eudora, and it worked fine. I guess it means that there's something funny happing with Mail.
-
Can't send mail after updating to 10.5.5
I don't know if it could be coincidence, but I had been receiving and sending email all day long until I installed the latest update (10.5.5). Since the installation completed, I have not been able to send mails (receiving is okay). The program keeps trying, but just keep son trying with nothing happening. I checked the SMTP's for my accounts — nothing has changed there. Don't know what's up.
Consider yourselves lucky. I can't send or receive email or connect to the internet AT ALL since installing whatever updates came down this morning (9/24/08). I can connect to my wireless and I can connect to AT&T using my USB wireless 3G thingy, but I can't access email or the web. Problem started immediately after this mornings Software Update rebooted my machine. I'm downloading the dmg on my work PC now and am hoping reinstalling will fix the issue(s).
-
Can't send mails after 10.4.6 update
Well, the topic pretty much says it all. After I upgraded to 10.4.6 I can no longer send mails. This happens with three completely unrelated SMTP servers, so I'm pretty sure it's a Mail problem. Receiving mails works without any problems and excepte the return of the ugly bubbles everything else is working fine as well.
I already re-entered my login values, didn't change a thing.I didn't even update. One day Mail just stopped sending mail. Can't remember doing anything specific. Looks like a common problem these days from having read several discussion boards. I'm on the bandwagon. Reinstalled, created new accounts, triple checked, checked with ISP, disabled password authentication...
I even tried downloading another mail program, Revolver, but that can't send either, so I'm stumped, both recieved mail just dandy. In Revolver it gives a better hint to the problem "SMTP Error 103 (Name Resolution Error)", Doesn't help much though. As I understand, 103 is just a general error anyway. -
Not able to send mail after Embarq took over Sprint
After over three hours on the phone with Embarq, I finally am able to receive mail but not send. They claim it is a problem with Apple Mail. I never had this proble untill the change over from Sprint to Emgarq. This is the message I receive when I try to send mail;
"This message could not be delivered and will remain in your Outbox until it can be delivered.
Verify that you have addressed this message correctly. Check your SMTP server settings in Mail Preferences and verify any advanced settings with your system administrator."
I am seriously thinking about dumping Embarq and going with cable.
Any suggestions?
DavidHi Thanks for the tips with the Embarq trouble. Just to pass on a word of success on the proper setting with these guys. The Incoming Mail Server: pop.embarqmail.com The User Name will be your email address, don't drop the @embarqmail.com it won't work without it. Enter your password for the incoming server. The outgoing will be smtp.embarqmail.com:email address. It kind of looks goofy but it just like the incoming, but swap the pop for SMTP. My server port is still set at 25 and you'll need to add the password here as well. I sent a test email yesterday. I could view it on the webmail, but had no success on Mail 2.1, until today. Thanks for the info being posted. This is not a typical setup for an account on Mail. They kept on telling me the user name was everything before the @ when in fact it's your whole email address.
Hope this helps.
Maybe you are looking for
-
Hi, Don't know whether you come across this problem but I hope you can shed some light as to why my PO documents are unable to trigger and to retrieve the output condition despite that I have enter the condition record in MN04? I checked NAST table,
-
Adobe Acrobat Pro was sind R-Font's
Hallo zusammen, möchte ein vorhandenes PDF Dokument bearbeiten, und die Schriftart die angezeigt wird behalten. Wenn ich mit dem Cursor auf die Schrift gehe, wird mir z.B. R-Font 1 oder R-Font 4 angezeigt, wenn ich nun einen Text eingebe/ändern möch
-
Okay, am I the only one that would like to NOT have to go into the Preferences>Advanced>Importing menu just to change the ripping/converting format??? How hard would it be to show the last 3-5 settings in the Advanced menu? For those of us that use i
-
Confused about the "To" box in email ap
I keep seeing this little gray square that has the letters "To" inside it every time I scroll through my e-mails. What exactly does this mean? I'm rather confused. I also noticed that sometimes when I tap on e-mails, I get a list of two messages for
-
How to get rid of the notice on printer screen that'The Firmware updat is on the server was completely answered by the advice given.Howard Peak