0 Replies - 1062 Views - Last Post: 22 September 2008 - 03:45 PM

#1 Kerplope  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 14
  • Joined: 22-September 08

pop3 Socket Connection AS3

Posted 22 September 2008 - 03:45 PM

Description: You will need to edit the data to match you email password and incoming mail server.This code will open a socket and allow you to access anything on your email server. This snippet is based off the tutorial on gotoandlearn.com with a few changes, but if you are having trouble implementing it I would highly recommend you watch the full tutorial.
//defines a connection between the mail server and your computer
var yourSocket:Socket = new Socket("incoming_mail_server", 110);
yoursocket.addEventListener(ProgressEvent.SOCKET_DATA,openSocketConnection);
function openSocketConnection(evt:ProgressEvent):void {
//Writes your email and password in a unicode format that the pop3 server can read .
	s.writeUTFBytes("emailaddressn");
	s.writeUTFBytes("passwordn");
	s.writeUTFBytes("STATn");
//Sends the data written in UTFBytes through the socket connection
	s.flush();
//At this point you should consult a pop3 reference guide to preform functions on the server.
}


Is This A Good Question/Topic? 0
  • +

Page 1 of 1