PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Send a mail without going to spam
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Send a mail without going to spam

Réponse
 
LinkBack Outils de la discussion
Vieux 16/09/2007, 16h27   #1
RageARC
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Send a mail without going to spam

I've made a script that sends mails, and it sends mails correctly for
gMail, but not for Hotmail. What happens is that on Hotmail the mails
are not even received! Nor on spam box, nor on inbox.

$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";

mail($to, $subject, $message, $headers);

This is the important info on the mail. The subject is a string, the
$to and the $from are emails and the $message is HTML.
?>

  Réponse avec citation
Vieux 16/09/2007, 18h50   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

RageARC wrote:
> I've made a script that sends mails, and it sends mails correctly for
> gMail, but not for Hotmail. What happens is that on Hotmail the mails
> are not even received! Nor on spam box, nor on inbox.
>
> $headers = "From: $from\r\n";
> $headers .= "Content-type: text/html\r\n";
>
> mail($to, $subject, $message, $headers);
>
> This is the important info on the mail. The subject is a string, the
> $to and the $from are emails and the $message is HTML.
> ?>
>


To start with, get a copy of an email which was received Ok by HotMail,
and one of yours which was rejected.

Start by comparing the headers. Most of the time that will show a problem.

Other possibilities include your server being on a spam blacklist, etc.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 16/09/2007, 21h55   #3
Sanders Kaufman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

RageARC wrote:
> I've made a script that sends mails, and it sends mails correctly for
> gMail, but not for Hotmail. What happens is that on Hotmail the mails
> are not even received! Nor on spam box, nor on inbox.
>
> $headers = "From: $from\r\n";
> $headers .= "Content-type: text/html\r\n";
>
> mail($to, $subject, $message, $headers);
>
> This is the important info on the mail. The subject is a string, the
> $to and the $from are emails and the $message is HTML.
> ?>


What you send through the mail relays isn't always what's received by
the final recipient. A lot of headers get mucked with in transit.

So, to get a solid answer - you need one of those bounced messages.

Still, the most likely problem is that Hotmail actually black-listed
your domain, or more likely your domain's mail relay. So for example,
even though your domain is "honest.com", you may find that you're
sending your mail through "spammer.de".

It may cost a nickel or two, but sending your mail out through a third
party SMTP server that uses SSL, instead of your hosting providers
default mail relay may allow the mail to go through.
  Réponse avec citation
Vieux 17/09/2007, 03h26   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

Sanders Kaufman wrote:
> RageARC wrote:
>> I've made a script that sends mails, and it sends mails correctly for
>> gMail, but not for Hotmail. What happens is that on Hotmail the mails
>> are not even received! Nor on spam box, nor on inbox.
>>
>> $headers = "From: $from\r\n";
>> $headers .= "Content-type: text/html\r\n";
>>
>> mail($to, $subject, $message, $headers);
>>
>> This is the important info on the mail. The subject is a string, the
>> $to and the $from are emails and the $message is HTML.
>> ?>

>
> What you send through the mail relays isn't always what's received by
> the final recipient. A lot of headers get mucked with in transit.
>
> So, to get a solid answer - you need one of those bounced messages.
>
> Still, the most likely problem is that Hotmail actually black-listed
> your domain, or more likely your domain's mail relay. So for example,
> even though your domain is "honest.com", you may find that you're
> sending your mail through "spammer.de".
>
> It may cost a nickel or two, but sending your mail out through a third
> party SMTP server that uses SSL, instead of your hosting providers
> default mail relay may allow the mail to go through.


Mails should not be relayed. They should go directly from your MTA to
the recipients MTA.

Relays are an indication of an insecure system - typically used by
spammers. But genuine MTA's don't use (or need) them.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 17/09/2007, 03h45   #5
Sanders Kaufman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

Jerry Stuckle wrote:

> Mails should not be relayed. They should go directly from your MTA to
> the recipients MTA.
>
> Relays are an indication of an insecure system - typically used by
> spammers. But genuine MTA's don't use (or need) them.


Actually - thoroughly secured email systems make use of more than just
those two.

In large, well-secured, corporate email systems, mail often goes through
several relays that perform various security actions.

At Nortel, they relay through several Exchange servers on the way out
of, and into, the network. At GTE, they relay(ed) through a wildly
complex Banyan Vines system.

It's sometimes quite interesting to check out the headers on various
corporate emails because they go through SO MUCH e-bureaucracy.

  Réponse avec citation
Vieux 17/09/2007, 04h16   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

Sanders Kaufman wrote:
> Jerry Stuckle wrote:
>
>> Mails should not be relayed. They should go directly from your MTA to
>> the recipients MTA.
>>
>> Relays are an indication of an insecure system - typically used by
>> spammers. But genuine MTA's don't use (or need) them.

>
> Actually - thoroughly secured email systems make use of more than just
> those two.
>
> In large, well-secured, corporate email systems, mail often goes through
> several relays that perform various security actions.
>
> At Nortel, they relay through several Exchange servers on the way out
> of, and into, the network. At GTE, they relay(ed) through a wildly
> complex Banyan Vines system.
>
> It's sometimes quite interesting to check out the headers on various
> corporate emails because they go through SO MUCH e-bureaucracy.
>


You're right - internally they may be relayed. But once they're out of
the intranet and into the internet, there should be no relays.

I was referring to the publicly visible site - and I should have made
myself more clear about it.

Thanks for the correction.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 17/09/2007, 04h41   #7
Sanders Kaufman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

Jerry Stuckle wrote:
> Sanders Kaufman wrote:


>> It's sometimes quite interesting to check out the headers on various
>> corporate emails because they go through SO MUCH e-bureaucracy.

>
> You're right - internally they may be relayed. But once they're out of
> the intranet and into the internet, there should be no relays.


Nicht vahr - there are perfectly good reasons to relay there, as well.

For example I have my domain (kaufman.net) which hosts several client
domains. They want me to provide some value-added services to their
email without them having to get involved.

So what I do is relay their mail through kaufman.net. That way, when
they check their POP or send via SMTP, they don't have to concern
themselves with incoming spam filtering and outgoing content management.
(In truth, I don't do very much - but it makes them *feel* better.)


> I was referring to the publicly visible site - and I should have made
> myself more clear about it.


What do you mean by "publicly visible"?
NorTel.com is a publicly visible site.
As was GTE.
As are my clients.
  Réponse avec citation
Vieux 17/09/2007, 08h24   #8
Manuel Lemos
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Send a mail without going to spam

Hello,

on 09/16/2007 12:27 PM RageARC said the following:
> I've made a script that sends mails, and it sends mails correctly for
> gMail, but not for Hotmail. What happens is that on Hotmail the mails
> are not even received! Nor on spam box, nor on inbox.
>
> $headers = "From: $from\r\n";
> $headers .= "Content-type: text/html\r\n";
>
> mail($to, $subject, $message, $headers);
>
> This is the important info on the mail. The subject is a string, the
> $to and the $from are emails and the $message is HTML.
> ?>


You should never send HTML only messages. You can send HTML messages if
they have an alternative text part, like any regular mail program. Since
you do not do that, Hotmail correctly assumes you are not using a
regular mail program, and considers your message as junk.

To send HTML messages with an alternative text part, you need to compose
a multipart/alternative message and include both the text part and the
HTML part. This is a bit tricky to do manually. I use this MIME message
composing and sending class. Take a look at the example script
test_simple_html_mail_message.php .

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h32.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16038 seconds with 16 queries