I want to create Automatic mailing application, help!.

hi all,
i m given an assignment to develop an automatic mailing application.
i this app. each newly registered user is being sent an email to email addr specified by him. this mail will be an acknowlegement to his registration.
email to be sent is an dynamic jsp file.
plz give any idea hw to do that.
thanx

import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
// Send a simple, single part, text/plain e-mail
public class TestEmail {
public static void main(String[] args) {
// SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
String to = "";
String from = "";
// SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
//Straing host = "smtp.yourisp.net";
String host = "smtp";
// Create properties, get Session
Properties props = new Properties();
// If using static Transport.send(),
// need to specify which host to send it to
props.put("mail.smtp.host", host);
// To see what is going on behind the scene
props.put("mail.debug", "true");
Session session = Session.getInstance(props);
try {
// Instantiatee a message
Message msg = new MimeMessage(session);
//Set message attributes
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = {new InternetAddress(to)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject("Test E-Mail through Java");
msg.setSentDate(new Date());
// Setting message as text content
//msg.setText("This is a test Mail from Java");
// Setting message as html content
msg.setContent("<div style='background-color:blue'>This is the test HTML content</div>","text/html;charset=\"UTF-8\"");
//Send the message
Transport.send(msg);
catch (MessagingException mex) {
// Prints all nested (chained) exceptions as well
mex.printStackTrace();
}//End of class

Similar Messages

  • Turning off automatic mail application

    Hi I don't use the Mail application but whenever I click on an email link or some other application wants to send an email the Mail application opens! How do I stop this and have safari and my yahoo account come up instead?

    Create the account for yahoo or just enter in some bogus data, for example, "localhost" as the server names. Mail'll look like it stalls during account setup on bogus data, but each page will eventually time out and continue on. Then once the bogus account is "set up," you'll be able to get into Mail Preferences. I think you'll be able to "restore" Mail.app to its "pristine" state simply by deleting your /Users/metreky21/Library/Preferences/com.apple.mail.plist

  • I want to create an applet, Please Help...

    HI all,
    I want to create an applet which should be able to display text and images...
    To display text in an applet I am using ...
    import java.awt.*;
    import java.applet.*;
    public class SimpleApplet extends Applet
        public void paint(Graphics g)
            g.drawString("A Simple Applet", 20, 20);
    }Now If I want to create few operators in a different class, and i want to use it from the SimpleApplet class what should be doing.

    HI all,
    I am creating an Gui: The code is here:
    import javax.swing.*;
    import java.awt.*;
    public class Tab extends JFrame
        JPanel p,p1,p2,p3,p4,p5;
        Frame f1,f2,f3;
        JTabbedPane tpane;
        public Tab()
            p = new JPanel();
            p1 = new JPanel();
            p2 = new JPanel();
            p3 = new JPanel();
            p4 = new JPanel();
            p5 = new JPanel();
            tpane = new JTabbedPane();
            p.setLayout(new GridLayout(1,1));
            tpane.addTab("File",p1);
            tpane.addTab("Edit",p2);
            tpane.addTab("Document",p3);
            tpane.addTab("View",p4);
            tpane.addTab("Help",p5);
            p.add(tpane);
            getContentPane().add(p);
            setVisible(true);
        public static void main(String[] args)
            // TODO Auto-generated method stub
            Tab t = new Tab();
    }I want to diaplay some text in the main area left. What should I do.
    How to add the Text.

  • I want to create a bsp page help me

    i want to create a page
    in which the following should be there,
    1.  A selection screen or a listbox for a pernr field from catsdb,
    2.  according to that pernr no i want to display all that week transaction done by him in catsdb.
    help me please,
    thank you,
    Points will be rewarded
    regards,
    Jagrut BharatKumar Shukla

    Look the following exaplmes for BSP developments.
    http://www.sapdevelopment.co.uk/webapps/bsp/washome.htm
    In your case you can use the HTMLB extensions like.
    dropDownListBox
    listBox
    to display list of PERNS in CATSDB.
    and display the CAT entries in a table view.
    Amandeep

  • HT204053 I want to create icloud mail id

    How to create I ICLOUD MAIL ID

    If you mean you want to create an iCloud email address, go to Settings>iCloud, sign in with your Apple ID to create your iCloud account, then turn Mail on.  You will be prompted to choose your @icloud.com email address.
    If you mean you want to create an iCloud ID, creat your Apple ID, then go to Settings>iCloud and sign in with the ID and verify the account by responding to the verification email that Apple will send you.  After doing so, the Apple ID will be an iCloud ID.

  • Mail Application Help

    On the 4th I sent out an attachment of pictures to another email address and ever since I've been getting that same email sent back to me and put in my "recovery" folder? I tried sending myself an email to check to see if everything is running good and I get it but a day later and it gets put in my "trash" folder? It's a gmail account that I've set it up with and I can get on line through Google and get all the email sent to it right away...nothing shows when I log in on the Mail application on my Macbook???
    Anyone know what I can do? Chris

    Mac OS X v10.6 Snow Leopard > Mail and Address Book
    http://discussions.apple.com/forum.jspa?forumID=1338

  • New to Java, want to create a game any help appreciated.

    I just downloaded java Studio. I would like to create Java games. Not sure where to start.. Do i need more programs? Any info would be of great help thanks....

    Hey,
    If you want to know which software you need to program java games (or any other java application for that matter), I'm guessing you don't have much experience using java.
    First, to answer your question, Studio will certainly do to create java. But even notepad will suffice. The only thing you really need to have is a SDK, you can get it from the Sun site.
    Second, You should ask yourself if java is the language to program in. Java is well suited for developing games. But it is also a very powerful general purpose language, so it can be very overwhelming. Maybe you should think of the alternatives?
    Flash: Has much better browser support than applets, so if you want to make an online game, this is probably a better choice. Don't be afraid of the possibilities in flash, unless you want to do 3d. You don't want do to 3d yet.
    PHP: if your game is text based, you might want to program it in PHP. It is mostly used for multi-user-"dungeons"(fill that in as you want).
    If you really want to learn how to program in java, I suggest you don't start on your game just yet. Try this PDF for starters: http://www.mindview.net/Books/TIJ/. The java tutorial is also pretty good, but cover the basics first: http://java.sun.com/docs/books/tutorial/ . I also suggest you don't start programming in an IDE(for you: Sun studio) until you start working with multiple classes. I suggest JEdit for "basic"(it has a million features, don't worry) programming. Later you can start to learn Sun Studio (Or Eclipse, if I can lodge in my preference), but be careful: these programs are excellent, and will spare you hours of work, but only if you spend (a lot) of time on how to use them properly.
    As a final thought: the web is your friend. There are tons of good resources on the web for developing games, and lots of them focus on java. A good place for info is http://www.gamedev.net/, lots of articles, and helpful hints on choosing language, tile games, etc... Another specific one is http://www.brackeen.com/javagamebook/. It has working code for a tile-based game, and it even has a software 3d engine. It also has good for for detecting mouse and keyboard actions. Get more experience before you start with these ones, though.
    Good luck!

  • I want to create automatic PO generation for Non-Catalogue requisition.

    Hi All,
    From I-Procurement i am creating non-catalogue requisition and i am looking for autocreation of Purchase Order against that requisition.i dont have any BPA's or CPA's like wise for Catalogue Requisition and Punchout Requisition respectively.
    Please tell me where to change in worlflow or somewhere else.
    Looking for urgent Reply.
    Thanks in advance
    Binu.

    Hi Mano Sri,
    Thanks for the reply,
    I have done all the steps thats are mentioned by you. I have rechecked them, Still I do not get the PO generated automatically.
    even the purchase info record and source list are mentained.
    I am getting the error in workflow as "Info record for vendor and Material Does not exists"
    I have checked it every thing is defined ok. What could be the reason that it is not able to recognise the Purchase info record?
    Pls help it is urgent for me?
    Thx & Regards,
    Chamandeep

  • I don't want to use BTY Mail Beta - help

    Morning forum fans
    The 'normal' BTY failed to load correctly this morning so had to use Mail Classic, which loaded fine
    However, there appears to be no way of going back to the 'normal' one.
    The only option is to use/try the new Mail Beta, which I don't want to
    Here's the screenie of the Beta and the links (in order)
    http://www.btyahoo.com/btyterms
    http://www2.bt.com/btPortal/application?pageid=pan_privacy_policy&siteArea=pan
    http://info.yahoo.com/privacy/
    How can get back to the normal one?
    TIA
    -+-No longer a forum member-+-
    Solved!
    Go to Solution.

    Cheers tommy
    the link does exactly that - back to classic
    It does appear that some user changes were not carried over.....
    I've always considered using IMAP etc, but tend to leave BT products and services almost as they would be when they're first used/installed - mainly to spot things like this.
    Though I do use a lot of chuck away Gmail ones - for this that and the other - at least they're not connected to BT or Yahoo
    -+-No longer a forum member-+-

  • I just got an iPad and I want to create a photo book help

    I just got an iPad and my husband and I both have iPhones and my aunt has a Mac computer and she created some awesome photo books and I want to make some books can u please tell me how to get this iPhoto! Is it an app or what?

    iPhoto is a part of the iLife suite that comes on all new Macs and can be purchased for Macs in the App Store - it is not an iPhone app nor is it currently an iPad App
    So add a Mac to your iPhones and iPad - you will love it just as much
    LN

  • I want to create a mail merge for address labels into a table, but when I fill a table with merge fields, it ends up creating multiple entries for the same address, rather than one table full of each address.

    ...but when I fill a table with merge fields, it ends up creating multiple entries for the same address, rather than one table full of each address. Please help.
    Thanks!

    That is a quirk of Pagesthat  it applies only one record per page.
    There is a way around this:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=245&highlight=labels &mforum=iworktipsntrick
    Peter

  • I want to create a Ajax based Chating application using java .

    hi . I want to create an chating Application , and ajax based chatting application using java as my server side language ..i have some idea about it .. but one thing that i m not understanding is that how i will communicate with other users because each user has its own session so what i will do to send one messge to all the users ???? . i m new to JavaEE and i have chosen this as my semester project .. i need some help regarding this .

    First get it working without AJAX.

  • Want to create an application to extract SMS

    Hello,
    I want to create a windows application to extract sms and contacts from iPhone or iTunes backup. Is there any API available to access this data?
    Sanjay Bachhotia 

    Hi,
    I already developed this kind of customization. The system offered the possibility to clic on a cell (Project Center, or My Task, or Timesheet), to input a value to store in a custom field, or in a database.
    After clicking, a Popup with different textbox, etc...is displayed:  it is possible to put values, comments, or whatever.
    The benefits is that with this method, you don't have to redevelop the complete timesheet grid, which would be really complex.
    Instead of that, you develop a part of javascript code, which displays a popup containing asp.net code. From the aspx page, you can make what you want: modifying the value of an task/assignment customfield for exemple.
    To start, you can search for the Project Server 2010 SDK, Customize Project Center: it would be a good start point.
    In case of big difficulty, ask again here, and we could get in touch to give more explanations.
    Hope it helps,
    Sylvain

  • Can't find the table when creating the form application

    Hi there,
    I have created a new table named lp_cschedule under a user named
    lptrain in users tablespace.
    I want to create a form application to view this table. However,
    I can find this table in the list.
    Don't understand why ? Any idea ?
    Regards,
    Maggie

    Perhabs, the application's owner does not have the previleges on
    the table you have mentioned. Follows the citation of the Forms
    (from tables or views) wizard help:
    Tables, views, and synonyms in the application schema where you
    have SELECT, INSERT, UPDATE, or DELETE privileges.
    Tables, views, and synonyms where SELECT has been granted to
    public users.
    You automatically have SELECT, INSERT, UPDATE, or DELETE
    privileges on a table or view if it is owned by an application
    schema where you have Edit or higher access privileges.
    You can check the owner (=schema) of the application from the
    Navigator clicking on the Edit action link against your
    application.
    Regards,
    Alexandre

  • Web dynpro for abap how to create a customize search help in alv column

       hi:
          Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
          Are there specific examples ?
          thanks!!

    HI:
       I want to created a freely programed help which include date&time,and put help value to alv column.
      I have created a freely programed help in web dynpro for abpa application,I refer:
      **************** - WebDynpro for ABAP
      but have a problem!
       If you focus on the the input field in the first row, you get the value help
    However if  I go to the second row and focus on the same input field in this column, I don't get the value help:
    What is a good way to solve similar problems?
    thanks

Maybe you are looking for

  • Preparing the PR with the SC vendor tick in the Delivery Address tab

    Hi, 1)I have a scenario. The purchase requisition should be created with the SC vendor tick and a particular vendor at the given plant. Is it possible to create the PR via MRP. The detailed scenario is : there are 2 plants under a company code. for t

  • End User Logon

    Hi Experts, We have a issue with End user logon link.End user link is embedded in portal. We have maintained guest user as well with all respective web- services enabled. Data source is LDAP and authentication is NO. Let me explain the scenario as: 1

  • Material Ledger Movement type Groups

    I need to activated ML in a SAP ECC 5.0 client, But When I add entries in OMX7  (Define Movements type groups of Material Ledger) I can not modify "Revaluation of consumptios" field. Is there any dependence I need to review before add a group? I have

  • Where do I go online to set up out of warranty Express replacement?

    I can read all about this option  and see the pricing on the Apple site  but cannot find any way to order it! The Send in for service form does not show ERS as an option Please point  me to a link that I can use to set this up. My closest store is 60

  • [Solved] My terminal environment is messed up

    I have several terminal / virtual console related problems bugging me. 1) I cannot delete certain characters/typos and be sure they are gone. For example, if I have a variable VAR and I accidentally type $ echo $äVAR $äVAR Then I delete the accidenta