Client connecting through a proxy
hi
i'm new to RMI programming, i need to clear some things up
. is RMI a standalone protocol like http or does it require another protocol so
it can run over it ?
. how does an RMI connection get through a proxy server, ie. if the client is behind a proxy server and the server is a known public host, can the client still get to the server, or does this have to be done in the proxy configuration?
Is there certain types of proxy servers RMI can't go through or ( they won't let it pass through ) .
i need those infos because i've been stuck with an RMI server deployed on the net and a client behind a web proxy, the same box ( IP ) hosting the RMI server also hosts a WEB server from which javaWS starts the application but this application exits at a certain point sayin it cannot find the RMI server.
i didn't have the chance to test through a direct connection, but have tested
in an intranet environment and it was workin great,
thanks for any help
. is RMI a standalone protocol like http or does it
require another protocol so
it can run over it ?The question doesn't make much sense. HTTP runs over TCP, and so does RMI. RMI also uses the Serialization protocol.
how does an RMI connection get through a proxy
server, ie. if the client is behind a proxy server
and the server is a known public host, can the
client still get to the server, or does this have to
be done in the proxy configuration?http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html#firewallOut
s there certain types of proxy servers RMI can't go
through or ( they won't let it pass through ) .Java supports SOCKS and HTTP proxies.
Similar Messages
-
Only 2 Clients Connect Through AP 1252
Hi,
I am configuring a 1252 in autonomous mode and that's the only AP in the network.
A very strange behavior is observed.
Although many clients can associate to this AP with no problem, only the first two associated devices can connect through this AP and access devices on the wired network. For 3rd associated device and above, they can only connect to and ping to AP but nothing beyond AP. In Windows the wireless icon would display "limited access" with an exclamation mark.
DHCP works fine though for all devices, and they can acquire the IP from DHCP server on a different segment.
I don't have too much experience with wireless so I am totally lost with no direction.
Please help and thank you very much.
configuration attached.Problem solved. It has nothing to do with AP. The AP is connected to a ESW 540-8 port SW. This is SOHO SW is blocking the traffic. As soon as I moved AP to main switch, everything went smoothly.
-
Client connecting through firewall
Hi
We have two clustered servers.Our client is connecting through
firewall NAT. When iam connect to first server the response is very slow and
at the same time clustering is not working.If i stop the second server the
response fast .
The same configaration is working fine when my client is local.
Can you explain the reason for this problem ?
Presently iam using weblogic 6.1 version.
Thank you
OK I spoke too soon. The user looked like it was working but it was working because it matched another IAS policy further down the list. It seems as though the PIX refuses to use ms-chap of any sort. If I include the authentication type in the VPN policy conditions as ms-chap, it skips the VPN policy I am using to authenticate this. If I remove it, then it gives an invalid authentication type as if whatever the PIX is sending the IAS server does not understand as ms-chap.
It seems like the PIX authentication is totally wrong for use with IAS. What else do I need to add to this configuration to gewt it to work with ms-chap of any kind? I really don't get it. -
Problem with socket connections through a proxy server.
People,
I set the system properties to use a proxy server so my application can fetch data from servers located outside my local network:
System.setProperty("socksProxyPort", port);
System.setProperty("socksProxyHost", proxy_addy);Then, when I attempt to stabilish a connection:
s = new Socket(this.getHost(), port);It hangs.
I appreciate any help since my available Java documentation is quite obscure regarding proxy servers.Is the proxy on another machine? Try it's IP. If
not, replace 'proxy' with 'localhost'.
- SaishYes, it is another machine.
byte x[] = {(byte)aaa,(byte)bbb,(byte)ccc,(byte)ddd};
s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(InetAddress.getByAddress(x), 8080)));
s.connect(new InetSocketAddress(this.getHost(), port));Again, it hung. -
How can I make connection to a port of some remote server when I am connected to internet using HTTP Proxy?
If you are going to use the URL object then set your proxy IP and Port in your system properties before you create your URL object.
For example:
System.getProperties().put( "proxyHost", proxyIp );
System.getProperties().put( "proxyPort", proxyPort );
URL url = new URL("http://www.foo.com" ); -
How can i access web when i am connected through a proxy?
HI,
I am rakesh from bangalore. I want to know how can i access web when i am connected to internet throug a proxy. are there any classes to handle this in java.net package?
Thanking you
Rakeshthe URL class can also handle a proxyserver.
URL urlobj = new URL("http", proxyhost, proxyport, url); -
Installing an application (adium x 0.89/msn) + connecting through proxy
hi all. most .dmg files will mount and tell u to drag the .app icon into 'applications folder'
may i ask, what is the difference if u drag it into MACINTOSH HDD->APPLICATIONS folder, vs dragging it into /user/applications.
apparently it had an observable effect on my installing of Adium X 0.89 (i use this for msn and i will elaborate why)
previously when i dragged adium.app into macintosh hdd/applications, the default folder, i experienced several problems. i could not initiate messages to my contacts, it would display an error message of "Could not send; a connection error occurred." however when others msged me (if i get them, that is), i can reply to them, if im fast enough. if say i don't reply within 1/2min, then any msg i type to them will be so-called counted as a new msg, and i cant initiate it again! the same error msg surfaces.
i checked my connection settings and it's ok. i uninstalled adium.app (search adium on spotlight and deleted everything that had adium), plus emptied trash. then i took a new move in installing in /user/applications folder and it worked fine!
until now. it crashed all of a sudden for no reason. i uninstalled it again. installed it again in /user/applications folder, and it has the prev problem of not being able to initiate converesations again! (how frustrating!)
why don't i just use microsoft messenger for mac 5.1 then? you might ask..
very good question. i want to use that too. but i can't! see, i'm staying at halls, at Monash Uni, Australia. we connect through our uni's http proxy + port. for msn 5.0, i cant enter my username/password (as the textfields are grayed out). for adium, i can enter them. on contacting msn, they told me my msn is corrupt, i shd uninstall it completely and reinstall it with a version i get from them, not other sources. i did that, and still can't. i have a strong feeling it is a problem defunct, they have yet to make it compatible to mac users who want to connect through HTTP PROXY (not socks 5.0) and have to enter their username/password to enter this proxy.
pls enlighten on the above issues, and hopefully provide a solution.oh come on im sure someone knows sth abt this...
installing any program in /mactintosh hdd/applications
vs /user/applications
........ -
How many clients can connect through cisco AP 1310 in wireless network ?
I had setup wireless network with
wlc4402,cisco AP 1310.1131 and 1242 and Cisco acs 4.1.My problem is only 30 clients connect through Cisco AP 1310 at a time.I can not connect more than 30 clients at a time.What is the issue in wireless network?please reply .
Thanks and regards
By
D.AnbuduraiWIRELESS > 802.11 > RRM
How can do that setting ? Can you reply with
some brief steps? And also I want to know how
many clients can connect in wireless network at
a time exactly through cisco aps?
Thanks and regards
d.anbudurai -
How to use Axis to access a web service through Authentication proxy
Using axis access internat web service is success,but access a web service through Authentication proxy is failure.But other java classes connect through a proxy to the internet which works very well:
please help me ,thank you!!!
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
//this is my access webservice faliure codes
public class TestClient
public static void main(String [] args) {
try {
System.getProperties().setProperty("http.proxySet", "true");
System.getProperties().setProperty("http.proxyHost","proxy.com");
System.getProperties().setProperty("http.proxyPort", "8080");
System.getProperties().setProperty("http.proxyUser", "username");
System.getProperties().setProperty("http.proxyPassword","password");
String endpoint =
"http://nagoya.apache.org:5049/axis/services/echo";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soapinterop.org/", "echoString") );
String ret = (String) call.invoke( new Object[] { "Hello!" } );
System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}I get an "(407)Proxy authorization required" error?I am also looking for a solution. Does any one know how to do through code instead of jvm settings?
Thanks in advance! -
ConfigMgr Clients connection over direct access.
My test client machine is running Windows 8.1 and connecting to network through Direct Access. I am running SCCM 2012 R2 on Windows Server 2012.
Test Machine: NYWIN8
SCCM Server: SCCM01
Domain: demo.local
I would like to understand how configmgr handles clients connecting through direct access. What all functionality is available for such clients?
On my client machine is see following errors:
FSPSTATEMESSAGE.LOG
Failed in WinHttpSendRequest API, ErrorCode = 0x2ee7
[CCMHTTP] ERROR: URL=HTTP://SCCM01.demo.local/SMS_FSP/.sms_fsp, Port=80, Options=480, Code=12007, Text=ERROR_WINHTTP_NAME_NOT_RESOLVED
POLICYAGENT.LOG
Policy
http://SCCM01.demo.local/SMS_MP/.sms_pol?WRC10000.SHA256:BE60C5A54E508758261E6EDAE80AB21576A214309B9E1E19EE1D5A96C4508EC4 is not available.
DATATRANSFERSERVICE.LOG
DTS job {E6FAADEE-F22E-4E89-92EE-C2D9C10C3056} BITS job {9C444FAB-FD3C-4A6B-B8A4-81DA159E4E45} failed to download source file
http://SCCM01.demo.local:80/SMS_MP/.sms_pol?WRC10000.SHA256:BE60C5A54E508758261E6EDAE80AB21576A214309B9E1E19EE1D5A96C4508EC4 to destination C:\Windows\CCM\Temp\{C9AA0DDC-BD37-442D-A00E-EE7404D47C12}.tmp with error 0x80190194
DTS job {E6FAADEE-F22E-4E89-92EE-C2D9C10C3056} BITS job {9C444FAB-FD3C-4A6B-B8A4-81DA159E4E45} partially completed 0/1 with error 0x80190194 context 5
Software Catalog Update Endpoint
Failed to open portal registry key 'Software\Policies\Microsoft\CCM'. maybe haven't been created yet. Error 0x80070002
WEDMTRACE.LOG
No CCM Identification blob
CAS.LOG
The number of discovered DPs(including Branch DP and Multicast) is 0
SMSCLIUI.LOG
Failed to set DNSSuffix value to the registry.
Are there any issues due to connecting using direct access?When I try to deploy any software (7-ZIP or Notepad++) to this client I get following error:
The software change returned error code 0x87D00607(-2016410105).
I can deploy same software fine to other machines connecting on LAN.
Server Logs:
Portlctl
PORTALWEB's previous status was 0 (0 = Online, 1 = Failed, 4 = Undefined)
PORTALWEBs http check returned hr=0, bFailed=0
awbsctl
AWEBSVCs http check returned hr=0, bFailed=0
AWEBSVC's previous status was 0 (0 = Online, 1 = Failed, 4 = Undefined)
Client Logs:
CAS
The number of discovered DPs(including Branch DP and Multicast) is 0
CCMEVAL
Client's current MP is http://SCCM01.DEMO.local and is accessible
ClientLocation
Current AD forest name is Demo.local, domain name is Demo.local
Domain joined client is in Intranet
Rotating assigned management point, new management point [1] is: SCCM01.demo.local (7958) with capabilities: <Capabilities SchemaVersion="1.0"><Property Name="SSLState" Value="0"/></Capabilities>
Assigned MP changed from <SCCM01.demo.local> to <SCCM01.demo.local>.
ContentTransferManager
No data since 11/13/2013
CTM job {F6085C09-4C39-489E-A6F6-2C268398B7F2} successfully processed download completion.
DataTransfer
DTS job {B227AB6E-6D0F-4709-B8C6-AA8B66CBBE2D} BITS job {AE61D01C-E251-45FA-8B2C-2E22DDD91016} failed to download source file
http://SCCM01.demo.local:80/SMS_MP/.sms_pol?WRC10000.SHA256:BE60C5A54E508758261E6EDAE80AB21576A214309B9E1E19EE1D5A96C4508EC4 to destination C:\Windows\CCM\Temp\{22619283-47B1-445A-9262-C1FA54AD0F64}.tmp with error 0x80190194
DTS job {B227AB6E-6D0F-4709-B8C6-AA8B66CBBE2D} BITS job {AE61D01C-E251-45FA-8B2C-2E22DDD91016} partially completed 0/1 with error 0x80190194 context 5
Filebits
BranchCache Is Not Enabled
Failed to check PeerDistribution status. NOT able to do branch cache.
FSPSTATEMESSAGE
Failed in WinHttpSendRequest API, ErrorCode = 0x2ee7
[CCMHTTP] ERROR: URL=HTTP://SCCM01.demo.local/SMS_FSP/.sms_fsp, Port=80, Options=480, Code=12007, Text=ERROR_WINHTTP_NAME_NOT_RESOLVED
Successfully sent location services HTTP failure message.
InternetProxy
Failed to get proxy for url 'HTTP://SCCM01.demo.local/SMS_FSP/.sms_fsp'. Error 0x87d00215
InventoryAgent
Inventory: 9 Collection Task(s) failed.
SCCLIENT
Event maps to notification type = Application Enforcement Failed (Microsoft.SoftwareCenter.Client.Data.WmiConnectionManager at EventWatcher_EventArrived)
SMSCLIUI
Failed to set DNSSuffix value to the registry.
IPCONFIG /ALL from CLIENT:
Windows IP Configuration
Host Name . . . . . . . . . . . . : NYWIN8
Primary Dns Suffix . . . . . . . : demo.local
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : demo.local
System Quarantine State . . . . . : Not Restricted
Ethernet adapter vEthernet (Internal):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
Physical Address. . . . . . . . . : 00-15-5D-01-0B-07
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::d3f:4e51:c648:7b26%26(Preferred)
Autoconfiguration IPv4 Address. . : 169.254.123.38(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 872420701
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-EA-A9-CE-E0-DB-55-D2-5E-59
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (External):
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 84-A6-C8-AF-03-DE
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::9cb5:5132:1f47:e7c6%24(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Thursday, January 2, 2014 1:27:53 PM
Lease Expires . . . . . . . . . . : Saturday, January 4, 2014 12:27:55 PM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 730113736
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-EA-A9-CE-E0-DB-55-D2-5E-59
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
Physical Address. . . . . . . . . : 84-A6-C8-AF-03-DF
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
Physical Address. . . . . . . . . : 84-A6-C8-AF-03-E2
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Realtek PCIe FE Family Controller
Physical Address. . . . . . . . . : E0-DB-55-D2-5E-59
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.home:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter iphttpsinterface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : iphttpsinterface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : fd64:fc00:d17b:1000:e1a7:9cc8:c3c7:d819(Preferred)
Temporary IPv6 Address. . . . . . : fd64:fc00:d17b:1000:c598:7f17:e286:369d(Preferred)
Link-local IPv6 Address . . . . . : fe80::e1a7:9cc8:c3c7:d819%10(Preferred)
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 369098752
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-EA-A9-CE-E0-DB-55-D2-5E-59
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter isatap.{DC7D2C63-1506-49EC-A40F-AA4E56DE4001}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes -
I have a brand new MBP 15" Retina display. Decided to download and install OSX Mavericks before I did any other setup. However since I've done this installation the only website I seem able to browse is Apple's. Google just keeps coming up not able to connect through the proxy. I still have tons to do and need to be able to access a number of websites. I also cannot get to the App Store.
Does OSX Mavericks have an issue with proxy servers?
I am writing this on my MBP 13" Retina display on which I have NOT upgraded to OSX Mavericks and I am having no issues at all.
Help please?System Preferences / Security & Privacy / General tab / Allow apps downloaded from:
Change the settings. -
Post Moved Cannot-connect-through-anonymous-prox...
Post moved to Other BB Queries http://community.bt.com/t5/Other-BB-Queries/Cannot-connect-through-anonymous-proxy/td-p/650446
If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’You could try reading about wingates, socks and proxies (oh before i forget, turn off java, javascript, cookies, what's related, and smart update ... if you are using IE you're not very smart). Also try installing a firewall, or DHCP or you can learn from me!Here is the info of best 10 proxy software, from which you may try: http://www.techyv.com/article/top-10-free-proxy-software
-
How to use RDP client through a proxy ?
Hi,
we have some users in our LAN that have to connect to external RDP servers.
Those servers don't use RDP Gateway (and we are not the owner of those servers).
We dont want to open specific trafic from our LAN to those IP Adress on port 3389; we prefer to let this trafic goes through our proxy server (for security reason, because the direct connection will not be supervised).
So, my question is : Is there a way to configure the RDP Client (the official one or another one) to connect through a local proxy instead of trying to directly connect to the external IP address of the RDP Server ?
Thank youYou could do this with an ssh tunnel and putty very easily. Most web proxies won't actually allow port forwarding like that and restricted to 80 and 443.
If you want to know how to do it with a ssh tunnel and putty let me know.
Opening outgoing 3389 from one internal subnet to specific external IP is not such a security risk. Just don't open inbound 3389 from those hosts and you should be fine?
I am not sure if outbound RDP will require inbound ports to be opened. Its quite rare that any external RDP is opened in my experience as its such a security risk (on the part of the external rdp hosts).
ITs much better to VPN to the external hosts then initiate local (via vpn) rdp connections. -
Deal All,
We could not connect BPC through proxy server. Can anybody let me know any specific setting required.
Best Regards
SheshSorin,
Thank you so much for the reply.
I think you are saying that when I connect that when I am connecting directly to BPCWEB it is saying knows you are authenticated to the windows domain. But when it gets it from the proxy server it is now not you anymore the BPCWEB server sees it coming from the proxy server NOT the windows domain.
So instead of DOMAIN/userID connecting it is PROXY/userID connecting. BPC doesn't know you. This cannot be the first time this has been seen.
Do you know a way around this? I am currently using sapwebdispatcher as my reverse proxy here, however I do not mind trying other products.
Would you have any recommendations on what your other clients use as a reverse proxy for BPC.
To simply things, we have DOMAIN users ---> Reverse proxy box ---> BPC Web .NET Server. We want to eliminte the ability for direct access to the BPC web .NET Server
Thanks again... any help would be great as we have been struggling for a few weeks to get this silly access issue resolved.
Edited by: Russell Hull on Feb 20, 2010 7:24 PM -
How can i create a socket connection through an http proxy
i'm trying to make a socket connection send an email - i have code that works when you don't have to go through a proxy server but i can't make it pass the proxy server.
import java.net.*;
import java.io.*;
import java.util.*;
public class Mail
public String to_address = "[email protected]";
public String from_address = "[email protected]";
public String sendSub = "HeHeHe";
public String sendBody = "hehehe - it worked";
// This is created to allow data to be read in by the keyboard.
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
private void Mail(String to_address, // recipient's addresses
String from_address, // sender's address
String sendSub, // subject
String sendBody) // Message
throws IOException, ProtocolException, UnknownHostException {
Socket socket; // creates a Socket named socket
PrintStream out; // stream to write to socket
String host = "imap.btopenworld.com"; // identification of the mail server host
// creates a new socket for connection to the mail server
// as well as two variables for the read and write streams
socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
out = new PrintStream(socket.getOutputStream());
// read the initial message
in.readLine();
// Dialog with the mail server
// send HELO to SMTP server HELO command is given by a connecting SMTP host
out.println( "HELO " + host );
out.flush() ;
in.readLine();
// Once we are connected to the mail server we start sending the email...
// send "from"
out.println( "MAIL FROM: " + from_address );
out.flush() ;
in.readLine();
// send "to"
out.println( "RCPT TO: " + to_address );
out.flush() ;
in.readLine();
// prepare the mailserver to receive the data
out.println( "DATA" );
out.flush() ;
in.readLine();
// Send actual email
out.println("From: " + from_address);
out.println("To: " + to_address);
out.println( "Subject: " + sendSub + "\n" );
out.flush() ;
out.println("");
out.println( sendBody ) ;
out.println(".") ; // standard to determine end-of-body
out.flush() ;
in.readLine();
//Quit and closes socket
out.println("QUIT");
out.flush();
in.close() ;
socket.close() ;
return ;
public static void main (String [] args) throws IOException
Mail themail = new Mail();
}i've tried that but it doesn't seem to do nething - this is how i implemented it...
import java.net.*;
import java.io.*;
import java.util.*;
public class Mail
public String to_address = "[email protected]";
public String from_address = "[email protected]";
public String sendSub = "HeHeHe";
public String sendBody = "hehehe - it worked";
// This is created to allow data to be read in by the keyboard.
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
private void Mail(String to_address, // recipient's addresses
String from_address, // sender's address
String sendSub, // subject
String sendBody) // Message
throws IOException, ProtocolException, UnknownHostException {
Socket socket; // creates a Socket named socket
PrintStream out; // stream to write to socket
String host = "imap.btopenworld.com"; // identification of the mail server host
// creates a new socket for connection to the mail server
// as well as two variables for the read and write streams
socket = new Socket(host, 25); // opens socket to host on port 25 (SMTP port)
out = new PrintStream(socket.getOutputStream());
// read the initial message
in.readLine();
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "144.124.16.28" );
System.getProperties().put( "proxyPort", "8080" );
// Dialog with the mail server
// send HELO to SMTP server HELO command is given by a connecting SMTP host
out.println( "HELO " + host );
out.flush() ;
in.readLine();
// Once we are connected to the mail server we start sending the email...
// send "from"
out.println( "MAIL FROM: " + from_address );
out.flush() ;
in.readLine();
// send "to"
out.println( "RCPT TO: " + to_address );
out.flush() ;
in.readLine();
// prepare the mailserver to receive the data
out.println( "DATA" );
out.flush() ;
in.readLine();
// Send actual email
out.println("From: " + from_address);
out.println("To: " + to_address);
out.println( "Subject: " + sendSub + "\n" );
out.flush() ;
out.println("");
out.println( sendBody ) ;
out.println(".") ; // standard to determine end-of-body
out.flush() ;
in.readLine();
//Quit and closes socket
out.println("QUIT");
out.flush();
in.close() ;
socket.close() ;
return ;
public static void main (String [] args) throws IOException
Mail themail = new Mail();
}
Maybe you are looking for
-
Pairing Apple TV ios6 - cannot get to Apple Support
The bug in ios6 that makes pairing an iPad with TV impossible is well documented, so I gave up trying and thought to call Apple support for an official line. Of course, they won't give me a number in the UK to call and, when I try to raise a case wit
-
WinRM using a lot of memory on 2012R2 DC - is it SCOM-related
Hi! WinRM uses 5GB of memory on my DC's who are running 2012R2 server. Does the SCOM agent use the WinRM service on clients where the agents are installed? Is there any known issues with SCOM and WinRM on 2012R2 Domain Controllers? When I stop and re
-
IDT High Definition Audio Codec Cannot Start Code 10
I accidentally turned off my HP dv6 in the middle of a security update. When I turned it back on all the audio, usb, bluetooth, and network drivers had failed. I, having no experience with this kind of issue, took it to the local laptop repair shop.
-
Thank you for reading the above question as it is, plus: I lost my Thunderbird computer internal email feature & was new & did not know how to put Yahoo or other into that function. I signed up for Mozilla Firefox for my Toshiba PC laptop, really lik
-
3.2.1 Problems: Yahoo / Citrix
I find myself having to use FireFox to check my online Yahoo Business eMail and also, to use my company Citrix Server.