Skip to content

Instantly share code, notes, and snippets.

@tj
Created April 16, 2009 01:16
Show Gist options
  • Select an option

  • Save tj/96146 to your computer and use it in GitHub Desktop.

Select an option

Save tj/96146 to your computer and use it in GitHub Desktop.
<?php
try {
$fp = fsockopen('smtp.gmail.com', 587, $errno, $errstr, 10);
fwrite($fp, "HELO whats_up\r\n");
fwrite($fp, "MAIL FROM:<tj@vision-media.ca>\r\n");
fwrite($fp, "RCPT TO:<info@vision-media.ca>\r\n");
fwrite($fp, "DATA\r\n");
fwrite($fp, "testing\r\n.\r\n");
fwrite($fp, "QUIT\r\n");
fclose($fp);
}
catch(Exception $e) {
echo "Shitty deal: {$e}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment