0
I want to send an email to many people but it doesn’t work when I try to send to a 5 go. Code . php
<?
require('config.php');
$sqlstt = "SELECT * FROM tb_site WHERE id='1'";
$resultstt = mysql_query($sqlstt);
$rowtt = mysql_fetch_array($resultstt);
$sitename = $rowtt['sitename'];
$supmails = $rowtt['sitepp']; // E-mail Suporte.
$supmail = ""; // Envio do email.
$nome_remetente = "Email Marketing $sitename";
$assunto = strtoupper($user).", E-Mail Marketing";
$email_remetente = $supmails;
// Inicio do envio de menságem para o usuário //
// Conteudo do e-mail (voce poderá usar HTML) //
$mensagem = "
teste msg
";
// Cabeçalho do e-mail. Nao é necessário alterar geralmente...
$cabecalho = "MIME-Version: 1.0\n";
$cabecalho .= "Content-Type: text/html; charset=iso-8859-1\n";
$cabecalho .= "From: \"{$nome_remetente}\" <{$email_remetente}>\n";
$cabecalho .= "Bcc: [email protected] \n";
// Dispara e-mail e retorna status para variável
$status_envio = @mail ($assunto, $mensagem, $cabecalho);
// Se mensagem foi enviada pelo servidor…
if ($status_envio)
{ echo "Uma menságem foi enviada para o e-mail do usuário!<br />";
}
// Se mensagem nao foi enviada pelo servidor…
else {
echo "Nao conseguimos enviar a sua menságem ao usuário!<br />";
}
?>
Can you send to at least one or two people? If yes then this shouldn’t be a code problem. Most Mtas have well-defined rules about outgoing emails. Email marketing solutions generally use dedicated Mtas with more relaxed restrictions (simply so that emails can stop at the recipient’s side SPAM box :D).
– Anthony Accioly
I can send to 50 people more than that does not send have to change the limit?
– feliphe felix
You are looking to create email marketing campaigns or similar. When we are working with large volumes of emails there are several factors to consider besides the code itself (see this reply from Soen: http://stackoverflow.com/a/3860043/664577). Several factors may be limiting your upload, starting with the MTA output filters themselves as per my comment above.
– Anthony Accioly
In short, my advice here is to involve the infrastructure and network teams (you’ll need a privileged account to send mass emails, as well as a whole infrastructure preparation to not overload your servers). I also don’t recommend that you try writing something from scratch (it’s a lot of detail to think about), instead use one of the many existing tool options (Mailman, Swiftmailer, Phplist, Openemm, etc).
– Anthony Accioly