View Evan Greenwood's profile on LinkedIn
<% function mymail($to,$subject,$message,$headers) { $SMTP_SERVER = "pc-programmer.com"; $SMTP_PORT = 25; $SENDER = "computerconsultant@computerconsultant.co.nz"; // get From address if ( preg_match("/From:.*?[A-Za-z0-9\._%-]+\@[A-Za-z0-9\._%-]+.*/", $headers, $froms) ) { preg_match("/[A-Za-z0-9\._%-]+\@[A-Za-z0-9\._%-]+/", $froms[0], $fromarr); $from = $fromarr[0]; } // Open an SMTP connection $cp = fsockopen ($SMTP_SERVER, $SMTP_PORT, &$errno, &$errstr, 1); if (!$cp) return "Failed to even make a connection"; $res=fgets($cp,256); if(substr($res,0,3) != "220") return "Failed to connect"; // Say hello... fputs($cp, "HELO ".$GLOBAL["SMTP_SERVER"]."\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "Failed to Introduce"; // perform authentication //fputs($cp, "auth login\r\n"); //$res=fgets($cp,256); //if(substr($res,0,3) != "334") return "Failed to Initiate Authentication"; //fputs($cp, base64_encode($GLOBAL["SMTP_USERNAME"])."\r\n"); //$res=fgets($cp,256); //if(substr($res,0,3) != "334") return "Failed to Provide Username for Authentication"; //fputs($cp, base64_encode($GLOBAL["SMTP_PASSWORD"])."\r\n"); //$res=fgets($cp,256); //if(substr($res,0,3) != "235") return "Failed to Authenticate"; // Mail from... fputs($cp, "MAIL FROM: <$SENDER>\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "MAIL FROM failed"; // Rcpt to... fputs($cp, "RCPT TO: <$to>\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "RCPT TO failed"; // Data... fputs($cp, "DATA\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "354") return "DATA failed"; // Send To:, From:, Subject:, other headers, blank line, message, and finish // with a period on its own line (for end of message) fputs($cp, "To: $to\r\nFrom: $from\r\nSubject: $subject\r\n$headers\r\n\r\n$message\r\n.\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "250") return "Message Body Failed"; // ...And time to quit... fputs($cp,"QUIT\r\n"); $res=fgets($cp,256); if(substr($res,0,3) != "221") return "QUIT failed"; return true; } %>

Contact info:

Ph:      09 950 3741
Email: Please use the form below.


Please feel free to contact me on the number above with your queries/requests, or reqest a callback by filling out the form below.

Please provide as much information as possible to allow me to better respond to your request.

Salutation:
*Your name:
Company:
*E-mail:
*Phone number:  Please call me back.
Message:
Visit here for expert computer work!