Need to send an automated email

hi all .. I have a requirement like.. I need to send an automated birthday greetings mail notification on every morning.. so I need a general code...for that
so pls any one help me thank you in advance

http://java.sun.com/developer/EJTechTips/2004/tt0426.html#1

Similar Messages

  • How to send an automated email notification after dataloads complete.

    Please search the forums before posting
    Hi ,
    Hoq can we send an automated email notification once the daily data loads are complete.
    All the data loads are done through PC and after these got complete daily we need to send an automated e mail saying the loads are completed.
    Request your replies.
    Edited by: Arun Varadarajan on Mar 10, 2009 9:22 AM

    Hi,
    check this threads/links:
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/9bdd42cadf2878e10000000a155106/frameset.htm
    Process chains and Email alerts?
    process chain Email Notification
    E-mailing functionality on a process chain
    If you search SDN you will find much more...
    Regards
    Andreas

  • I need to send an automated birthday greetings mail notification

    hi all .. I have a requirement like.. I need to send an automated birthday greetings mail notification on every morning.. so I need a general code...for that
    so pls any one help me thank you in advance

    package notification;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class Notification{
        /** Creates a new instance of Notification*/
        public Notification() {
        public static void main(String[] args) {
            try {
                String sql = "Select name, email from users where DATEDIFF(NOW(),birthday)=0)";
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                Connection conn = DriverManager.getConnection(
                        "jdbc:mysql://localhost/birthday?user=java&password=javajava");
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery(sql);
                while (rs.next()) {
                    String theText = "Congratulations "+rs.getString("name");
                     new BirthdayMail("smtprelay.myserver.net", rs.getString("email"), "[email protected]", "Automatic notification", theText, "Birthday");
            } catch (SQLException ex) { // handle the error
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println(
                        "VendorError: " + ex.getErrorCode() + " " + ex.getMessage());
            } catch (Exception ex) { // handle the error
                System.out.println("Non-sql exception: " + ex.getMessage());
                ex.printStackTrace();
    * BirthdayMail.java
    package notification;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class BirthdayMail {
         * Main method to send a message given on the command line.
        public static void main(String args[]) {
            try {
                String smtpServer=args[0];
                String to=args[1];
                String from=args[2];
                String subject=args[3];
                String body=args[4];
                send(smtpServer, to, from, subject, body, "");
            } catch (Exception ex) {
                ex.printStackTrace();
            System.exit(0);
         * Constructor.
        public BirthdayMail(String s1, String s2, String s3, String s4, String s5, String s6) {
            try {
                String smtpServer=s1;
                String to=s2;
                String from=s3;
                String subject=s4;
                String body=s5;
                String personal = s6;
                send(smtpServer, to, from, subject, body, personal);
            } catch (Exception ex) {
                ex.printStackTrace();
         * "send" method to send the message.
        public static void send(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));           
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                //log.info("Message sent OK.");
            } catch (Exception ex) {
                ex.printStackTrace();
        public static boolean statusSend(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                // -- Attaching to default Session, or we could start a new one --
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));
                // -- We could include CC recipients too --
                // if (cc != null)
                // msg.setRecipients(Message.RecipientType.CC
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                return true;
            } catch (MessagingException ex){
                log.error(ex.toString());
                return false;
            } catch (Exception ex){
                ex.printStackTrace();
                return false;
    }and in cron.daily a script to daily execute the project:
    #!/bin/sh
    /usr/local/jdk1.5.0_06/bin/java -jar /home/admin/proj/notification/Notification.jar
    exit 0

  • I have forgotten my security questions and need to send a reset email, but the email address that it wants to send it to doesn't work anymore. How do i change the email they send the email to?

    I have forgotten my security questions and need to send a reset email, but the email address that it wants to send it to doesn't work anymore. How do i change the email they send the email to?

    You cannot and need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (95774)

  • I need help sending pictures by email. I add picture a picture and send it but if I send a second picture in another email the same picture from the first email is sent instead of the second picture

    I have been sending pictures to people while organizing my iPhoto. Usually it is one picture per email.  Unfortunately, it ends up that the same picture is ending up on each email instead of the picutures that I am picking out.  Usually the first picture that I send is the picture that is send in all the emails.  HELP!

    Launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If it does try the following:   make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    If the problem doesn't appear in the test library do the following with your original library: make a temporary, backup copy (select the library and type Command+D) and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • I created a movie in iMovie. I need to send it via email to a non macbook. Is there any way to convert it to a pdf, mp3 or jpeg?

    I have to send my imovie to someone who does not have a macbook for a project. I am trying to figure out what the best way to do that is. The professor said its easiest if you save it as a pdf and send it... but I do not know how to do that!

    Movies/videos are huge files - unless it is only a few seconds long, it will most likely exceed the limits set by most email servers and ISPs. Here are the icloud limits:
    http://support.apple.com/kb/HT4863
    Rather than emailing, I'd suggest uploading it to Youtube or dropbox so the recipient can look at it there.

  • How do we send automated emails

    I am creating a program which needs to send an automated email to a user along with his/her password.
    Is there an example code i can have a look at to help me create this sort of program that generated an automated email?

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • Automated email possible?

    I have an admin page that displays data from a MySQL table
    called tbl_data. It also has a "delete" and "edit" link for each
    row that is displayed. One of the columns in this table is called
    "user". I need to edit a row by adding a user name to the "user"
    column. I have another table called tbl_user, and it contains user
    name, email, etc for about a dozen users. The user added to
    tbl_data comes from tbl_user.
    When I add (edit) a user to tbl_data, I would like to send an
    automated email to that user. Is this possible? I am using DWCS3,
    PHP5, & MySQL5.

    "Mr. Brownie" <[email protected]> wrote in
    message
    news:fp9ubj$5lo$[email protected]..
    >I have an admin page that displays data from a MySQL
    table called tbl_data.
    >It
    > also has a "delete" and "edit" link for each row that is
    displayed. One
    > of the
    > columns in this table is called "user". I need to edit a
    row by adding a
    > user
    > name to the "user" column. I have another table called
    tbl_user, and it
    > contains user name, email, etc for about a dozen users.
    The user added to
    > tbl_data comes from tbl_user.
    >
    > When I add (edit) a user to tbl_data, I would like to
    send an automated
    > email
    > to that user. Is this possible? I am using DWCS3, PHP5,
    & MySQL5.
    I'm not sure what kind of server you are using, but a Windows
    server will
    have CDO and/or CDONTS components installed that will provide
    this
    functionality.
    http://msdn2.microsoft.com/en-us/library/ms526914.aspx

  • Automated emails

    We have quite a few users who do not use the system regularly. I want to send an automated email from the system with a cc to the users reporting supervisor that the said user has not used the system for X days. The X is a variable which can be changed. Can this be done ?

    Hi !
    It sounds like creating a workflow rule that will send an e-mail. But the event trigger is when a user login and the condition is if the difference between his last login date and today is more than X.
    But you can't trigger a workflow on a user login.
    I'll suggest to create user lists and if your managers have access to the application, they can consult the user list that will show them the list of their users sorted by Last login date...
    The second way is the same, using reports...
    But you can imagine to create a specific program that will use the webservices to retrieve datas about users, for example every evening, and send an e-mail to the manager. Then, your X will be in your program so that you can change it when needed...
    Hope this will help, feel free to ask more !
    Max

  • I am finish my project and want to end to another person by email the project so that they can burn a dvd to be displayed at our Church. Normally I would burn the DVD myself but have to send it via email. how to they press it to dvd.Thanks

    I have finished my FCP X project and in the past I would burn a copy but since I am out of town I need to send it via email. The peron is able to view the project when it comes by email but I am wondering how can they burn a dvd copy of it to display at the Church for our announcements.  The person I am sending it to has a Mac too. Thanks

    First off, you're not likely to be able to email it. Most email systems limit the size of messages (and their attachments) since email isn't really designed for large transfers. It's not uncommon to see 50MB as a cap. Unless you're working on an especially small project you're likely to exceed this limit.
    Instead you should consider creating a disk image of your DVD and using a public file service such as DropBox or YouSendIt.
    If you create a disk image (.dmg) file that simulates a full burned DVD, the reciever can burn that to disk using Disk Utility on their machine. They don't need FCP X on their side.

  • How do I send the same email to multiple addresses from my address book?

    I need to send the same email to many people on a regular basis. I especially entered all my contacts in the address book. Now I find out that I can only click on one of my contacts email address to create a new message. But I need to send 1 email to about 50 people. How do I go about this?

    Firefox has no email features, if you are using a webmail service in Firefox you need to ask the support for the webmail service. Any email features will be part of the webmail service.
    If your question is about Thunderbird, you can ask in one of these forums:
    * http://forums.mozillazine.org/viewforum.php?f=39
    * http://getsatisfaction.com/mozilla_messaging

  • Idoc/ALE error handling, send to external email

    Hi all,
    I'm developing an IDoc inbound interface for purchase order create using PORDCR1. For the error handling functionality, I need to send an external email describing all of the validation error happened in user-exit EXIT_SAPFKCIM_002. Please kindly tell me how to cater the functionality. I won't use workflow because the error handling can't describe all the error, it just displaying the first error encountered. I also don't want to create any custom object since message type PORDCR1 is available. I think creating a custom FM is a possible way, but if there is another way, please tell me how.
    Thanks,
    Teddy

    Hi Teddy,
    A custom FM is the easiest and simple way.There may be other ways.
    Regards,
    Atish

  • Help sending out long email message from ORACLE PL/SQL

    Hello,
    I need help sending out long email message from ORACLE PL/SQL.
    My message(email body) contains about 4000 characters and comes out truncated somewhere on the middle.
    My business requirements do not allow me to send it as attachment.
    I am using oracle utl_smtp package and on oracle 10gR2.
    Is it possible to send out long text message from Oracle?
    Thanks!
    Ia

    Thank you very much for your responses.
    Even if I use email procedure below my message is getting truncated.
    Here is how I am trying to execute the procedure from sql plus:
    DECLARE
    P_SENDER VARCHAR2(32767);
    P_RECIPIENT VARCHAR2(32767);
    P_SUBJECT VARCHAR2(32767);
    P_BODY VARCHAR2(32767);
    BEGIN
    P_SENDER := 'xxxx@yyy';
    P_RECIPIENT := 'xxxx@yyy';
    P_SUBJECT := 'long text message';
    P_BODY :=
    '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    9 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    10 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    11 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    12 34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
    21 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789';
    EMAIL ( P_SENDER, P_RECIPIENT, P_SUBJECT, P_BODY );
    COMMIT;
    END;
    SQL> @long_sp;
    PL/SQL procedure successfully completed.
    The email message is:
    long text message
    xxx@yyyy
    Sent:     Tuesday, May 25, 2010 6:52 AM
    To:     
    xxx@yyyy
    1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 7 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 8 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 9 12345678901234567890123456789012345678901234567890123456789012345678901234
    Message is getting truncated around 1000 characters.
    What am I doing wrong?
    Please help!
    Thanks!!

  • Send a Failure Email Notification After Load Plan execution in ODI 11g

    Hi Experts,
    Greetings!
    I am trying to send an email if any of the step fails during Load Plan execution. Irrespective of the failed object, only 1 email should be sent to the Administrator. I unable to do this. Mails are getting sent for the no of times the no of object fails. For eg if 10 out of 100 steps fails, 10 emails are getting sent. I need to send only 1 email.
    I am using ODISendMail.
    I have tried various combinations however, all in Vain.
    For instance:
    root step --> Exeception Step (Send Failure Email) and Execption behaviour (Run Exception and Ignore). Using this because, I dont want to stop the load plan on the step failure.
    Interface1: Exeception Step (Blank) and Execption behaviour (Run Exception and Ignore).
    Interface2: Exeception Step (Blank) and Execption behaviour (Run Exception and Ignore).
    Exception not getting executed.
    Please help.
    Regards,
    Andy

    Thanks SH.
    I tried your suggestion as per below.
    1. Created global variable "v_cnt" with default value "0"
    2. Created package "pkg_v_cnt" to increment the variable by 1
    3. created package "pkg_sendError_Email" to check if v_cnt > 0 then Send Error Email.
    For Instance, the loan plan looks like this:
    root step --> Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Raise)
    Interface1: Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Ignore).
    Interface2: Exeception Step (pkg_v_cnt) and Execption behaviour (Run Exception and Ignore).
    Send Error Email (pkg_sendError_Email)
    The issue here is that, the variables are not getting the incremented value and hence unable to send email . The variable value remains "0" even after execution of the exception steps when both interfaces fails.
    Pls help.
    Thanks,
    Andy

  • Can we send survey to email ids from formcetral itself? Can we track who has filled the survey?

    Can we send survey to email ids from formcetral itself? Can we track who has filled the survey or given the response?

    We currently do not support this. You would need to send out the emails and track who filled it out yourself.
    Randy

Maybe you are looking for

  • How do you share a Guest's file to the owner's files - detailed instructions needed

    Previously I asked how to save a file created by a Guest user into the owner's files.  Matt Clifton answered "Put files in the Users/Shared folder, they will not be deleted when guest signs out."  I can't see how to do that.  I am creating a recordin

  • Vertical line in flat file

    Hello experts, In flat file ' | ' (vertical line) is maintained as seperator. flat file format: J|1|A| here J is data of column-1 1 is data of column-2 A is data of column-3. '|' is seperator, I want to upload. When i tried to upload the file with th

  • I cant figure out how to change my security questions

    i cant find out where to change my security questions

  • FaceTime error message

    everytime i try to log in to FaceTime i get "The server encountered an error processing registration.  Please try again later."  it works fine on my iPad... any help?

  • Quicksilver 733 will not wake up from sleep

    The machine goes to sleep normally. when called to wake, the fans start, the HD's start up, but the screen remains black, every time. Must use restart button. No USB cards, no printers attached, Apple 15" LCD and an apple keyboard and mouse. That's i