100% Delivery Guaranteed Email

Good Day,

How do you make sure email you send programmatically is not automatically marked as spam or not delivery to the user?

Can you please guide me on the steps to make use of it in coding and server level.

Background:
Language: PHP
Server : CentOS
Email: Gmail server.

Best Wishes,
Siva Kumar S.
rapidsivaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
What you want is not possible, you can not guarantee 100% delivery.  The receiver of the email can mark it as spam or reject it anytime they want, it is Not under your control.  The legal definition of 'spam' in the US is 'unwanted email' that is sent without permission or a previous business relationship.

In addition, some mails servers like Yahoo and Live/Hotmail may refuse to accept your email based on the fact that you do not have a 'reputation' with them.  Some mail servers refuse email until you ask and get permission to send to them.
0
rapidsivaAuthor Commented:
Good Day,

Thanks for the reply,

What is the best way to handle this.

We have our user registration in our website. once the registation is over they will get confirmation email to activate the account.

In this case how to handle to make sure the email is delivery and user activate the account.
0
Dave BaldwinFixer of ProblemsCommented:
The best thing to do is send a plain text email with the information they need.  Other things you should probably do is make sure you are sending from a valid email address since some servers will check that.  It needs to be one that 'bounces' can be sent to.  It also helps when the email address has the same domain as the web server or email server so there are fewer questions about it being a 'legitimate' email address.

When you accept their registration, you can put up a message asking them to add that email address to their address books which usually helps make sure it gets delivered.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

rapidsivaAuthor Commented:
Good Day,

But most of the case user will not add the emailID we are providing.

What are do and dont to be followed in server level and in php coding level any idea
0
peeaCommented:
We have our user registration in our website. once the registation is over they will get confirmation email to activate the account.

Just a reminder, in addition to DaveBaldwin's comment from technical viewpoint. Let's see another possibility from a non-technical perspective.

Even an email address is registered and activated, it does not mean the email owner would regularly access the email box and read your emails as you expect. People do use spammed email address to register some spam-looking services.

Therefore, there is NO 100% delivery guaranteed email.
0
Dave BaldwinFixer of ProblemsCommented:
Here is my PHP Email demo.  Although you may not need the javascript validation, you should provide proper headers as shown because some mail servers will reject email that is not properly formed.  Save this as "Email.php" and it will post to itself.  Put in your own email address for '$toText' on about line 20 and you can send yourself an email.
<?php
error_reporting(E_ALL);
ini_set('display_errors','1');

# some settings of POST vars
if (!isset($_POST['submit']))  $submit = ''; else $submit = $_POST['submit'];
if (!isset($_POST['subjectText'])) $subjectText = ''; else $subjectText = $_POST['subjectText'];
if (!isset($_POST['msgText'])) $msgText = ''; else $msgText = $_POST['msgText'];
if (!isset($_POST['ccText'])) $ccText = ''; else $ccText = $_POST['ccText'];
if (!isset($_POST['bccText'])) $bccText = ''; else $bccText = $_POST['bccText'];
if (!isset($_POST['nameText'])) $nameText = ''; else $nameText = $_POST['nameText'];
if (!isset($_POST['fromText'])) $fromText = ''; else $fromText = $_POST['fromText'];

if ($submit == "") {
    $title="Test Email Page";
    $announce="---";
}
else {
	if($fromText === "") die("No name!");
  $toText="youremail@yourdomain.com";
	$title="Test Email Page";
  $announce="Your Message has been Sent!";
	$header = "From: ".$fromText."\r\n";
//	$header .= "Cc: ".$ccText."\n";
	$header .= "Reply-To : ".$fromText."\r\n";
	$header .= "Return-Path : ".$fromText."\r\n";
	$header .= "X-Mailer: PHP\r\n";
	$header .= "MIME-Version: 1.0\r\n";
	$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
//	ini_set(sendmail_from,$fromText);  
	mail($toText, $subjectText, $msgText, $header, '-f'.$fromText);
//	ini_restore(sendmail_from);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo($title)?></title>
<style type="text/css">
<!-- 
A:link { color: #999999; }
A:visited { color: #999999; }
A:hover {color: #0099ff;}
-->
</style>
<script type="text/javascript">
<!--
function check()
{
var at=document.getElementById("fromText").value.indexOf("@");
var eml=document.getElementById("fromText").value;
var nam=document.getElementById("nameText").value;
var alerttxt="";
var submitOK="true";

if (eml.length < 5 || at == -1)
    {
    alerttxt=alerttxt+"Please enter a valid e-mail address!\r\n";
    submitOK="false"
    //return false;
    }
if (nam.length < 3)
    {
    alerttxt=alerttxt+"Please enter your name.\r\n";
    submitOK="false"
    //return false;
    }
if (submitOK=="false")
    {
    alert(alerttxt);
    return false;
    }

}
// -->
</script>
</head>

<body bgcolor="#ddeedd">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" summary="" width="580">
<tr><td align="center">

<?php
if ($submit != "") {
   	echo ("To: ".$toText."<br>\r\nSubject: ".$subjectText."<br>\r\n".$msgText."<br>\r\n".$header);
		}
?>

<p><b><font color="#000000" size="5">Test Email</font></b></p>
<font size="4" color="#000000">

<form method="POST" action="Email.php" onsubmit="return check();">
    <p><font size="3"><b>Name: <input type="text" name="nameText" id="nameText" size="46"></b></font></p>
    <p><font size="3"><b>Email: <input type="text" name="fromText" id="fromText" size="46"></b></font></p>
    <input type="hidden" name="subjectText" value="Web Mail">
    <p><font face="Arial" size="3"><b>Message Text:</b></font></p>
    <p><font face="Arial" size="3"><b><textarea rows="6" name="msgText" cols="60"></textarea></b></font></p>
    <p><font size="3"><b><input type="submit" value="submit" name="submit" style="font-family: Arial; font-size: 12pt; font-weight: bold"></b></font></p>
    <input type="hidden" name="state" value="1">
  </form>
  <b><font face="Arial" size="4" color="#e00000"><?php echo($announce)?></font></b><br><br>

</font>
</td></tr>
</table> 
</div>

</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rapidsivaAuthor Commented:
Thanks..
0
Ray PaseurCommented:
Here is how I handled it: http://www.constantcontact.com/index.jsp

What DaveBaldwin is telling you is correct.  The worst thing you can do is try to do all of this yourself, when a professional solution is available at a very, very modest cost.

This article may be helpful, whether you choose the professional solution or a "roll-your-own."
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3939-Registration-and-Email-Confirmation-in-PHP.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.