Feb 19

If you’re looking for an easy way to extract emails from Craigslist but want to avoid tying up your computer and your connection – http://craigslist.pasukan.com web based will fit your needs perfectly.

Unlike other Craigslist email extractor software that causes Craigslist to blacklist your server or IP address and causes your computer to slow to a crawl, http://craigslist.pasukan.com collects email effortlessly through the web. Enjoy always-on access to the latest, up-to-date emails directly from Craigslist. Target your mailings more precisely by targeting on the exact city and category you want to promote to. Make your message heard by getting only the most recent emails available the email addresses based on the information you supply, so you’re assured of smart results – every time.

Forget dealing with CAPTCHA bypassing and having your account suspended. http://craigslist.pasukan.com works from anywhere to give you all the details you need – right when you need them.

Tagged with:
Sep 16

We’ve discussed sending both HTML and text mail from our previous post. But there are useful libraries out there to make all our coding easier like PHPmailer and Swiftmailer.

This is an example on how to send multi-part message in swiftmailer.

<?php
// include Swiftmailer Library
require_once("phplib/swiftmailer/lib/Swift.php");
require_once("phplib/swiftmailer/lib/Swift/Connection/SMTP.php");
require_once("phplib/swiftmailer/lib/Swift/Plugin/Decorator.php");  // optional, its a plugin

//define your mail server values
define("MAIL_HOST", "mail.bauson.com");
define("MAIL_USERNAME", "mailer+bauson.com");
define("MAIL_PASSWORD", "bauson.pass");

//instantiate the connection
$smtp = new Swift_Connection_SMTP(MAIL_HOST);
$smtp->setUsername(MAIL_USERNAME);
$smtp->setpassword(MAIL_PASSWORD);
$swift = new Swift($smtp);
$recipients =& new Swift_RecipientList();

// set recipients
$recipients->addTo("jbauson@gmail.com", "my gmail"); //We can give a name along with the address
$recipients->addTo("jbauson@yahoo.com"); //or we can just add the address
$recipients->addTo("jayar@bauson.com", "my private");

//formatting mail
$message =& new Swift_Message("My subject");
$message->setReplyTo(new Swift_Address("dummy@bauson.com", "Fake reply to"));
$message->attach(new Swift_Message_Part("My plain part")); // Plain text version
$message->attach(new Swift_Message_Part("<b>My HTML part</b><hr><tt>hello html</tt>", "text/html")); // HTML version

//The number of successful recipients is returned here (hopefully 3!)
$number_sent = $swift->batchsend($message, $recipients, new Swift_Address("mailer@bauson.com", "BUlk Mailer"));
?>
Tagged with:
Sep 11

A friend ask me to send some of my previous work regarding email parser, I don’t have time to go home and search it to my backup drive. This friend is really desperate to finish his task and so by browsing web, I found this really good mailbox class.

Download: receivemail.class

Usage:

<?

include("receivemail.class.php");

$obj= new receiveMail('jayar+bauson.com','mypassword', 'jayar@bauson.com','mail.bauson.com','pop3','110',false);

$obj->connect();         

$tot=$obj->getTotalMails(); 

echo "Total Mails:: $tot<br>";

for($i=$tot;$i>0;$i--)
{
	$head=$obj->getHeaders($i);
	echo "Subjects :: ".$head['subject']."<br>";
	echo "TO :: ".$head['to']."<br>";
	echo "To Other :: ".$head['toOth']."<br>";
	echo "ToName Other :: ".$head['toNameOth']."<br>";
	echo "From :: ".$head['from']."<br>";
	echo "FromName :: ".$head['fromName']."<br>";
	echo "<br><br>";
	echo "<br>***************************************** **************************************************<BR>";
	echo $obj->getBody($i);  

	$str=$obj->GetAttach($i,"./");
	$ar=explode(",",$str);
	foreach($ar as $key=>$value)
		echo ($value=="")?"":"Atteched File :: ".$value."<br>";
	echo "<br>--------------------------------------------------- ---------------------------------------<BR>";

	//$obj->deleteMails($i); // Delete Mail from Mail box
}
$obj->close_mailbox();  

?>
Tagged with:
Mar 30

As a developer, we always want to secure our client’s email from crawlers to minimize the number of spam. Applying this simple code will eliminate crawlers to read email address on your page.

class eMailClass{

  function jEnc($x,$y){
    $p = "";

    for ($i = 0; $i < strlen($x); $i++){
      $p = $p . Chr((Ord($x{$i})-32) % 240 + $y + 32);
    }
    return urlencode($p);
  }

  function emailEncrypt($email2enc, $hr="Send Email"){ //$e is for email $hr is the text link
    $offset = mt_rand(1,10);
    $doff = 32 + $offset;
    if (empty($hr)) {
      $hr = $email2enc;
    }
    $link = "<a href=\"mailto:" . $email2enc. "\">$hr</a>";
    $j = "";
    $j = $j . "<script language=\"javascript\" type=\"text/javascript\">\r\n";
    $j = $j . "var e = unescape(\"" . $this->jEnc($link,$offset) . "\");\r\n";
    $j = $j . "var i,p='';for(i=0;i<e.length;i++){p+=String.fromCharCode(((e.charCodeAt(i)-" . $doff . ")%240)+32);}\r\n";
    $j = $j . "document.write(p);\r\n";
    $j = $j . "</script>";
    // for script disabled script
    $email2enc = explode("@", $email2enc);
    $j = $j . "<noscript>" . $email2enc[0] . " <em>-a<!-- " . mt_rand() . " -->t-</em> ";
    $f = explode(".", $email2enc[1]);
    $j = $j . implode(" <em>d<!-- " . mt_rand() . " -->ot</em> ", $f);
    $j = $j . "</noscript>";
    return $j;
  }
}
Tagged with:
preload preload preload
Bless CV