Posts Tagged ‘ Email ’

RegExp Validation

The below function validates the email ID string using regular expression.

private function validateEmail(mailid:String):Boolean {
        var emailExpression:RegExp = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/i;
        return emailExpression.test(mailid);
}

//e-mail option 2:

/[a-zA-Z0-9!$&*.=^`|~#%’+\/?_{}-]+@([\w_-]+\.)+[a-zA-Z]{2,4}/;

//URL:

/(https?|ftp|svn)(:\/\/[\w-_.:;!?~*\'()\/\@&=+\$,%#]+)/;

//Color:

/#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})/;

//String Quote:

/(“|’)(.+)?\1/;

IP evaluation:

var ipPattern:RegExp = /\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/;

Advertisements

SMTP Quick Emailer – AIR

request here to install AIR package using socket to send email using SMTP connection, you can send quick email to any email ID you need, For Source files check this link