Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

Sunday, October 20, 2019

Automatically Sending Welcome Email to new user or subscriber in WordPress | MailPoet3






In this video you will learn how automatically send welcome emails to new users or subscribers in WordPress using mailpoet3. The mails will be sent automatically as soon as the subscriber is added. #wordpress #mailpoet3 #welcomeemails

Monday, November 12, 2018

Function to validate email in PHP

<?php
function validate($mail){
if(strpos($mail,"@")>0 && strpos($mail,".")>0)
{
$atPos= strrpos($mail,"@");
$dotPos=strrpos($mail,".");
$len=strlen($mail);
if($dotPos>$atPos && strrpos($mail,".")<= $len-2){
return true;
}
else
return false;
}
else
return false;
}
?>

Saturday, November 10, 2018

Program to count number of emails in a string in php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form method="post">
<table width="779" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="row">Enter String :</th>
    <td><textarea name="txtstr" id="txtstr"></textarea></td>
  </tr>
  <tr>
    <th colspan="2" scope="row"><input type="submit" name="btnsubmit" id="btnsubmit" value="Submit" /></th>
  </tr>
</table>
</form>
</body>
</html>
<?php
include("email.php");
$email=array();
if(isset($_POST['btnsubmit'])){
$mail=$_POST['txtstr'];
$a=explode("\n",$mail);
foreach($a as $val){
$arr=explode(" ",$val);
foreach($arr as $m){
$f=validate($m);
if($f)
$email[]=$m;
}
}
echo '<br/>There are '.count($email).' emails in this string.';
}
?>