Javamail + smtp/pop3 servers

Hi,
I run the demo in the javamail-1.2. it worked but there is no mail received.
I think the problem is with my smtp server.
my smtp was 1st smtp, the program runs but I have the message : invalid adresse receiver.(all addresses : yahoo, private...)
I changed it to surgemail wich is pop3 and smtp serevr mail. I have no error message but I didn't receive any mail.
how to solve this problem?
thank you for your time.

maybe you need to be using smtp-auth... there is an example with javamail.

Similar Messages

  • Yahoo mail service(SMTP & POP3) to browser

    I think Yahoo mail service(SMTP & POP3) is open only to browser. Is it possible to interact with Yahoo mail service thru URL Programming means thru URL programming to send retrive mail and attachment ? If so then how ? Plz help! It's urgent.
    Thanx & Regards,
    Chanchal

    Is it possible? Sure, it's possible, it's only software after all.
    Has someone already done it? Not that I know of.
    But then you already know that because you've already read
    this FAQ entry, right?
    http://java.sun.com/products/javamail/FAQ.html#webmail

  • How to bypass proxy when trying to send a mail using javamail smtp

    Hi,
    I am trying to make a servlet send a mail using javamail smtp protocol on port 25 but i m not able to send getting an exception, i suspect proxy is blocking, so any idea anyone how bypass a proxy.

    And if it does turn out that there's a proxy server blocking access to your target SMTP server, the best way to deal with that is to discuss the issue with the person responsible for your network configuration.

  • Different pop3 servers - different mailboxes in same account?!?

    When I change pop3 server in e-mail client it seems that e-mail client keeps separate mailboxes for each pop3 server, even though they are on the same account. So when you change pop3 server you can't access mail that was received on the previous pop3 server, instead new mailbox is created. To access old mail, you must change pop3 back to one previously defined (?!?).
    I would like to know is it possible to keep all mail on the account on the same place, that means if I change pop3 server in settings I want to see all mail that is received on that account on all pop3 servers and not only the one that is currently defined.
    And since my iPad now has 2 separate mailboxes on the same account for 2 different pop3 servers, is it possible to merge both mailboxes to be available at all times, no matter which pop3 server is defined in account?
    Thanks!

    Unfortunately, I would have to forward 2 GB of mail so that option cannot be used .
    When will IOS4 for iPad be available then?
    Thanks.

  • Whats SMTP/POP3  host server address in JavaMail

    Hello friends,
    I came to know that we could send mail through Java through JavaMail
    I downloaded some eg code ( for sending mail to some one )
    I downloaded the mail.jar and activation.jar (and put it in right palce where it was asked to)
    I am using java 1.6 SE
    what i could not understand is what is
    POP3 server
    SMTP server
    How / What to put server address in the code
    Please help me. Here is the below code
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.*;
    import java.util.Properties;
    public class MailClient
         public void sendMail(String mailServer, String from, String to,
                                 String subject, String messageBody,
                                 String[] attachments) throws
    MessagingException, AddressException
              // Setup mail server
             Properties props = System.getProperties();
             props.put("mail.smtp.host", mailServer);
             // Get a mail session
             Session session = Session.getDefaultInstance(props, null);
             // Define a new mail message
             Message message = new MimeMessage(session);
            /// System.out.println(" 1");
             message.setFrom(new InternetAddress(from));
             message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
             message.setSubject(subject);
             // Create a message part to represent the body text
             BodyPart messageBodyPart = new MimeBodyPart();
             messageBodyPart.setText(messageBody);
             //use a MimeMultipart as we need to handle the file attachments
             Multipart multipart = new MimeMultipart();
             //add the message body to the mime message
             multipart.addBodyPart(messageBodyPart);
             // add any file attachments to the message
             addAtachments(attachments, multipart);
             // Put all message parts in the message
             message.setContent(multipart);
             // Send the message
             Transport.send(message);
         protected void addAtachments(String[] attachments, Multipart multipart)
                         throws MessagingException, AddressException
             for(int i = 0; i<= attachments.length -1; i++)
                 String filename = attachments;
    MimeBodyPart attachmentBodyPart = new MimeBodyPart();
    //use a JAF FileDataSource as it does MIME type detection
    DataSource source = new FileDataSource(filename);
    attachmentBodyPart.setDataHandler(new DataHandler(source));
    //assume that the filename you want to send is the same as the
    //actual file name - could alter this to remove the file path
    attachmentBodyPart.setFileName(filename);
    //add the attachment
    multipart.addBodyPart(attachmentBodyPart);
    public static void main(String[] args)
    try
         MailClient client = new MailClient();
    String server="pop3.mydomain.com";
    String from="[email protected]";
    String to = "[email protected]";
    String subject="Test";
    String message="Testing";
    String[] filenames =
    {"c:\\somefile.txt"};
    client.sendMail(server,from,to,subject,message,filenames);
    System.out.println(" Mail Has been sent");
    catch(Exception e)
    e.printStackTrace(System.out);
    } and the error i get after running this is
    javax.mail.MessagingException: Could not connect to SMTP host: pop3.mydomain.com, port: 25;
      nested exception is:
         java.net.ConnectException: Connection timed out: connect
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
         at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
         at javax.mail.Service.connect(Service.java:288)
         at javax.mail.Service.connect(Service.java:169)
         at javax.mail.Service.connect(Service.java:118)
         at javax.mail.Transport.send0(Transport.java:188)
         at javax.mail.Transport.send(Transport.java:118)
         at MailClient.sendMail(MailClient.java:39)
         at MailClient.main(MailClient.java:76)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
         at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
         ... 8 more
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I followed ur Advice
    I got another code which works perfecty as i wanted
    this uses Gmail SMTP
    Thanks
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class Main
        String  d_email = "[email protected]",
                d_password = "password",
                d_host = "smtp.gmail.com",
                d_port  = "465",
                m_to = "[email protected]",
                m_subject = "Testing",
                m_text = "Hey, this is the testing email.";
        public Main()
            Properties props = new Properties();
            props.put("mail.smtp.user", d_email);
            props.put("mail.smtp.host", d_host);
            props.put("mail.smtp.port", d_port);
            props.put("mail.smtp.starttls.enable","true");
            props.put("mail.smtp.auth", "true");
            //props.put("mail.smtp.debug", "true");
            props.put("mail.smtp.socketFactory.port", d_port);
            props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
            props.put("mail.smtp.socketFactory.fallback", "false");
            SecurityManager security = System.getSecurityManager();
            try
                Authenticator auth = new SMTPAuthenticator();
                Session session = Session.getInstance(props, auth);
                //session.setDebug(true);
                MimeMessage msg = new MimeMessage(session);
                msg.setText(m_text);
                msg.setSubject(m_subject);
                msg.setFrom(new InternetAddress(d_email));
                msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
                Transport.send(msg);
            catch (Exception mex)
                mex.printStackTrace();
        public static void main(String[] args)
            Main blah = new Main();
        private class SMTPAuthenticator extends javax.mail.Authenticator
            public PasswordAuthentication getPasswordAuthentication()
                return new PasswordAuthentication(d_email, d_password);
    }

  • Javamail - no pop3 provider

    Hello,
    i have a problem with the javamail-1.3.1 API within the Oracle 9i (9.2.0.3) on Linux.
    I would like to retrieve a POP3 account and process the incoming mails within a Java Stored Procedure.
    I uploaded the javamail classes (imap.jar, mailapi.jar, pop3.jar, smtp.jar and the acivation.jar) into my account with the loadjava tool ( -resolve). When i try now to connect to a pop3 account, i get the error:
    javax.mail.NoSuchProviderException: No provider for pop3
    On the terminal my function works properly, so i list the available javamail providers and notice that on the oracle 9i the pop3 provider is missing.
    my sourcecode fragment:
    Properties props = System.getProperties();
    Session session = Session.getDefaultInstance(props, null);
    Provider[] providers = session.getProviders();
    for (int z = 0; z < providers.length; z++)
    System.out.println (providers[z]);
    store = session.getStore("pop3"); // within the Oracle, i get here the above error
    terminal - provider list:
    javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsy stems, Inc]
    Oracle 9i - provider list:
    javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
    Microsystems, Inc]
    Where is my pop3 provider and how can register my pop3 mail provider within the oracle 9i ?
    best regards
    Adam Caban

    Good job coming up with the workaround, verpixelt! I guess it seems that Apple's philosophy is to make it 'even that much easier' to setup an email account on the iphone in iOS5, however, my legacy email account is not IMAP, and yet it tried to create an IMAP account, which wreaked havoc on my ability to use my email account on my iphone. Your solution of setting up the account with the wrong password gave me the ability to make the IMAP/POP choice which then allowed my email account to function normally on my iPhone 4S. Thanks. 
    Apple, - please put the IMAP/POP selection option back in for email account setup on the iPhone. Thank you.

  • JavaMail SMTP TLS attempt gives SSLHandshakeException on Domino mail server

    Javamail TLS smtp (port 25) delivery attempts results in SSLHandshakeException on Domino mail server.
    They are however successful on SendMail and Exchange servers.
    Privately signed certificates from all three had been added to the keystore.
    Thunderbird client is able to send TLS mail successfully through the Domino Server. Additionally the MD5 hash of the cert on IE prompt during Thunderbird delivery matches against the Domino's cert already in keystore.
    JavaMail's smtp debug hangs at :
    250 Ready to start TLS
    EHLO [client name]
    Appreciate any feedback..

    OK, I think I've found a clue.
    When 10.6 server was released, there was an Apple article to fix some log messages that were occurring. Here is an excerpt:
    *The Mail Server mail.log may contain encryption warnings after upgrading to Mac OS X Server v10.6.
    *For example, warnings such as these may appear in the mail.log:
    * warning: no entropy source specified with parameter tlsrandomsource
    * warning: encryption keys etc. may be predictable
    *For improved encryption in Mac OS X Server v10.6, and to avoid this issue, open Terminal and execute this *command:
    *sudo postconf -e tlsrandomsource=/dev/urandom
    I've found that if you comment out this line in main.cf:
    tlsrandomsource = /dev/urandom (at the very end of the file for me)
    then TLS will start up OK. It will display the warning messages in the apple article above, but it starts up and handles TLS !!
    Next step is to figure out what broke in the random source and fix the encryption warnings. Anyone want to take a stab at this?

  • Migrating exchange 2003 to 2010 while everyone is running SMTP, POP3 and IMAP on the old exchange 2003

    Hi all
    We have a legacy Exchange 2003 running with more than 800 users and with a very mixed configuration for client access. Most of users are running POP3/SMTP on the Exchange, some are running IMAP/SMTP and some are running MAPI access. 
    Please note that THERE IS NO WAY that we move all users to MAPI access before the installation (due to deadlines).
    We plan to install a new Exchange 2010, starting with a CAS/HUB server. We do not need to migrate users automatically, and we can proceed later to move them individually to the new Exchange 2010 infrastructure in a non-transparent way. 
    More importantly, we need to maintain that everyone receives their e-mail and all communication through the exchange 2003 continues uninterrupted. 
    My question is can we install the new CAS/HUB server, while maintaining the old exchange server running with it's old name and create new names for the CAS/HUB server. In such a configuration, will all the Exchange 2003 services continue to run as usual
    (POP3/IMAP/SMTP/MAPI)?

    In addition, you may also spend some times at below mentioned helpful resources to check the prerequisites before moving all mailboxes from exchange 2003 to 2010 :
    http://exchangeserverpro.com/wp-content/uploads/2011/02/Exchange-Server-2003-to-2010-Migration-Guide-V1.3-Planning-Chapter.pdf
    http://technet.microsoft.com/en-us/library/dd638130(v=exchg.141).aspx
    https://www.simple-talk.com/sysadmin/exchange/upgrade-exchange-2003-to-exchange-2010/
    Moreover, to avoid any interruption  during the completion of migration process, you can also take a look at this application(http://www.exchangemigrationtool.com/) that could be a good alternate approach
    for you.

  • Javamail smtp.host value for gmail

    my email account created on gmail.
    i want to create mailing site.
    now i got some error massage
    "Unknown SMTP host: smtp.gmail.com:465"
    Please tell me what is the smtp.host value for gmail

    Don't put the port number in the host name.
    See the JavaMail FAQ for how to connect to gmail.

  • Duplicate Outgoing SMTP Mail Servers

    I've had some difficulty figuring out how to best use email on my iPhone. I've settled on using my Gmail account, but am not quite sure how I want it to work in conjunction with the Mail app on my MacBook.
    In the process of trying different options, I have installed and uninstalled Gmail a few times, and as a consequence, I now have several copies of identical "smtp.gmail.com" outgoing servers. I must be missing something simple, but I cannot find a way to delete them.
    Can anyone enlighten me?
    Thanks,
    -RB

    Thanks Mulder
    There is another tiny twist which I haven't mentioned. BT broadband accounts can only take 10 email addreses (per account). So for example account 1 is called [email protected] and hosts email addresses 1-10. If you want 11-20 addresses you have to open a sub-account, which has a new name... say [email protected] All 20 accounts are set up as accounts in my Mac Mail, but half of them I want to send via [email protected], and the other half via [email protected]
    The problem is that there doesn't seem to be any way of doing this as both one and two are actually hosted on the same server (with just one name) and changing one of the outgoing mail server User Names (e.g. [email protected]) and associated Password seems to change all 20?
    Waddyboy

  • ACE Probes for authentication to imaps, smpts or pop3s servers

    Dear all,
    we have the demand to do health checks using authentication for servers running SSL-encrypted services like imaps, smpts or pop3s. Has someone implemented tcl scripts for that ? Unfortunately the "SSL_PROBE_SCRIPT" provided by Cisco does only do a "Client Hello". Maybe it is possible to enhance that script in order to test authentication ?
    Thank you very much in advance.
    Bernd

    Dear Gilles,
    thank you very much for your reply. This answers my question.
    But ... I would like to turn this into a feature request, because I believe this demand is not that much out of common. There already is a https probe which works in a similar way, so it should be easy for Cisco to add probes for common ssl-encrypting protocols or - even better - add a generic ssl probe.
    Best regards,
    Bernd

  • Will Verizon Online ever offer SMTPS & POP3S (TLS/SSL) for message submission/retrieval?

    Login in with credentials (login name and password) in clear text (POP3) or even base64 encoded (SMTP) is not secure.
    Yup, that's right, every time your POP3 client checks for new mail you are sending your user name and password over the network and/or internet in clear plain readable text.
    Sending email via your SMTP client is not much better. Probably base64 encoded which is quick and easy to decode to plain readable text.
    Verizon, Please provide us with SMTPS and POP3S capability.
    Comast, I hear/read have done this for years. Why not Verizon?
    If you are the original poster (OP) and your issue is solved, please remember to click the "Solution?" button so that others can more easily find it. If anyone has been helpful to you, please show your appreciation by clicking the "Kudos" button.

    tzomatz wrote:
    srckurs.no have two email accounts. Both working fine, and I can send and recve mail between them, and the outside.
    However, for the tholden.no domain, reciving of emails does not work. I can send them though.
    What can be the problem?
    virtual_mailbox_domains = srckurs.no
    But tholden.no is not configured (except in hostname which is for local @aurora.tholden.no users).

  • SMTP & POP3 ports

    Ports Change
    Is it advisable and/or best practise to change the default pop3 and smtp ports on our exchage 2013 deployment.
    we will be coexisting with our existing Exchange 2007 server for now.
    if its best to change ports kindly advise on how to do this?

    pop3 is for downloading mail, this port you can manually change. You can set a rule in your firewall outside port 111 -> inside port 110 to your server. Users from outside are connecting to port 111 and the firewall connect this user to port 110 of your
    exchange server.
    Port 25 for exchange is not recommended to change... maybe
    this help you.

  • Problem with configuration Internet SMTP/POP3 Server profile in Siebel

    I cannot recieve in siebel mail from mail server.
    First problem is my mail server using IMAP protocol instead POP3
    Is the config in profile the same as POP3 but using another port (143 for IMAP)?
    Second security of mail server wants to Check authenticity of the user - how it configure in profile in siebel?

    The information is found in "Siebel Maintenance Release Guide Version 8.0.0.x". You need access to My Oracle Support (Metalink 3)
    to get to that information.
    Search for "ACR 374"
    Axel

  • Use messaging multiplexor to redirect to non-sun imap/pop3 servers?

    Can the Messaging Multiplexor be used to redirect an IMAP/POP user to a non-Sun messaging server? For example, could we use the multiplexor to establish a single server name for IMAP/POP3 clients, but have the multiplexor redirect specific users to an MS Exchange back-end over IMAP/POP3? We will have identical usernames and passwords on the Sun Directory Server and in Active Directory.
    Thanks much!
    Craig

    It can be done. You will need to "provision" all your users in LDAP, just as you would for Messaging Server. Put the Exchange box in as "mailhost".
    Then, you will need to have MMP know what commands Exchange offers, so you can restrict MMP to showing just that subset of the protocol. Check the MMP doc for how to do that.

Maybe you are looking for

  • 17" monitor for Mac Mini

    I'd been thinking of getting a Mac Mini with a 20" wide screen, but after using a 20" iMac, I found that I didn't really like using a screen that big, possibly because of a damaged vertebra in my neck. I'm still intending to buy a Mac Mini, but now m

  • SQL Drill through??

    I am new to the Essbase world. We have a few business requirements that requires us to report on a flat measure (it does not make sense to be a part of the cube as it can not be aggregated across dimensions) along with other measures from the cube. W

  • Class file/memory mismatch

    I ma trying to compile a source code in 64 bit Solaris. The same code works fine with 32 bit but on 64bit it shows the following error - ld: elf error: file /usr/users/PLAT/cltxm25/atm/generic_archive-smdxp83/generic_archive/tlvcreation.a(keyfields_p

  • Retrieve data from broken harddrive

    Hi, I want to ask. Last friday, my harddrive has broken for unknown reason. I knew it has broken from information I got in PC Hardware Diagnostics UEFI. The harddrive failed on Extensive Test and Long DST test (Error code : Q8FETV-77C7GA-MPFX0J-61DJ0

  • Blank subtotals

    This seems to come up once in a while. I have a view which has both number and Date types. When I subtotal any of the numbers, it works fine. Ditto the dates (or more correctly, a calculation that is the difference between two Date types). But if I t