Email Notification API

Hi All,
I am writing a java code to send email notification
I have written following code
tcDataProvider ioDatabase = new tcDataBaseClient(); //line1
tcEmailNotificationUtil sendMail = new tcEmailNotificationUtil(ioDatabase);
sendMail.setBody("Body");
sendMail.setSubject("Subject");
sendMail.setFromAddress("fromemailaddress");
sendMail.sendEmail("toemailaddress");
and imported following classes
com.thortech.xl.dataaccess.tcDataProvider
com.thortech.xl.dataaccess.tcDataBaseClient
com.thortech.xl.dataobj.util.tcEmailNotificationUtil
I am trying to run this java code from eclipse.
but i am getting Null Pointer Exception at line 1.
Could you please tell me the correct way to run this code in case i am wrong and other necessary changes.
I am new to this tool so any suggestions would be really helpful.
Thanks

Are you sending email by schedule task or in some other case. If it is not a schedule task then follow the below steps:
Just make an adapter using this java code and Pass tcDataprovider as a parameter in your java code. You'll find it in Design console i.e. Create an adapter with a variable of Object type i.e for Database reference
public void sendnotifyEmail(tcDataProvider dataProvider )
tcEmailNotificationUtil tcemailnotificationutil = new tcEmailNotificationUtil(dataProvider);
sendMail.setBody("Body");
sendMail.setSubject("Subject");
sendMail.setFromAddress("fromemailaddress");
sendMail.sendEmail("toemailaddress");
This is the way to send email.
Let me know if you need more clarification on it.

Similar Messages

  • Email Notification  API in OIM 11g

    Hi,
    I would like to send an email in my schedule task.The schedule task is written using 11g APIs.I am planning to use tcEmailNotificationUtil for sending emails.But tcEmailNotificationUtil class expects tcDataProvider and I couldnt get the handle to this,as my schedule task is extending TaskSupport and not the SchedulerBase task?.Is there any way to solve this problem?.I will be happy if i get a sample code to send a email notification using 11g API.Thanks.

    Below post will be helpfull
    Re: 11g- Send mail through scheduler
    this worked for me
    Regards
    Vm

  • Best way for Email Notifications in EWS Managed API 2.0 [ Exchange Server 2013]

    Hi ,
    I want to know best way for Email Notifications in Exchange server. My
    organisation has 
    10 users, i want to get notification if any user mailbox got any new mail.
    i need to create API,
    that was consumed by another Team in their Application.
    I am using Exchange server 2013.
    Please share Your Ideas.
    Thank you

    Take a look at EWS Notifications
    http://msdn.microsoft.com/en-us/library/office/dn458791(v=exchg.150).aspx .
    Cheers
    Glen

  • JavaMail API for enabling email notification

    Hi
    I want to use JavaMail API for enabling email notification for an application. I have downloaded the javamail_1.4 zip file, unzipped it and set the CLASSPATH environment variable. JAVA_HOME isalso set. the activation.jar file from JAF is also in place. but, when i try to compile the sample programs (included with javamail) like smtpsend.java,msgsend.java, I get a screenful of errors all referring to "cannot find symbol", the main error being
    "package javax.mail does not exist". I guess, Java is not able to locate the package.
    Please suggest what can be done .Any tips for configuring email notification are more than welcome!
    Thanks!

    Are you compiling using the "javac" command,
    or are you using an IDE like Eclipse or NetBeans?
    In the latter case, you have to tell the IDE to
    add the jar files to your project.

  • Issue in notification API for oracle workflow

    Hi,
    I am facing issue in sending oracle workflow notification. i have created a simple workflow with a process.
    I wrote one package which is creating adhoc role and sending the notification through api I(wf_notification.send).
    I am able to get the notification as well as email notification but without attribute values. My workflow attributes are getting replaced by null, but message body is appearing.
    Please help me, its urgent.
    Thanks
    Rajni

    I doubt that Oracle 7 DB is not supported. You may consider raising a SR with support.
    Regards,
    Anuj

  • Email notifications from Verification and Validation routines

    I am trying to generate an email notification after we run a Verification or Validation routine once we make some changes in the DRM? Is it possibe? If so how can it be implemented and what versions of DRM supports the same?

    DRM does not suppor this feature. Nowhere in the documentation does this exist. If you want to do it on demand you have 2 options:
    1) use mdm-connect to run the verification/validation process saving the output to a file and write a script to take the file and mail it
    or
    2) create a custom API workflow process
    Those are your options.

  • How to set up email notification

    Hi,
    How can I set up email notification in AV 10.2.3? I have gone through the admin and auditor docs but could not find any mention of it. Was not able to find the navigation on the AV console either. Someone posted a documentation URL link in the forum back in 2007 but unfortunately the link was broken. Can someone direct me to the email configuration page?
    Thanks.

    E-mail notification is not available as a feature in Audit Vault 10.2.3.1, the latest version available.
    However, it is possible to set up e-mail notification for alerts with some coding. Each alert raised by Audit Vault is placed on a queue in the repository. This is a standard Oracle Advanced Queue, and can be subscribed to using AQ APIs in PL/SQL or, with the JMS adapter, in Java. Once a subscriber is up and running, it will pick up any alerts that are raised and can route them to e-mail if needed.
    Sample code to do exactly this is provided in $ORACLE_HOME/av/demo/alert on the AV server.

  • OIM 11g - email notification

    Dear All,
    I need to create quick POC that will involve provisioning to multiple resources during OIM profile creation. One consolidated e-mail notification should be sent as a result.
    1. I never used simulated/fake/manual resource. If you used it in the past maybe you can guide me through as for how to create it?
    2. How to make sure that centralized e-mail is sent at the end (all resources are provisioned)?
    I was planning to create default role or use ALL USERS role that will be attached to access policies for different resources. When HR record comes, OIM user profile is created and default role (ALL USERS, for example) is assigned.
    This role will trigger execution of access policies that will create accounts on the target platforms.
    My challenges are:
    1) ONE consolidated email notification upon SUCCESSFUL completion (default event that somehow should be triggered maybe by job?, custom task that sets the flag in custom table upon successful completion? or maybe I overengineering .....)
    2) send user to manual queue if creation of the user account on any of the target resources fail.
    If you can provide any guidance as for how this could be done I would appreciate it very much
    Thank you for your time

    1. The process is outlined here: http://iamreflections.blogspot.com/2010/08/oim-howto-leverage-standard-connector.html
    2. There are two parts to this question.
    The first part is to figure out the triggering event. If you know what resource will be last provisioned you can simply put a task that is fired on completion of the final provisioning task that then checks the result of all other resources using the APIs. If you don't know which resource will be last you could let the final provisioning task in each resource have a follow up task that sets a variable on the user form, then have another folllow up task that checks if all values are set and if so do the appropriate thing (if not just exit)
    Traditionally you would assign a task to the sysadmin using the API if you wanted a manual intervention (http://otndnld.oracle.co.jp/document/products/id_mgmt/idm_904/doc_cd/javadocs/operations/Thor/API/Operations/tcProvisioningOperationsIntf.html#reassignTasksToUser(long[], long)) but there is the new concept of queues that I actually haven't worked with (http://otndnld.oracle.co.jp/document/products/id_mgmt/idm_904/doc_cd/javadocs/operations/Thor/API/Operations/tcQueueOperationsIntf.html) that may be what you are looking for.
    Email sending tends to be easier using Javamail than trying to leverage the email framework once you want something that isn't very basic.
    Hope this helps
    /Martin

  • OIM 9102: Send Email Notification to other user in a task

    I created a process in OIM. In this process exist a Task: Manager Process. When this task will be completed for the user that be assigned. In the Notification Tab are able to send a email notification to a Assign User, Requester User, User or User Manager. But i need to send a email notification a other user different to them, for example: juan.perez, this user is in OIM.
    I have read the following documents:
    1.- http://docs.oracle.com/cd/E10391_01/doc.910/e10363/promgt.htm#BCECFGEJ
    2 .- How to Send an Email Notification Upon User Creation via the Admin Console [ID 780394.1]
    3.- OIM: An Example of Email Notification and Configuring it With a Resource Object Provisioning [ID 457836.1]
    4.- Sending an Approval Notification Email with a Link Directly to the Approval Request? [ID 748447.1]
    Or exist some way to do this, through java code.
    I'm using oim 9.1.0.2 BP18 running on OC4J 10.1.3.5 on AIX 6.1 64-bit clustered install with two nodes, Oracle Database 10.2.0.4 on AIX 6.1 64-bit on RAC.

    Hi
    You can use OIM email API to send an email from the java code. You can attach code on post creation user using entity adapter. Every time a user is created the email is triggered.
    Here is the sample:
    public EmailUtility(tcDataProvider dataProvider) {
              this.dataProvider = dataProvider;
              emailOper = new tcEmailNotificationUtil(dataProvider);
              System.out.println("Email API instantiated successfully...");
         public String sendEmail(String fromAddress, String toAddress, String body,
                   String subject) {
              emailOper.setBody(body);
              emailOper.setFromAddress(fromAddress);
              emailOper.setSubject(subject);
              emailOper.sendEmail(toAddress);
              System.out.println("Email sent!" + subject);
              return SUCCESS;
    Regards
    user12841694

  • Not able to send email notification to adhoc role created

    Hi All,
    Have a requirement to send email notification to multiple emails from workflow. As per the given requirements have derived the emails and concatenated with comma (,) and passed to the API createadhocrole to create.
    lRoleEmail has value as [email protected],[email protected]
    wf_directory.CreateAdHocRole(role_name => lRoleName,
    role_display_name => lDisplayName,
    language => 'AMERICAN',
    territory => 'AMERICA',
    role_description => NULL,
    notification_preference => 'MAILHTML',
    role_users => NULL,
    email_address => lRoleEmail);
    A new role is getting created but there is no email sent.
    Created a new attribute of role type and in the notification function have assigned the same as the performer.
    The NOTIFICATION_PREFERENCE in WF_ROLES table is DISABLED for the new role.
    If anyone came across same issue please let me know to to achieve this.
    Thanks in advance.
    MJ

    You need to provide the correct email address but not the dummy address like '[email protected],[email protected]'. One more thing you can give only email address per one user or role. You cannot assign multiple addresses, if you do also it treats the entire string as one email address only.
    After changing the email address, modify the notification preference to MAIL* and then send a notification.

  • Email Notification - ERROR: 530 5.7.1 Client was not authenticated

    Hi People!
    I am receiving the follows error when I run scheduled task. Also, I used Javamail and I have the same problem. The problem: MAIL FROM isn´t authenticating. How can I solve it?
    Other question: How can I configure Email Notification in debug?
    Thanks!
    API Code (Schedule task)
    this.dataProvider = getDataBase();
    tcEmailNotificationUtil emaildef = new tcEmailNotificationUtil(dataProvider);
    emaildef.setSubject("User: " + s2);
    emaildef.setFromAddress(fromaddr);
    emaildef.setBody("OIM has detected a modify in Active Directory. " );
    emaildef.sendEmail(toaddr);
    System Configuration->XL.MailServer=Email Server
    IT Resource 'Email server'
    Name Email Server
    Auth : true
    Server name : exchange server name
    User name : <domain name>\User name
    Password :: Password of that user
    ERROR
    ERROR,11 Jan 2011 18:18:00,375,[XELLERATE.REQUESTS],Class/Method: tcEmailNotificationUtil/sendEmail encounter some problems: 530 5.7.1 Client was not authenticated
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.1 Client was not authenticated
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at com.thortech.xl.dataobj.util.tcEmailNotificationUtil.sendEmail(Unknown Source)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.processUserChange(ActiveDirectoryReconTask.java:657)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.processBatch(ActiveDirectoryReconTask.java:341)
    at com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController.searchResultPageEnum(Unknown Source)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.performReconciliation(ActiveDirectoryReconTask.java:248)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.execute(ActiveDirectoryReconTask.java:97)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    --------------------------------------------------------------------------------

    Thanks Justin,
    for all your help and support.
    there was some settings to be done in the exchange server. and today the system admin co-operated with me and did the changes in the exchange.
    now the messaging is working fine.
    Thanks,
    Rashed

  • Human Workflow is not sending Email notifications to AD users

    Hi,
    I'm trying to send email notification to the assigness from workflow. If I use the weblogic users with email attributes, Its sending mails. But once I switch to AD and use the AD users it's not. I have made the AD provider to be the first in the list and also able to login to the worklist app using the same user. Problem is that it's not sending mails.
    Can anyone please help soon.
    Regards,
    Thejas

    Can you explain what are AD users and how they are created(APIs)?
    Please check that the user exists in wf_local_roles table.
    select name,notification_preference, email_address from wf_local_roles where name = <AD Username>
    In order to send email notification, the user/role should have the proper email addresses and notification preference set to MAIL* i.e MAILHTMl, MAILHTM2, MAILATTH, MAILTEXT..etc

  • Email notification to end-user only when both resources are provisioned

    Hello Gurus,
    My client has a requirement where the end-user needs to be sent an email notification as soon as his account gets created in OID and EBS.
    So the next time when the user logs in; he should be able to access both his accounts. But the email should be sent only when the 2 accounts are succesfully created.
    How can we do that by means of process tasks and adapters?
    Can anybody give an idea about how can we provide this functionality in the best way OOTB or custom way (code snippet) ?
    Thanks,
    - JHB.

    Hi
    If you are using OOTB connectors for OID and EBS then this requirement can be achieved by using OIM API.
    On successful response of 'Create user' in OID or EBS call a custom adapter and check for the provisioned status of other RO i.e. on completion of Create User task of OID, check for prov status of EBS and send the mail accordingly.
    If the user is not provisioned to the other resource, then do not send the mail. Otherwise if the user is already provisioned to the other resource, send the mail to the user. This approach is based on the assumption that there is no link between the provisioning to OID and provisioning to EBS.
    Correct me if I missed something.
    Hope this helps.

  • Email notification and UWL

    Hello Everyone,
    We are currently implementing Universal Worklist. For a start we will connect it to several SAP back-ends (R/3, SRM, HR), and in a second stage we will connect it also to others -non SAP- systems having their own workflows.
    Currently, each of these back-ends is sending out email notifications (one generic email per back-end each day, with a link to the back-end's inbox). This wouldn't make much sense with UWL, as the user would still receive every day one email from R/3, one email from SRM, etc., but they would all re-direct him to a central inbox (i.e. UWL).
    Is there any functionality comparable to RSWUWFML2/Extended notifications running on the Netweaver Portal? Is there any other solution to this?
    Thanks for sharing your thoughts on this.
    Cheers,
    Patrick

    Hi Kjetil,
    Do you know how the problem was finally solved in your former company?
    I already had a look to your post before, but for me the question is still opened. We have a corporate (non SAP) portal which users see by default when they open their browser and from where they can navigate to the SAP portal, in which we do not have single sign on.
    So our users will definitely not login to the SAP Portal by themselves (nor to go to UWL, nor to display the homepage).
    Maybe that an applet running on the corporate portal and doing RFC calls on the different back-ends would solve it, but I believe that might be quite a burden to develop, especially if we start talking to various non SAP systems as well. A better approach would probably be to query the portal db to look at what is in each user's UWL. But I have no idea of how the UWL data is structured in the portal and how it is updated (i.e. is the delta pull mechanism also running when a user is not logged in the portal?). I am also not sure whether there is an API in the portal to query this easily (i.e. similar to SAP_WAPI_COUT_WORKITEMS). Has anyone tried this approach before?
    Cheers,
    Patrick

  • How to suppress cancel email notification

    Hello All,
    We have a time out in place for AP invoice approval for every 2 days. After every time out the Canceled remainder email comes. Is there a way to suppress the email notification of cancellation?
    Regards,
    Aniruddha

    E-mail notification is not available as a feature in Audit Vault 10.2.3.1, the latest version available.
    However, it is possible to set up e-mail notification for alerts with some coding. Each alert raised by Audit Vault is placed on a queue in the repository. This is a standard Oracle Advanced Queue, and can be subscribed to using AQ APIs in PL/SQL or, with the JMS adapter, in Java. Once a subscriber is up and running, it will pick up any alerts that are raised and can route them to e-mail if needed.
    Sample code to do exactly this is provided in $ORACLE_HOME/av/demo/alert on the AV server.

Maybe you are looking for

  • How to find out the BI Publisher Version from the Excel output generated.

    Hi Can any one tell me How to find out the BI Publisher Version from the Excel output file generated using BI publisher. Edited by: 781689 on Aug 1, 2010 10:22 PM

  • N73 memory card

    My N73 is the Hong Kong IE version and I bought it in January. The problem is that the memory card just randomly removes itself during normal usage, once i even noticed that everytime I press the '3' key it just removes itself. Is anyone else experia

  • Garageband unexpectedly quits on launch with one user

    Strange happenings with Garageband since upgrading to Lion (Lion upgrade might be a co-incidence). Garageband works fine with one user but doesn't launch with another user - it unexpectedly quits every time on launch. Have tried repairing permissions

  • Manual Bank Statement Date

    Hi All, Accounts user entered manual Bank Statement and save but wrongly entered Bank Statement Date. I am unable to change Bank Statement dat. Is there any way to change Bank Statement date? Regards AJ

  • Again a Maps-related problem

    The Weather icon suddenly disappeared from the Maps menu on my phone several days ago. What is going on? I am using a Nokia E72. Besides, why the newest Maps version (3.06) is not available for E72?