Send a mail without going to spam

This is a discussion on Send a mail without going to spam within the PHP Language forums, part of the PHP Programming Forums category; I've made a script that sends mails, and it sends mails correctly for gMail, but not for Hotmail. What ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-16-2007
RageARC
 
Posts: n/a
Default 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.
?>

Reply With Quote
  #2 (permalink)  
Old 09-16-2007
Jerry Stuckle
 
Posts: n/a
Default 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
==================
Reply With Quote
  #3 (permalink)  
Old 09-16-2007
Sanders Kaufman
 
Posts: n/a
Default 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.
Reply With Quote
  #4 (permalink)  
Old 09-17-2007
Jerry Stuckle
 
Posts: n/a
Default 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
==================
Reply With Quote
  #5 (permalink)  
Old 09-17-2007
Sanders Kaufman
 
Posts: n/a
Default 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.

Reply With Quote
  #6 (permalink)  
Old 09-17-2007
Jerry Stuckle
 
Posts: n/a
Default 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
==================
Reply With Quote
  #7 (permalink)  
Old 09-17-2007
Sanders Kaufman
 
Posts: n/a
Default 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.
Reply With Quote
  #8 (permalink)  
Old 09-17-2007
Manuel Lemos
 
Posts: n/a
Default 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/
Reply With Quote
  #9 (permalink)  
Old 09-17-2007
Satya
 
Posts: n/a
Default Re: Send a mail without going to spam

On Sep 16, 8:27 pm, RageARC <rage...@gmail.com> 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.
> ?>


U will face other problems as well like attachment etc. I also tried
very hard whenever I got job for mail and got success after hard work
if i got struck anywhere. That is useless if you have good free
package for this.
so check this: http://satya61229.blogspot.com/2007/...cripts_17.html

Reply With Quote
  #10 (permalink)  
Old 09-17-2007
Jerry Stuckle
 
Posts: n/a
Default Re: Send a mail without going to spam

Sanders Kaufman wrote:
> 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.


You are not relaying them, then. You are acting as their mail MTA.

And NorTel's intranet servers are not publicly available. Nor are
GTE's. I don't know about your clients.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0