Sedn email problem-----need help

Why this is not working
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class Mailklasa {
public static void main (String args[]) throws Exception {
String host = "out.mail.bih.net.ba";
String from = "[email protected]";
String to = "[email protected]";
// Get system properties
Properties props = System.getProperties();
// Setup mail server
props.put("out.mail.bih.net.ba", host);
// Get session
Session session = Session.getDefaultInstance(props, null);
// Define message
MimeMessage message = new MimeMessage(session);
// Set the from address
message.setFrom(new InternetAddress(from));
// Set the to address
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
// Set the subject
message.setSubject("Hello JavaMail");
// Set the content
message.setText("Welcome to JavaMail");
// Send message
Transport.send(message);

Hi!
I've found the following error:
// Setup mail server
props.put("out.mail.bih.net.ba", host);it should be:
// Setup mail server
props.put("mail.smtp.host", host);Hope this helps.
Bye.

Similar Messages

  • Big email problems- need help asap

    I really hope someone out there can help me. I posted this same problem last night but I'm dying for some help. I 'm new to BB and can't set up my email account. We are a small company using Microsoft Exchange and access our email away from the office using Outlook web access. I'm going step by step doing everything it asks and when I'm done I get a message saying connection could not be established and to check that the server name is correct and that the server is available. I know the server name is correct because I use it on my laptop all the time to access my emails. Does anyone know how to check if the server is available? do I need some software I don't have? can I use the BIS to create an account and sync with my work outlook without having to change my email address. I'm very computer unsavoy and could use someone's knowledge. PLEASE HELP!!!!!!!!!!!

    chk these three knowledge base articles about typical OWA setup issues:
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB03133&sliceId=SAL_Pub...
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB04804&sliceId=SAL_Pub...
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB02858&sliceId=SAL_Pub...
    Message Edited by BBsingh on 09-24-2008 01:23 PM
    Click on KUDOS to appreciate our efforts and mark the thread RESOLVED if your issue is resolved.

  • Email Problem, Need Help

    Hoping someone can help. Have a HTC Droid DNA for a couple months and love it. No problems. About a week ago I took two pictures and was forwarding them to my gmail account([email protected] I accidentally sent them to [email protected] which is an account that does not exist. I received a notice "could not deliver mail" and two consecutive "droid" sound notifications. No problem I thought, just go into sent mail and delete but they are not there. I guess because they were not actually sent. Now for the past week, EVERY HOUR (that is the time I set for notifications-syncing) i get two consecutive droid sound notices. Extremely annoying.
    All mail functions for my gmail and aol accounts work fine before this happened and other than the annoying droid reminder every hour work fine after.
    I was hoping someone could help me solve this in some way. I am not very phone, tech literate so please explain any possible fix carefully.
    It was suggested that I clear the cache, that might fix the problem. I did that but unfortunately the problem remains. I would have thought this would (could) be a common problem (accidentally sending an email and attachment to a wrong non existent address).
    Many thanks in advance for any help.

    When the domains mail exchanger has a delivery problem it normally send that message to the sender alerting you to the problem.
    In the body of the message will be something like [email protected] could not be delivered, normally it will say the email address does not exist or will give a message of "we will attempt to deliver this message for 5,7, or 10 days"
    The domain if after these attempts will send you a final message of "Delivery to [email protected] has fail, we are sorry but we have gave up"  that will be the last message you should receive.
    I would send an email to [email protected] tell them to please stop the mx from sending you repeated bounce messages.
    takes them secounds to comply once they see your message.
    Of course that was in the old days, hopefully it has not changed.
    Good Luck

  • I forgot my answers to my security questions and I'm not receiving my reset email I need help soon because I have $15 on my account please help ASAP

    I forgot my answers to my security questions and I'm not receiving my reset email I need help soon because I have $15 on my account please help ASAP

    See Kappy’s great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities
    https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
    About Apple ID security questions
    http://support.apple.com/kb/HT5665
     Cheers, Tom

  • My email address is ***********, Apple ID I forgot my password, why not send links that Reset Pass on my email, I need help than why? Contact Us By Email me back with ***********, Thanks

    My email address is ***********, Apple ID I forgot my password, why not send links that Reset Pass on my email, I need help than why? Contact Us By Email me back with ***********, Thanks
    <E-mails Edited by Host>

    You are not addressing Apple here. This is a user-supported technical support forum. If you have tried to restore your Apple ID using iForgot, then try contacting iTunes Customer Service.

  • Zen Vision:M problem, NEED HELP!

    My zen vision:m is starting to run slowly. It started right after my player froze and i reset it.Now its really slow and barely even switches screens sometimes.Right now its just a black screen with the keypad lit up.Whats wrong with it'sI NEED HELP!

    johnnnyp wrote:
    hi, i have a problem with my creative vision m. i wanted to watch a movie and it froze. i tried to shut it down but it wouldnt respond, and now is frozen. please help me if you can!
    You know its kinda rude to derail XBenzinoFla thread with your own problems, make your own thread next time.
    But to the both of you especially XBenzinoFla, try putting your ZVM in rescue mode and run scan disk to see if it hel
    ps.

  • Zen Micro problem need help

    Today i was listening to music and my zen micro just froze while playing and no buttons could be pressed and the lock button wasnt on. So i took the battery out and rebooted the player but it froze at the creative screen. I went home and i went to recovery mode and tried to reload the firmware but it said erasing firmware for more than 2 hours. So then i tried a format but it said formating for the same amount of time. I need help please. Also, recently i've had problems witht the headphone jack. When ever i would stick it in it would sound distorted and i would have to move it around until i got it to a certain spot to hear it good again. If anyone else has this problem please tell me. One more thing i had returned my other micro zen in for hard dri've probems and this was my new one do u think if i have to return in (hopefully not) that they would accept it.

    If the functions in Rescue Mode aren't working properly then you need to contact Creative Support.

  • PHP Email form, need help...

    Heya,
    I have a flash form that uses PHP to send the data to an
    email, but it causes all of the data to display on the same line
    with no spaces when recieved via email, can anyone help? Thanks!
    Code:
    <?php
    $sendTo = "[email protected]";
    $subject = "Contact Form from Cabinet Source Website";
    $headers = "From: " . $_POST["name"] ." ". $_POST["phone"] .
    "<" . $_POST["comments"] .">\r\n";
    $headers .= "Reply-To: " . $_POST["name"] . "\r\n";
    $headers .= "Return-path: " . $_POST["name"];
    $message = $_POST["comments"];
    mail($sendTo, $subject, $message, $headers);
    ?>

    As bregent says, the names of the variables you're assigning at the top of the script don't match the variables that you're adding to the $body.
    Another problem is that you're using lowercase for the $_POST array. For example, you have $_post['gt']. PHP is case-sensitive. It should be $_POST['gt'].
    Even when you get those problems sorted out, the script is extremely insecure because you're not checking any of the values submitted. In particular, you're assigning the value of the 'gt' input field to the From: header. This will lay the form wide open to attack by spammers. (Google for "email header injection" to understand the problem.)
    If you want to put a value from the form into the headers, you must first make sure it's safe. For example, I see that gt is meant to be an Xbox Live gamertag. Assuming it must contain only letters and numbers, you should sanitize it like this before inserting it into the headers:
    $gt = filter_input(INPUT_POST, 'gt', FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => '/^[a-zA-Z0-9]+$/')));

  • Still stuck with the same old producer consumer weight problem need help

    Hello All,
    This is the problem I am stuck with right now.
    I have two array lists one producer array list and one consumer array list denoted by a and b
    P1 P2 P3 P4 P5
    5 6 7 8 9
    C1 C2 C3 C4 C5
    2 3 4 5 6
    Now we find all those producer consumer pairs which satisfy the criteria Pi>=Ci
    We have the following sets
    (5,2)(6,2)(7,2),(8,2),(9,2)
    (5,3)(6,3)(7,3),(8,3),(9,3)
    (5,4)(6,4)(7,4),(8,4),(9,4)
    (5,5)(6,5)(7,5),(8,5),(9,5)
    (6,6)(7,6)(8,6),(9,6)
    Let us done each of them with Si
    so we have S1,S2,S3,S4,S5
    we assign a third parameter called weight to each element in Si which has satisfied the condition Pi>=Ci;
    so we we will have
    (5,2,ai),(6,2,bi),(7,2,ci)....etc for S1
    similarly for S2 and so on.
    We need to find in each set Si the the pair which has the smallest weight.
    if we have (5,2,3) and (6,2,4) then 5,2,3 should be chosen.We should make sure that there is only one pair in every set which is finally chosen on the basis of weight.
    Suppose we get a pair (5,2,3) in S1 and (5,2,3) in S2 we should see that (5,2,3) is not used to compare to compare with any other elements in the same set S2,
    Finally we should arrive at the best element pair in each set.They should be non repeating in other sets.
    Given a problem
    P0 P1 P2 P3 P4
    9 5 2 2 8
    6 5 4 5 3
    C0 C1 C2 C3 C4
    we have So as (P0,C0) and (P4,C0)
    assuming that the one with the smaller index has lesser weight PO is selected.In the program I have used random weights.from set S1 we select the pair PO,CO
    S1 =(P0,C1),(P1,C1) and (P4,C1)
    since P0 and P4 are already used in previous set we dont use them for checking in S1 so we have (P1,C1) as best.
    S2=(P0,C2),(P1,C2) and (P4,C2) so we dont use P0,C2 and P1 and C2 because PO and P1 are already used in S1.
    So we choose P4,C2
    in S3 and S4 ae have (P0,C3),(P1,C3),(P4,C3) so we dont choose anything
    and same in S4 also.
    So answer is
    (P0,C0),(P1,C1) and (P4,C2).
    My program is trying to assign weights and I am trying to print the weights along with the sets.It doesnt work fine.I need help to write this program to do this.
    Thanks.
    Regards.
    NP
    What I have tried till now.
    I have one more question could you help me with this.
    I have an array list of this form.
    package mypackage1;
    import java.util.*;
    public class DD
    private  int P;
    private  int C;
    private int weight;
    public void set_p(int P1)
    P=P1;
    public void set_c(int C1)
    C=C1;
    public void set_weight(int W1)
    weight=W1;
    public int get_p()
    return P;
    public int get_c()
    return C;
    public int get_x()
    return weight;
    public static void main(String args[])
    ArrayList a=new ArrayList();
    ArrayList min_weights_int=new ArrayList();
    ArrayList rows=new ArrayList();
    ArrayList temp=new ArrayList();
    Hashtable h=new Hashtable();
    String v;
    int o=0;
    DD[] d=new DD[5];
    for(int i=0;i<4;i++)
    d=new DD();
    for(int i=0;i<4;i++)
    d[i].set_p(((int)(StrictMath.random()*10 + 1)));
    d[i].set_c((int)(StrictMath.random()*10 + 1));
    d[i].set_weight(0);
    System.out.println("Producers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_p());
    System.out.println("Consumers");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_c());
    System.out.println("Weights");
    for(int i=0;i<4;i++)
    System.out.println(d[i].get_x());
    for(int i=0;i<4;i++ )
    int bi =d[i].get_c();
    ArrayList row=new ArrayList();
    for(int j=0;j<4;j++)
    if( d[j].get_p() >=bi)
    d[j].set_weight((int)(StrictMath.random()*10 + 1));
    row.add("(" + bi + "," + d[j].get_p() + "," +d[j].get_x() + ")");
    else
    d[j].set_weight(0);
    row.add("null");
    rows.add(row);
    System.out.println(rows);
    int f=0;
    for(Iterator p=rows.iterator();p.hasNext();)
    temp=(ArrayList)p.next();
    String S="S" +f;
    h.put(S,temp);
    String tt=new String();
    for(int j=0;j<4;j++)
    if(temp.get(j).toString() !="null")
    // System.out.println("In if loop");
    //System.out.println(temp.get(j).toString());
    String l=temp.get(j).toString();
    System.out.println(l);
    //System.out.println("Comma matches" + l.lastIndexOf(","));
    //System.out.println(min_weights);
    f++;
    for(Enumeration e=h.keys();e.hasMoreElements();)
    //System.out.println("I am here");
    int ii=0;
    int smallest=0;
    String key=(String)e.nextElement();
    System.out.println("key=" + key);
    temp=(ArrayList)h.get(key);
    System.out.println("Array List" + temp);
    for( int j=0;j<4;j++)
    String l=(temp.get(j).toString());
    if(l!="null")
    System.out.println("l=" +l);
    [\code]

    In your example you selected the pair with the greatest
    distance from the first set, and the pair with the least
    distance from the second. I don't see how the distance
    function was used.
    Also it's not clear to me that there is always a solution,
    and, if there is, whether consistently choosing the
    furthest or the closest pairs will always work.
    The most obvious approach is to systematically try
    all possibilities until the answer is reached, or there
    are no possibilities left. This means backtracking whenever
    a point is reached where you cannot continue. In this case
    backtrack one step and try another possibility at this
    step. After all possible choices of the previous step,
    backtrack one more step and so on.
    This seems rather involved, and it probably is.
    Interestingly, if you know Prolog, it is ridiculously
    easy because Prolog does all the backtracking for you.
    In Java, you can implement the algorithm in much the same
    way as Prolog implementations do it--keep a list of all the
    choice points and work through them until success or there
    are none left.
    If you do know Prolog, you could generate lots of random
    problems and see if there is always a solution.

  • Ipod problem NEED HELP ASAP

    Hello guys,my ipod touch has battery problems and internal speaker are not working and will apple replace me a new one,i even have 1 year warranty and i want a new ipod touch white instead of black<<<plz plz plz reply ASAP plz really need HELP!THANK YOU

    If you iPod is defective, in warranty and not abused Apple will replace it with a refurbished one.  They may or may not replace it with the white one.  You will have to ask.
    Other users have asked the same question but I hav never heard them come back with whether or not they go the color changed.

  • Another Infinite Login Loop Problem - need help badly

    Hello. I need help.
    When I start up my iMac (24 inch last generation model) I can't log into the OS. When I enter my password I see the default OS wallpaper (nothing else) then it kicks me to a blue screen then right back to the login. Same thing over and over. I've already ran disk utility off of the install CD to repair permissions, etc... but no luck. This even happens when I enter into safe mode. I'm running the latest version of the OS.
    Can anyone help me?

    Restore the bootable backup/clone or Time Machine backup. Without one, you have a difficult situation. First thing to try is boot with your install disc, run Disk Utility, and repair the disk.

  • Ipod nano Problems need help fast!!!!!!

    I got my nano in october everything was working fine.Until 2 weeks ago my ipod wasnt getting reconized by itunes.Im really getting frustrated and i need help.

    Welcome to Apple Discussions!
    Read through this...
    http://docs.info.apple.com/article.html?artnum=61711
    btabz

  • Urgent Problem, need help asap.

    Hello everyone,
    I'm sorry for the alarmist title, but I need help and I need it badly. Just last night, my macbook froze with nothing working. The mouse froze, the interrupt keys didn't work, nothing. I shut down the laptop, and tried to restart. I noticed a clicking sound coming from the lower left hand corner of the macbook. I'm assuming this is the hard drive.
    What happens is that there will be two clicks happening in a rythmic fashion, and after 15 second of booting up, a folder will appear with a question mark on the screen. The only thing I can do is power it down. Can someone please describe what is happening and make suggestions?
    The kicker is that I'm a college student studying in Denmark for the semester. The laptop is my only lifeline to back home. Please, any help is greatly appreciated.
    Matt

    You may have a disk failure or simply corrupted files. If you have a bootable backup that is working, then you can boot from it, erase your hard drive, then restore your backup. If not then do this:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger, and 4.1 for Leopard) and/or TechTool Pro (4.6.1 for Leopard) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    If the drive is OK then you can reinstall OS X:
    How to Perform an Archive and Install
    An Archive and Install will NOT erase your hard drive, but you must have sufficient free space for a second OS X installation which could be from 3-9 GBs depending upon the version of OS X and selected installation options. The free space requirement is over and above normal free space requirements which should be at least 6-10 GBs. Read all the linked references carefully before proceeding.
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • C6-00 email account problems, need help please..

    Hi all. First of all, I don't experience any issues with the email accounts as referred to in other posts here. I do however have one problem and would appreciate if someone could explain a work-around for the issue. I'm desperately trying to set up a Gmail account using IMAP protocol but that allows me to access all advanced settings and not the ones pre-defined by the Nokia software. I'm basically wanting to have the same control I have over non pre-configured email provider accounts, download limits in KB, constantly connected when i have the mailbox open, choosing what folders to sync or not, etc.
    I did manage to have a Gmail account configured this way by mistake. When i set up the account it gave an error informing me of that i could try to continue with "alternative settings without the Nokia personalization" sort of (don't remember really the message) and after accepting to continue the account was created with "standard IMAP" settings.
    I'm however unable to re-create the event and simply cannot create a Gmail account with those settings. Even tried to set up another existing account and then edit definitions to Gmail but the personalized settings are always taking priority.
    Any advises please? Thanks alot in advance and best regards!
    Fredrik
    P.s. Sorry for double post. Mozilla Firefox messed up my 1st post

    Same problem here, but with error -2096. Can connect fine on same network with an iPod Touch and a Macbbook, but the Mac Mini that normally connects to iTunes just won't connect. Not using multiple accounts, uninstalled iTunes 8, reinstalled 7 - no joy. Uninstalled 7 reinstalled 8, no joy. Updated 8 to 8.01, no joy. Tried putting the Mini into a DMZ on the router, still no good. Sent an email to Apple support who will needless to say tell me to reinstall iTunes 8......
    Not working for me as of 10/10/08.

  • Having problem receiving email.  Need help to troubleshoot.

    I am now not able to receive email with Apple Mail - sending is OK. Switched to Postbox and now with Postbox I can't send, but can receive.  Service provided by Comcast.
    Suggestions?

    There seem to be a lot of problems with COMCAST lately.
    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

Maybe you are looking for

  • Stock determination in Batch determination.

    Hi Freinds, Scenario is as follows: Batch determination is already active with FIFO logic. There are 2 types of stock ( Own unrestricted and consignment)with batches in same storage location. If I maintain stock determination rule as 'consignment' in

  • Handling Issues in Oracle

    Hi Experts, It seems that there is lot of issues in my ORACLE Server stating ORA-00054: resource busy and acquire with NOWAIT specified I guess this happens when transactions is not committed from front end (PHP), So i just need to query what are the

  • How to find table & fields of standard InfoObject?

    Hi How to find table & fields of standard InfoObject for creating generic DataSource? e.g. I want to know the table & field of 0MAINTPOS infoObject.

  • Add ordered quantity to delivery note idoc desadv01 with user exit

    Hi, I am using the IDOC DESADV01 to output electronic delivery info when a user PGIs on a delivery note. The problem is I need some extra data like the original order qty, this exists in field VBAP-KWMENG So I think I would need to extend the idoc an

  • Function Does Not Return any value .

    Hi , I am wrtting the below funtion without using any cursor to return any message if the value enters by parameters does not match with the value reterived by the function select statement or it does not reterive any value that for the parameters en