I can't send mail to the site that required Authenticator

How can I send mail to the smtp site that required Authenticator,If th smtp site doesn't require Authenticator ,I can send mail.
My program:
Properties props=new Properties();
props.put("smtp","smtp.163.com");
props.put("auth","true");
MailUser mu=new MailUser("username","password");
javax.mail.Session session=javax.mail.Session.getDefaultInstance(props,mu);
public class MailUser extends Authenticator
String username;
String password;
public MailUser(String us,String ps)
this.username=us;
this.password=ps;
}

Properties props = System.getProperties();
props.put("mail.smtp.host", "hiart.co.kr");
props.put("mail.smtp.auth","true");//auth module....
session = Session.getDefaultInstance(props,null);
          Date date = new Date();
msg = new MimeMessage(session);
          System.out.println(from);
msg.setFrom(new InternetAddress(from+"@hiart.co.kr"));

Similar Messages

  • I'm trying to log into my site that requires authentication but I get a popup that says it doesn't require authentication and then I get a 403

    I have a site that requires authentication. In the past i have logged in using firefox with the following format
    http://username:password@sitename:siteport/specificsiteurlinfo
    and gotten in just fine. I just set up a new computer with a new instance of firefox and try the same thing but I now get the following popup-
    "You are about to log in to the site "sitename" with the username "username", but the website does not require authentication. This may be an attempt to trick you.
    Is "sitename" the site you want to visit?"
    When I click "yes" Firefox appears to try to go to the site without any authentication and I of course get a 403 Forbidden error.
    I have tried reverting back to old versions of Firefox with no luck.
    Any advice would be greatly appreciated.
    Thank you.

    The purpose of that warning is to alert you to the possibility of being fooled by a link with login credentials at the beginning. On your old computer you might have tweaked this setting to limit when the warning appears:
    http://kb.mozillazine.org/Network.http.phishy-userpass-length
    This article discusses the steps to adjust that setting to fit your needs: [http://fix.lazyjeff.com/2011/04/disable-firefox-login-prompt.html].

  • For some reason yesterday and today I can not send mail using the icloud website and help?

    From some reason I can not send emails using the icloud website.  Not sure why any help

    Hi there tamarafromdarien,
    You may find the troubleshooting steps for iCloud Mail in the article below helpful.
    iCloud: Troubleshooting iCloud Mail
    If you can't send mail in OS X Mail
    If you receive this alert or a similar alert when sending a message from your iCloud email address in OS X Mail:
    “This message could not be delivered and will remain in your Outbox until it can be delivered. The reason for the failure is: An error occurred while delivering this message via the smtp server: server name.”
    In OS X Mail, choose Preferences from the Mail menu.
    Click Accounts in the Preferences window.
    Select your iCloud account from the list of accounts.
    Click the Account Information tab.
    Choose your iCloud account from the Outgoing Mail Server (SMTP) pop-up menu. Example: “Derrick Parker (iCloud)”.
    Note: The Outgoing Mail Server (SMTP) menu also includes an Edit SMTP Server List command. If you choose this command, be aware that the iCloud SMTP server won't be among the servers that can be edited. This is normal.
    If you're attaching a large file
    Message attachments can't exceed the maximum size allowed by your email service provider or the recipient's email service provider. The maximum size varies by service provider. Try compressing the filebefore sending it, or send your message without the attachment to verify that there are no issues with sending.
    -Griff W.  

  • How can i send mail to the yahoo mail or gmail or something else

    hello guys,
    i want to know how to send mails to the yahoo or gmail or something else.i heard that we have to change some smtp address and some port number. can any body suggest me to get that.please help me
    any replies will be appreciated greatly.

    Hi chnaresh,
    This is the code I use to send mail, it's not specific to gmail, but it works. The "props" object expects the usual mail properties, "mail.smtp.host", "mail.user" or "mail.smtp.user", as well as "mail.smtp.ssl" which you'd want to set to "true" if you're using gmail. It also expects "mail.smtp.passwd" or "mail.passwd" which my gut tells me is unsafe, but I'm not sure why.
    Good luck,
    radikal_3dward
    public static int sendMail(final Properties props, String subject, String body, String to, String cc, String bcc, String from, File[] attachments, boolean toStdOut)
    throws javax.mail.internet.AddressException, javax.mail.MessagingException, javax.mail.NoSuchProviderException
    Session sess;
    //props.setProperty("mail.debug", "true");
    if(props.getProperty("mail.smtp.ssl") != null && props.getProperty("mail.smtp.ssl").equalsIgnoreCase("true"))
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "465");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.socketFactory.port", portStr);
    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");
    sess = Session.getDefaultInstance(props,
    new javax.mail.Authenticator()
    protected PasswordAuthentication getPasswordAuthentication()
    String userName = ((props.getProperty("mail.smtp.user") != null) ? props.getProperty("mail.smtp.user") : props.getProperty("mail.user"));
    String passwd = ((props.getProperty("mail.smtp.passwd") != null) ? props.getProperty("mail.smtp.passwd") : props.getProperty("mail.passwd"));
    if(userName == null || passwd == null)
    return null;
    return new PasswordAuthentication(userName , passwd);
    else
    String portStr = ((props.getProperty("mail.smtp.port") != null) ? (props.getProperty("mail.smtp.port")) : "25");
    sess = Session.getInstance(props, null);
    //sess.setDebug(true);
    MimeMessage mess = new MimeMessage(sess);
    mess.setSubject(subject);
    StringTokenizer toST = new StringTokenizer(to, ",;");
    while(toST.hasMoreTokens())
    Address addr = new InternetAddress(toST.nextToken());
    mess.addRecipient(Message.RecipientType.TO, addr);
    if(from != null)
    StringTokenizer fromST = new StringTokenizer(from, ",;");
    InternetAddress[] fromAddrs = new InternetAddress[fromST.countTokens()];
    for(int i = 0; fromST.hasMoreTokens(); i++)
    fromAddrs[i] = new InternetAddress(fromST.nextToken());
    mess.addFrom(fromAddrs);
    if(cc != null)
    StringTokenizer ccST = new StringTokenizer(cc, ",;");
    while(ccST.hasMoreTokens())
    Address addr = new InternetAddress(ccST.nextToken());
    mess.addRecipient(Message.RecipientType.CC, addr);
    if(bcc != null)
    StringTokenizer bccST = new StringTokenizer(bcc, ",;");
    while(bccST.hasMoreTokens())
    Address addr = new InternetAddress(bccST.nextToken());
    mess.addRecipient(Message.RecipientType.BCC, addr);
    BodyPart messageBodyPart = new MimeBodyPart();
    Multipart multipart = new MimeMultipart();
    if(body != null)
    messageBodyPart.setText(body);
    multipart.addBodyPart(messageBodyPart);
    if(attachments != null)
    for(int i = 0; i < attachments.length; i++)
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(attachments);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(attachments[i].getName());
    multipart.addBodyPart(messageBodyPart);
    mess.setContent(multipart);
    Address[] allRecips = mess.getAllRecipients();
    if(toStdOut)
    System.out.println("done.");
    //System.out.println("Sending message (\"" + mess.getSubject().substring(0,10) + "...\") to :");
    System.out.println("Sending message (\"" + mess.getSubject() + "...\") to :");
    for(int i = 0; i < allRecips.length; i++)
    System.out.print(allRecips[i] + ";");
    System.out.println("...");
    Transport.send(mess);
    if(toStdOut)
    System.out.println("done.");
    return 0;

  • Can't send mail since the ios 4 update.

    Since the update I have not been able to send mail from my iphone. (That is excluding my mobil me account which seems to be unaffected.) It keeps saying I need a password and to go to account settings to add an outgoing password. Of course, when I go to settings there is no where to enter an outgoing password for the accounts. Help!

    I am the same since since upgrading to iOS4. My account details are there, passwords included, but my hotmail and btinternet mail accounts will not send emails - says No Password Provided for the account. Very frustrating. My mobileMe accout works fine....

  • Mavericks mail can't send mail from the correct account

    I have 5 mail account(index 1,2,3,4,5) in my mail app.
    the default account is account 1.
    After I new a mail and change the sender account to another account(not default account), the mail receiver always receive this mail from my default account address. This appeared from one week ago.
    Thanks for any feedback.

    btw: all the 5 mail accounts are gmail accounts.
    for icloud or other accounts, it works well.

  • Can I send mail with an attachment that opens automatically?

    I want to be able to send emails that display a graphic when the mail is opened.
    I get mail all the time like this from Netflix, or Staples or other businesses.
    PowerBook G4 12"   Mac OS X (10.4.8)  

    You're describing HTML mail. mail.app doesn't support creation of html mail which means that you'll need to use a client like Thunderbird.
    Or you could create your html message in textedit or an html editor and save the file. Then open it in Safari, and click File, Mail contents of this page.
    However, since the way a message is displayed is controlled by the recipients email client you have no guarantee that it will look like the message you sent.
    For example, I have mail.app set to display plain text only and I only see the text of html message and the images are attachments.
    - Wayne
    PowerMac G5   Mac OS X (10.4.8)  

  • What can be sending info in the background that sounds like messaging?

    What can be running in the background that sounds like the Microsoft Paperclip looking Helper. I can't find anything obvious on Activity Monitor.

    What can be running in the background that sounds like the Microsoft Paperclip looking Helper. I can't find anything obvious on Activity Monitor.

  • How can i upload pictures to a site that requires adobe flash player

    I am trying to make a photo jewelry piece.  The site requires adobe flash player.  Is there a substitute for that I can use on my imac desktop?

    Adobe Flash Player will not run on iPads or iPhones, BUT it will run on iMacs, so go ahead and download and install it from the Adobe website.
    Hope this helps

  • How can I see content on web sites that require adobe flash player?

    We installed a web tv from our clinic but it requires adobe flash player, how can I see this stuff?

    Despite what has been said, there is no Flash player for iOS devices.
    http://www.apple.com/hotnews/thoughts-on-flash/
    There are some browsers like Skyfire that can play some Flash content, but performance varies so try different apps to see if any can display the sites you go to...but don't expect greatness.

  • Can't watch shows on a site that requires me to enable ads, but I have no ad-blocker..

    I have a VPN and I'm trying to watch my reg. shows on itv.com - they now require you to enable ads and disable/remove any ad-blockers you may have. Every time I try to watch my show now, I get the message stating I can't watch anything until it's disabled. The problem is, I don't have any ad-blockers on my computer/browser. I've searched, and there are none. I've tried enabling pop-ups, etc. for itv.com to no avail. Does anyone know what could be causing this issue? Is it something I can fix within the browser options (like it says I should be able to do)? Please help.

    Are you allowing third party cookies? Many sites now split their content over multiple servers on different domains, so you may need to allow cookies for those servers in addition to the cookies for the main site. This article describes how to find that setting: [[Websites say cookies are blocked - Unblock them]].
    It's also possible that a different extension, perhaps something related to privacy, is creating this issue. Could you try the site in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using
    Help > Restart with Add-ons Disabled
    In the dialog, click "Start in Safe Mode" (''not'' Reset)
    Any difference?

  • Why can't I connect to web sites that require my user name and password. window pops up saying this connection is untrusted.

    This Connection is Untrusted
    You have asked Firefox to connect
    securely to cards.chase.com, but we can't confirm that your connection is secure.
    Normally, when you try to connect securely,
    sites will present trusted identification to prove that you are
    going to the right place. However, this site's identity can't be verified
    What Should I Do?
    If you usually connect to
    this site without problems, this error could mean that someone is
    trying to impersonate the site, and you shouldn't continue.
    Technical Details
    cards.chase.com uses an invalid security certificate.
    The certificate will not be valid until 5/4/2010 5:00 PM.
    (Error code: sec_error_expired_certificate)
    I Understand the Risks

    Can you post links to pages that give that error?
    Did you try to remove cert8.db in the [[Profiles|Profile folder]] or tested with a new profile ?

  • I am trying to us a form on a site that requires authentication and it won't work with Muse

    I called the provider and they sent me a bunch of code to insert in order to make the form work but is there anyway I can make it work from within Muse? https://solutions.hostmysite.com/index.php?/Knowledgebase/Article/View/8460/0/using-pear-m ail-to-create-a-php-mail-form-that-uses-authenticationauthentication-is-required-by-hostmy site
    I have no idea how to deploy any of that stuff or how to do a captcha without using Muse. 
    The website is question is http://www.kiddintl.com/work-with-us.html
    Should I have the domain point to an adobe business catalyst site in order to make everything in Muse work correctly?
    [email protected]

    Hi Peter,
    In the latest release of Muse the option of recaptcha was added to both Bc and non Bc hosted site. Please check the link below to know more on this.
    http://helpx.adobe.com/muse/using/form-widgets.html#Preventing spam using Google reCAPTCHA
    I am afraid that this is not possible in Muse, to generate captcha for a site that is not hosted via Bc, at this stage, I will recommend that you post this on our ideas section over here, https://forums.adobe.com/community/muse/ideas, and let our devs team know of this requirement.
    In the meantime, you will need to insert the captcha code manually on the Muse form once after you have exported the html of the site and this is something that you will need to every time the code is generated because Muse will overwrite the changes that you have made.
    - Abhishek Maurya

  • Parsing Content From A Site That Requires Authentication

    Ive been scanning websites using the Java HTML parser from htmlparser.sourceforge.net to gather useful data into a more easily used format, in this case it is stored in a mySQL database.
    The problem that has stumped me for the past few days is how to get around the login authenication page required to access content from the website www.racingpost.com . I am a registered user but am having difficulty logging in via Java and managing the cookies to bypass the login page HTML I keep getting instead of the race data.
    I am unsure when and where I should be passing cookies around. Also logging in using POST is confusing me.
    Thanks for any help you can offer.

    this should help you out with posting to a URL. It is taken from:
    http://javaalmanac.com/egs/java.net/Post.html
    // e135. Sending a POST Request Using a URL
        try {
            // Construct data
            String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
            data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
            // Send data
            URL url = new URL("http://hostname:80/cgi");
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
            wr.write(data);
            wr.flush();
            // Get the response
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            while ((line = rd.readLine()) != null) {
                // Process line...
            wr.close();
            rd.close();
        } catch (Exception e) {
        }

  • How can i send mail from the mail same mail account on which it was forward to my gmail account?

    I have added many accounts in my Gmail account and i've selected "Reply from the same address the message was sent to" in Gmail option. So whenever i reply to any mail, it automatically sends from the account on which i had received the mail.
    How can i get the same configuration in Apple mail?

    In the 'new message' window click the three line option button to 'Customize…' the window.
    Enable the 'From field' & click OK to save the new field settings. If these accounts are setup in Mail you can now select them when replying or sending new mail.
    Also check the 'Mail > Composing tab' preferences. There is an option to 'Send from selected mailbox' that may help if Mail is setup with all of the relevant email accounts.
    Otherwise you may need to log in to gmail on the web & reply from there. Apple Mail cannot understand how gmail & forwarding from other accounts is setup so it cannot try to reply from another account that isn't setup on the Mac.

Maybe you are looking for

  • Have a look at my RFC call, it doesn't return anything

    Hi all, In my project, I create a RFC Model named 'SCO' which will call bapi function 'BAPI_SALESORDER_CREATEFROMDAT1', if successfully a SALEDOCUMENT should return. below is the code in my custom controller   public void wdDoInit()     //@@begin wdD

  • Using Formulas and Variables To Count Rows That Meet Certain Conditions

    I have a web intelligence report designed that shows results of shipments that arrived and departed in a given period and the mode of transport (air, ocean, motor).   I've tried building formulas to give me counts for example of the number of shipmen

  • I want to use Control-W and Control-T to close and open tabs in OS X

    On Windows, you can use Ctrl-W and Ctrl-T to close and open tabs. On OS X, you have to use Cmd-W and Cmd-T instead (this bothers me because it is asymmetric with using Ctrl-Tab and Shift-Ctrl-Tab to navigate between tabs). Ctrl-W and Ctrl-T don't see

  • Monitoring EPS of an event source?

    Hi, We have a requirement to generate proper alerts whenever the EPS value of an event source is over a predefined threshold fro a given period. After some search on API documents I saw there is no-data alert mechanism and also configuration for limi

  • Material serial number creation

    Hello, I have a scenario in setting up serial number for material. I am presently working on data migration from legacy system to SAP. Materials in legacy system has serial numbers assigned to it. I am migrating service contracts with service materia