Authentication on a socket

Hi,
I'm using a socket to connect to an SMTP server in order to send mail. However, I have to be able to authenticate on that socket. How would I be able to state my user name and password when opening the connection to the socket?
try { // Open port to server
  System.getProperties().put("mail.host", "HOST");
  m_sHostName = System.getProperty("mail.host");
  smtpSocket = new Socket(m_sHostName, m_iPort);
  dos = new DataOutputStream(smtpSocket.getOutputStream());
  dis = new DataInputStream(smtpSocket.getInputStream());
  if(smtpSocket != null && os != null && is != null)
  { // Connection was made.  Socket is ready for use.
     System.out.println("CONNECTION MADE");
catch(Exception e) {
System.out.println("Host " + m_sHostName + " unknown");
}

After you have connected, your program converses with the server program according to the RFC822 protocol (and probably other SMTP-related protocols). Authentication is part of that protocol, so just read the document.
Alternatively, use the JavaMail package that encapsulates all of that for you.

Similar Messages

  • Form Based Authentication in SQL Server 2012

    Hi Everyone,
    Please can anyone provide me the document or the link which explain step by step procedure for configuring FBA on MS SQL Server 2012 SP1.
    If let's say I have FBA enabled ASP.NET application, can I use same user database for SQL Server FBA configuration or not? and can I integrate the report in this application.
    Any help would be appreciated. 
    Thanks
    Swapnil

    Hi Swapnil,
    Reporting Services provides an extensible architecture that allows us to plug in custom or forms-based authentication modules. Forms Authentication is a type of ASP.NET authentication in which an unauthenticated user is directed to an HTML form. Reporting
    Services can be extended to support Forms Authentication using the security extensibility interfaces available through the Reporting Services API. If you extend Reporting Services to use Forms Authentication, use Secure Sockets Layer (SSL) for all communications
    with the report server to prevent malicious users from gaining access to another user's cookie.
    For more information about Forms Authentication in Reporting Services, please see:
    Configure Custom or Forms Authentication on the Report Server
    Authentication in Reporting Services
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I can no longer get my emails. Mail says that I have used an incorrect user name or P/W

    How do I get  my emails back?
    the problem started when I tried to download a Gumtree app using Google. As my grandaughter  had her name and P/w on the sign in window  I used choose another user. Inthe end I changed my Google P/W the App didn,t download and I lost my sign in for gmail.
    i Am using an iPad Air which I bought last year.
    iI went back and tried to download again to see if Icould find the problem. I also did a reboot but no luck.
    i Enclose email settings
    Check Email Settings
    Incoming Mail Server
    Account Type:IMAP
    Username:nellcor99
    Server hostname:imap.gmail.com
    Server port:993
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Outgoing Mail Server
    Username:nellcor99
    Server hostname:smtp.gmail.com
    Server port:587
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Note: Your email address will be used to provide your Mail settings. Apple may collect and use your domain address (i.e. yahoo.com, gmail.com, etc.) for purposes of improving our products and services. Otherwise, your full email address will not be stored and will not be used by Apple or shared with any other entities.
    https://www.apple.com/
    Support
    Shop the Apple Online Store (1-800-MY-APPLE), visit an Apple Retail Store, or find a reseller.
    Apple Info
    Site Map
    Hot News
    RSS Feeds
    Contact Us
    Copyright © 2015 Apple Inc. All rights reserved.
    Terms of Use
    Updated Privacy Policy
    Use of Cookies

    Delete your Gmail account from the Mail/Contacts/Calendars settings page, and then add it back in using the new Gmail password.
    Matt

  • Not receiving emails on default Apple mail program

    Hi all,
    I'm on a late 2011 MacBook Pro running OS X 10.8.5.  (yes, I will be upgrading to Yosemite soon - just need to back up my stuff)
    My email was working fine, then all of a sudden it just stopped receiving emails.  I'm trying to connect to Yahoo and I've configured the various settings to the suggested ones per a link from Apple https://www.apple.com/support/mail-settings-lookup/ (settings listed below)
    What's strange is that i can SEND emails, I just can't receive them.  I've plugged the settings again and again and nothing seems to work.  Please help.   Below are some screenshots.  Thanks!
    Incoming Mail Server
    Account Type:IMAP
    Server hostname:imap.mail.yahoo.com
    Server port:993
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Outgoing Mail Server
    Server hostname:smtp.mail.yahoo.com
    Server port:465
    Authentication:Password
    Secure Sockets Layer (SSL):Yes

    Hello tri,
    Thanks for using Apple Support Communities.
    In order to resolve this issue where you're unable to send email, even though the Mail Connection Doctor is showing green dots, please follow the steps in the article linked to below.
    OS X Mail: Troubleshooting sending and receiving email messages - Apple Support
    Take care,
    Alex H.

  • RD web access 3 passwords to connect

    I am setting up a new remote desktop access gateway to allow users to connect to their local desktops. I have it working but it requires 3 logins to connect. 1 for the web access, 2. for the RD gateway and then to the PC. Is there a way to streamline that
    down to one or two password prompts?
    -Ben

    Hi Ben,
    Thank you for posting in Windows Server Forum.
    Initially suggest you to update RDP 8.1 which will work better for this scenario.
    Yes, there is a way to reduce the number of password prompt, here you need to enable RD Web Access Single Sign-On (SSO), where the password will be saved and need to enter the credential for single time. 
    There are certain requirements for this feature, as follow.
    • To take advantage of the new Web SSO feature, the client must be running Remote Desktop Connection (RDC) 7.0. 
    • In order for Web SSO to work:
    1. The connection in RemoteApp and Desktop Connections must have an ID. By default, it is set to the Fully Qualified Domain Name (FQDN) of the RD Connection Broker server in case of RD Connection Broker mode. In RD Session mode, it is set to the FQDN of the
    RD Web Access server.
    2. RemoteApp programs must be digitally signed using a Server Authentication certificate [Secure Sockets Layer (SSL) certificate]. The certificate Enhanced Key Usage section must contain ‘Server Authentication (1.3.6.1.5.5.7.3.1)’. More details about the types
    of certificates used to digitally sign RemoteApp programs can be found here.
    3. Client operating systems must trust the certificate with which the RemoteApp programs are signed.
    More information.
    Introducing Web Single Sign-On for RemoteApp and Desktop Connections
    http://blogs.msdn.com/b/rds/archive/2009/08/11/introducing-web-single-sign-on-for-remoteapp-and-desktop-connections.aspx
    Remote Desktop Web Access single sign-on now easier to enable in Windows Server 2012
    http://blogs.msdn.com/b/rds/archive/2012/06/25/remote-desktop-web-access-single-sign-on-now-easier-to-enable-in-windows-server-2012.aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support

  • RDP SSO?

    I need a little information regarding SSO in use with Remote Desktop services.
    In searching for RD Services SSO I get these articles about getting the RDWeb SSO and using SSO with RemoteApp. But there is never any mention of RDP itself.
    My people want to be able to load up MSTSC or an .rdp file, put in the server address and connect via RDP with no prompt for credentials.  I am not seeing anything on the web on how to do this.
    We are running Windows 2012 R2 RDS.

    Hi Thomas,
    Thank you for posting in Windows Server Forum.
    To take advantage of the new Web SSO feature, the client must be running Remote Desktop Connection (RDC) 8.1 for better feature and functionality.
    In order for Web SSO to work:
    a. The connection in RemoteApp and Desktop Connections must have an ID. By default, it is set to the Fully Qualified Domain Name (FQDN) of the RD Connection Broker server in case of RD Connection Broker mode. In RD Session mode, it is set to the FQDN of
    the RD Web Access server.
    b. RemoteApp programs must be digitally signed using a Server Authentication certificate [Secure Sockets Layer (SSL) certificate]. The certificate Enhanced Key Usage section must contain ‘Server Authentication (1.3.6.1.5.5.7.3.1)’. More details about the
    types of certificates used to digitally sign RemoteApp programs can be found here.
    c. Client operating systems must trust the certificate with which the RemoteApp programs are signed.
    In addition, need to add the server name under GPO setting “Allow delegating default credentials”. Please check
    this article
    for information. For mstsc to run without credential prompt, we can also edit the rdp file “PromptCredentialOnce:i:0” and see the result. 
    For more information you can refer below article.
    Step by Step Customizing RD Web Access 2012 R2 – Part 1
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • SQL Server in Cloud

    Hi
    We have an sql server in cloud and two app servers which connect to an application in the sql server using ODBC.  The operations take long time to execute.  The same save sequence which takes 11 seconds in the SQL server (when working in the SQL
    server itself) takes 50 seconds when running from application server.
    We are using remote desktop to connect to the app server and the sql servers
    The sql server is 2008 R2
    Thanks for all the help
    Regards
    Biju

    Hi,
    According to your description, did you mean that you have created a SQL server and two App servers on Windows azure VMs? If yes, sorry to say that it's not the correct forum for troubleshooting this kind of issue and I will move it to Windows
    Azure Virtual Machine forum.
    In addition, to connect to SQL Azure, an ODBC driver must support SQL Server Authentication and Secure Sockets Layer encryption. That is to say the SQL server will perform authentication, maybe it would waste some time during the authentication process.
    Best regards,
    Susie

  • Minimum services to run remote desktop web connection?

    While I recognize that installing anything to do with terminal services or RDS on a domain controller is not recommended it is my only choice for a very small business that I'm helping out. They have Server 2008 R2 and all they want to be able to do is
    have a couple of people remote in to their own computers when out of the office. What services are the simplest way to accomplish this? I can't find an answer to something this minimalist anywhere.

    Hi Jim,
    For your issue regarding double prompt, suggest you to enable RD Web SSO for your case; where we need to enter username and password once. In order for Web SSO to work:
    a. The connection in RemoteApp and Desktop Connections must have an ID. By default, it is set to the Fully Qualified Domain Name (FQDN) of the RD Connection Broker server in case of RD Connection Broker mode. In RD Session mode, it is set to the FQDN of
    the RD Web Access server.
    b. RemoteApp programs must be digitally signed using a Server Authentication certificate [Secure Sockets Layer (SSL) certificate]. 
    c. Client operating systems must trust the certificate with which the RemoteApp programs are signed.
    You can refer the following article for information.
    Introducing Web Single Sign-On for RemoteApp and Desktop Connections
    http://blogs.msdn.com/b/rds/archive/2009/08/11/introducing-web-single-sign-on-for-remoteapp-and-desktop-connections.aspx
    In regards to your error, we need to have required port open to make successful connection. Need to bind port 443 for RD Web and RD Gateway successful connection. Also need to have proper certificate.
    Addition something might have happened to your IIS settings and more specifically to your Default Application pool. For example if you install some third-party web application, it may have changed the 32/64 bit feature on your Application pool. So please check
    below points.
    1) Go to IIS -> Application Pools -> DefaultAppPool -> Advanced Settings -> Enalbe 32-Bit Application - > if it's True , change it to False
    2) Check other relevant application pools for the same setting - > SBS Web Workplace AppPool or SBS Web Applications application pool
    All of the pools should run with Enable 32-Bit - False
    More information.
    This computer can't connect to the remote computer because the Terminal Services Gateway server is temporarily unavailable
    https://support.microsoft.com/en-us/kb/969743
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected].

  • Plz help me with plugin idea

    I want to develop a plugin.
    First of all i want to know that an exe file can be a plugin or not?
    I want to allow the end user's browser to detect the particular exe installed or running and if not prompt the user to download it from my server.
    Can i do that.
    Plz help

    Then what i need to do?
    I have a client program that dynamically authenticates itself with Authentication server -- using socket connection..
    Do i have to use applets.
    or plugin technology.
    I m stuck

  • Mail can't connect to account "live"

    Hi,
    I recently have been getting trouble with Mac Mail.
    After setting up my outlook email with these settings, i still can't use my hotmail (it stays offline) :
    Incoming Mail Server
    Account Type:IMAP
    Username
    Server hostname:imap-mail.outlook.***
    Server port:993
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Outgoing Mail Server
    Username: *****
    Server hostname:smtp-mail.outlook.***
    Server port:587
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Can anyone help me solve this problem?
    I am using a MacBook Pro (13-inch, Mid 2012)
    OS X Yosemite 10.10.2
    < Personal Information Edited By Host >

    Hello Surjanto1,
    Welcome to the Apple Support Communities! It looks like you are having issues with the email account setup on your MacBook Pro. Let’s see if we can troubleshoot this in an attempt to resolve the issue.
    I’ve verified your settings with our Mail Settings Lookup Tool and it looks like everything is correct. Since the issue persists, let’s try using the Connection Doctor as outlined in this article:
    OS X Mail: Troubleshooting sending and receiving email messages - Apple Support
    http://support.apple.com/en-us/TS3276
    Cheers,
    Matt M.

  • App remote problem

    Ive done all the things required like typing in the code and connecting e.t.c and have a full bar on my wi-fi but still cant connect to itunes using the remote app.
    All it keeps saying is 'looking for grahams library' and then it cant find it.
    ive been trying to fiddle around with firewalls but dont really have a clue what im doing so i need HELP because this is driving me insane!!

    Hi,
    Thanks for your posting in Windows Server Forum.
    In your case, you need to point your certificate for your server “hkrdss01” and then it can accept certificate from it. Now it seems that certification is not properly placed and it looks on hkrdss02 for certificate. For RemoteApp to work correctly without
    error, the certificate must be properly placed on the server and the certificate must be come from trusted certifying authority (means certificate must be trusted) and must be placed in local computer/personal store. 
    Here I can suggest you to enable RemoteApp Web SSO, with that you need to enter credential only once. For Web SSO to work you can use latest
    RDP 8.1 for win 7 and RDP 7.0 for XP. In addition, for Web SSO to work:
    1.  The connection in RemoteApp and Desktop Connections must have an ID. By default, it is set to the Fully Qualified Domain Name (FQDN) of the RD Connection Broker server in case of RD Connection Broker mode. In RD Session mode, it is set to the FQDN
    of the RD Web Access server.
    2.  RemoteApp programs must be digitally signed using a Server Authentication certificate [Secure Sockets Layer (SSL) certificate]. The certificate Enhanced Key Usage section must contain ‘Server Authentication (1.3.6.1.5.5.7.3.1)’. More details about
    the types of certificates used to digitally sign RemoteApp programs can be found here.
    3.  Client operating systems must trust the certificate with which the RemoteApp programs are signed.
    More information:
    Introducing Web Single Sign-On for RemoteApp and Desktop Connections
    http://blogs.msdn.com/b/rds/archive/2009/08/11/introducing-web-single-sign-on-for-remoteapp-and-desktop-connections.aspx
    Hope it helps!
    Thanks,
    Dharmesh

  • How can I redome my acount

    I Charge my account 10$ how can I redome my acount.
    i Need to charge my acounte

    Apple
    Store
    Mac
    iPod
    iPhone
    iPad
    iTunes
    Support
    Mail Settings Lookup
    Need to verify your email settings? Simply enter your email address below.
    Check Email Settings
    Incoming Mail Server
    Account Type:IMAP
    Username:Ibrahem_1
    Server hostname:Automatically added for iOS & OS X Mail
    Server port:993
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Outgoing Mail Server
    Username:Ibrahem_1
    Server hostname:Automatically added for iOS & OS X Mail
    Server port:587
    Authentication:Password
    Secure Sockets Layer (SSL):Yes
    Note: Your email address will be used to provide your Mail settings. Apple may collect and use your domain address (i.e. yahoo.com, gmail.com, etc.) for purposes of improving our products and services. Otherwise, your full email address will not be stored and will not be used by Apple or shared with any other entities.
    HomeSupportShop the Apple Online Store (1-800-MY-APPLE), visit an Apple Retail Store, or find a reseller.
    Apple Info
    Site Map
    Hot News
    RSS Feeds
    Contact Us
    Copyright © 2014 Apple Inc. All rights reserved.
    Terms of Use
    Privacy Policy
    Use of Cookies
    United States (English)

  • Server Socket Authentication

    How can i use some kind of authentication when some requests a socket connection to my server socket. What can i do to prevent everybody and anybody from getting a connection to it, only say someone with a specified user/password can be granted a connection.
    - Thanks

    You can't, not in the terms you stated.
    To prevent someone from connecting to a socket, something must filter requests before they get to the socket. So for instance I could set up a web server solutions that proxies requests once the user is logged in - but obviously then anyone at all can connect to the web server.
    I could set up a firewall that only allows packets through that come from specific IPs. This does mean that the users must have fixed (fixed range) IPs. Not everyone does. But that wouldn't use a user/password combo for verification. That would have to be done by something else.
    There are several security forums so if you just want to do security (which involves letting someone connect to some socket) then you might post the question to one of those for an answer to that question.

  • Failed to open a socket connection to the Authentication Manager

    Hello,
    When I use utcapture command, I get the error *�Failed to open a socket connection to the Authentication Manager�*.
    SO: Solaris 10 8/07
    SRSS: Sun Ray Server Software 4.0
    LAN Configuration
    Thanks.

    Since the question was also posted to the sunray-users alias, see http://www.filibeto.org/pipermail/sunray-users/2007-December/008281.html for the answer. (Which currently seems to be that the Sun Ray auth daemon was not running.)

  • How to access SOAP web service with authentication, HTTP basic Authentication

    Dear All
    i use Flash Builder 4.5, flex 4..1, i am developing a flex client to soap webservices hosted over Glassfish 2 Java server, the web services is protected by HTTP Basic Authentication, everythime i run my code , the prombt for username and password show up, i need to pass user name and password through action script, i followed the flollowing (but was for http web service, not soap) but really did not work.
    http://stackoverflow.com/questions/490806/http-basic-authentication-wi th-httpservice-objects-in-adobe-flex-air
    http://forums.adobe.com/message/4262868
    private function authAndSend(service:HTTPService):void
            var encoder:Base64Encoder = new Base64Encoder();
            encoder.insertNewLines = false; // see below for why you need to do this
            encoder.encode("someusername:somepassword");
            service.headers = {Authorization:"Basic " +encoder.toString()};                                               
            service.send();
    Also i noticed in debug mode, always that WARNNING raised up
    Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.
    any idea ?

    Hello,
    I don't know if this could help.
    Another way to connect to a web service by SOAP and WSDL is to click on the Data/Services panel, then click on "Connect to Data/Services" and then select the "Web Service" (WSDL) icon. This could help as well.

Maybe you are looking for

  • "Email me" doesn't work in Windows

    Has anyone found that the "Email me" button doesn't work on Windows machines? I have just been told by one or two visitors to my website (www.aroundthebusch.com) who use Windows that the buttons didn't work.

  • SAP  Whole Offline Backup

    Hi team, Here we are working on Windows 2003 server with oracle 10g as database.Here i have a requirement of taking an offline backup with SAPMMC stopped. I need to take backup to an external harddisk which is of 35 GB.My Whole dtabse online + redo l

  • How to create ISO images for Solaris 10 U6 (10/08) SPARC CD 1 and DVD

    The format of the bootable DVD and CD 1 of Solaris 10 U6 sparc has changed from previous Solaris 10 update's sparc media, it now seems to be more like the x86 format, can anyone provide the new/specific mkisofs command to use to recreate (modified ve

  • Urgent: Excessive archive logs 10g 10.2.0.4

    Hi, I am experiencing excessive archive logging. This has been happenning for the past 3 days. Usually achive logs were taking about 250 Mb. Yesteday they jumped to 129Gb, today - 30Gb until the hard drive ran out of space. Now I obviously have "Arch

  • Calling another object's method

    I have made a GUI in swing. I have a class object with all my database methods in it. I am having problems calling a particular method in my Database Object and displaying the ResultSet of that method in my Swing GUI. here is the code from the GUI ca