How do i authentication so that i can send a email through jsp a page

<%@ page import="java.lang.*,java.util.*,javax.mail.*,javax.mail.internet.*,
javax.activation.*" %>
<%
String p_to = "[email protected]"; // Please fill in your email here
String p_from = "[email protected]"; // Please fill in receipient’s email here
String p_subject = "Testing";
String p_message = "This is a test email";
String l_host = "smtp.mail.yahoo.com.sg";
// Gets the System properties
Properties l_props = new Properties();
// Puts the SMTP server name to properties object
l_props.put("mail.smtp.host", l_host);
l_props.put("mail.smtp.port","25");
l_props.put("mail.transport.protocol","smtp");
l_props.put("mail.smtp.auth", "true");
l_props.put("mail.user", "ancde");
l_props.put("mail.password","password");
// Get the default Session using Properties Object
Session l_session = Session.getInstance(l_props, null);
l_session.setDebug(false); // Enable the debug mode
try {
MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
l_msg.setRecipients( Message.RecipientType.TO
, InternetAddress.parse(p_to, false));
l_msg.setSubject(p_subject); // Sets the Subject
// Create and fill the first message part
MimeBodyPart l_mbp = new MimeBodyPart();
l_mbp.setText(p_message);
// Create the Multipart and its parts to it
Multipart l_mp = new MimeMultipart();
l_mp.addBodyPart(l_mbp);
// Add the Multipart to the message
l_msg.setContent(l_mp);
// Set the Date: header
l_msg.setSentDate(new Date());
// Send the message
Transport.send(l_msg);
// If program reaches this point, then message is successfully sent.
out.print("Success");
} catch (MessagingException mex) { // Trap the MessagingException Error
out.print("Failure: Messaging Exception: " + mex);
} catch (Exception e) {
out.print("Failure: General Exception: " + e);
e.printStackTrace();
%>

First, I would strip out all of that code and put it in a servlet.
Second, this has nothing to do with Web Start or JNLP.

Similar Messages

  • Without dividing up a large email list, is there a way that I can send an email campaign out to a sp

    Without dividing up a large email list, is there a way that I can send an email campaign out to a specific subset?

    Hi,
    Unfortunately no as the only ways is to split up your existing mailing list and upload as a new list in this case.
    Kind regards,
    -Sidney

  • How do I create a contact group so that I can send an email to several contacts without having to type individual names.

    How do I create a group in my contacts so I can send an email to several people without having to type names individually? In gmail on my computer I have several groups of contacts but I don't see them on my iPad air.

    In the contacts app there really isn't a way to do this.  What I do however, is create a note in the Notes App with the email addresses of the people I want to email to like this:  [email protected]; [email protected]; [email protected]
    Then when I want to email that group, I just use the copy feature of iPad, pasted it into the to line in an email and voila, I can email to a group.

  • How do I incorporate video that EVERYONE can see? Quicktime redirect to Flash page???

    I created a website for my video production company using Dreamweaver 8 (http://www.playroomcreative.com/production.html). I have average web design knowledge.
    The sample videos of my work are all MP4 (H.264/AAC) which is compatible with Quicktime and Flash, however I am using JW Flash Player on my website because most people have Flash installed on their computers. I even have a message that prompts people to download the newest version of Flash when the video doesn’t appear.
    My question is; what do I do about people that use iphones and ipads that can’t run Flash?
    I would assume that I should change the way I have it now and put a Quicktime video embedded page FIRST, then use the “Check Plugin” Dreamweaver behavior to detect if they don’t have Quicktime and redirect them to the Flash video page. Then, if they don’t have the proper version of Flash they will be prompted to upgrade.
    If I did it the opposite way (Flash page first that redirects to a Quicktime page when no Flash plugin is found) than the Flash page would never have a chance to offer it’s upgrade prompt if the user doesn’t have the proper version Flash.
    Am I approaching this the right way?
    Is there a better way (besides the use of YouTube or Vimeo type video hosting sites)?
    Thanks in advance!

    Introduction to HTML5 Video
    http://dev.opera.com/articles/view/introduction-html5-video/
    Building a custom HTML5 player with CSS3 and jQuery -
    http://dev.opera.com/articles/view/custom-html5-video-player-with-css3-and-jquery/
    "With Google recently releasing the VP8  codec, and the WebM project coming into existence. Opera, Firefox, Chrome and IE9 all have support in final builds, developer builds, or at least support announced for this format, and Flash will be able to play VP8. This means that we will soon be able to create a single version of the video that will play in the <video> element in most browsers, and the Flash Player in those that don't support WebM natively."
    Video For Everybody!
    http://camendesign.com/code/video_for_everybody
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Is there no way that i can send an email to multiple people without having to choose them individually

    hey there
    I only recently started using this mail.but never thought i would want to do what I just asked.so If there is anyone that can help me.......
    please .will appreciate it very much

    If it is a group of contacts that you send to regularly you can create a mailing list. Here is how to set that up.
    http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Create_Mailing_List
    Do you have the Contact Sidebar turned on in the Write window? If not press F9 when you have a Write window open. With this you can hold the control key down and click multiple contacts to select them and then use one of the Add To buttons at the bottom of the sidebar.

  • How to change the fact that after I send 5 emails I get a message to the effect that I cannot send more than 5 in 30 minutes?

    So, I'm busily responding to emails, etc. etc. and, as I say, after 5 emails are sent in quick succession, I get some sort of message saying I may not send more than 5 messages in 30 minutes ... !!! How can I get rid of this limitation? Because, what happens is I then save the emails I'm writing as drafts -- but I don't always remember they are sitting in the drafts folder and am horrified when I go check a few days later and there are my email replies waiting to be sent.

    Talk to your email provider.

  • Using iPad mail program I have a draft of an email. I attempted to "cancel" and "delete draft" but it is still on my screen even after shutting down and restarting. How do I exit so that I can use other mail functions?

    Using iPad mail program I have a draft of an email. I have attempted to "cancel" this and "delete draft" but the email stays on my screen. How can I exit this so that I can use other email functions?

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • I have an iPhone and my 9 year old has an iPad, they are both linked to my Apple ID however I want his to be separate now so that we can send messages and face time. Any suggestions how I do this???

    I have an iPhone and my 9 year old has an iPad, they are both linked to my Apple ID however I want his to be separate now so that we can send messages and face time. Any suggestions how I do this???

    Thank you. I tried changing his id but it changed it on both devices:( Don't really have a clue:( I have set up an email account so that he can get an Apple ID.
    Do you by chance know how I do this?!?

  • When I click share to Facebook it takes me to my sons Facebook account. How do I add my facebook account so that I can send photos to that instead of my sons!!?

    When I click share to Facebook it takes me to my sons Facebook account. How do I add my facebook account so that I can send photos to that instead of my sons!!?

    iPhoto Preferences > Accounts > click the little plus in the lower left corner and follow the onscreen instructions.
    Cheers

  • I'm unable to add the email address for iMessage, that I was using before iOS 7 to my iPhone, because it says that it is "in use by another device," but I have no other devices.  How do I resolve this so I can add this email address to my iPhone?

    I'm unable to add the email address for iMessage, that I was using before iOS 7 to my iPhone, because it says that it is "in use by another device," but I have no other devices.  How do I resolve this so I can add this email address to my iPhone to send and recieve iMessages?

    Sync your iPhone to iTunes, and see if that does the trick.  Also you could try a Soft Reset with no Risk to Data.  Holding down both the Sleep button and the Home button until the Apple logo appears and then waiting for the Reset to bring you iPhone back to the lock screen.    Are you trying to add the email at Settings>Messages>Send and Receive from (2 Addresses) your iPhone number and your email address?

  • How do I set up my iPad so that I can recieve the emails from my Outlook Express account

    How do I set up my iPad so that I can recieve the emails from my Outlook Express account

    Your iPad doesn't receive email from Outlook Express (or any other email client).  It receives email from your email provider.  To set up your email account on your iPad go to Settings>Mail,Contacts,Calendars...tap Add Account and add your email provider's account settings with your username and password.  iCloud, Gmail, Yahoo, AOL and Hotmail email settings are automatically entered by tapping the appropriate button.  Others must be manually entered by tapping Other.  (Exchange accounts will also require you to enter your email provider's settings.)

  • How do I download my text messages to my pc so that I can send them to my email account????

    How do I download my text messages to my pc so that I can send them to an email accout,????

    http://www.hongkiat.com/blog/backup-iphone-sms/
    more options
    https://www.google.dk/search?q=backup+sms+from+iphone+to+pc&oq=backup+sms+from+i phone+to+&aqs=chrome.1.69i57j0l5.5364j0j7&sourceid=chrome&espv=210&es_sm=93&ie=U TF-8

  • HT5312 I forget my answer of two security questions, there is a typo error in rescue email address. How to resolve this so that I can use my Apple ID for online shopping?

    I forget my answer of two security questions, there is a typo error in rescue email address. How to resolve this so that I can use my Apple ID for online shopping?

    You won't be able to change your rescue email address until you can answer your questions, you will need to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to correct your rescue email address for potential future use

  • How do I shrink the page so that i can see the buttons on my downloader page?

    How I shrink the page so that I can see the buttons on my downloader page?

    Dear tjsnaps,
    I hate to admit this but after two days of trying to solve this problem we hit the green button and the problem went away. We feel likes idiots. Thank you for your prompt response.
    VAadministrator

  • I have Adobe Reader XI. Is there a way that I can fix skewed pdfs and delete blank pages? If so, How?

    I have Adobe Reader XI. Is there a way that I can fix skewed pdfs and delete blank pages? If so, How?

    Not possible with Adobe Reader.

Maybe you are looking for

  • Firefox closes all the tabs on its own unexpectedly and we have to start everything afresh.why does this happen?

    our browser closes on its own unexpectedly, all the tabs and everything closes down (esp when playing games in facebook), we have to start everything afresh, just worried if this is not a sign of crash because we haven't received any crash report and

  • Mapping Runtime failing for all messages

    Hi Experts, We are facing an issue with our mapping runtime in the integration engine. Any message going through the integration engine is giving a mapping error as shown below (for example): LinkageError during appliction Java mapping com/sap/xi/tf/

  • Problem viewing form response pdf

    Hi All, I created a form using Acrobat X Pro that I emailed to myself to test before distributing. I filled out the form, then tried to view the response. I got an this error message: So I installed the new Flash, but when I went back to view the res

  • Using 'Screen' effect overtop of a spot color

    Hi there, This forum has been great to me so far and I hope it continues. I have a line drawing that I have set at 100% black (0,0,0,100). I have placed it overtop of a spot color and added the 'Screen' 100% effect to it. Unfortunately when view it i

  • 6.1 vs 10.3: between column spacing

    It appears that there is a slight difference in the spacing between columns in 6.1 and 10.3 Given that we use full column width images in each of our portlets, this is now causing us to have a minor horizontal scroll in the ballpark of 10 pixels in a