NYCPHP Meetup

NYPHP.org

[nycphp-talk] can't get php to work

Federico Ulfo rainelemental at gmail.com
Fri Mar 16 12:02:22 EDT 2012


Yup, also shared hosting often are hacked used to send mass email, and
obviously black listed, so it depends by the security level of the receiver
of the email if the email go into inbox or spam!

I did a few mass mail using SMTP, they are slow, like one email every 1-3
seconds, and PHP wait for the email to be sent,  so to avoid users waiting
for the email sending, you want to setup a mail pipeline and a chron job,
or, using some trick like opening the script the send the email into an
iframe.


On Fri, Mar 16, 2012 at 11:49 AM, Peter Lehrer <plehrer at gmail.com> wrote:

> OK, Thanks. I installed sendmail on my local machine and got it to
> work. However, when I send it to my gmail account, it goes into spam.
> This is probably due to the reason Chris enumerated.
>
> Peter
>
> On Fri, Mar 16, 2012 at 11:42 AM, Chris Snyder <chsnyder at gmail.com> wrote:
> > On Fri, Mar 16, 2012 at 9:11 AM, Peter Lehrer <plehrer at gmail.com> wrote:
> >> Hi,
> >> I am trying to get the php mail function to work. I have a website
> >> running Apache2 and PHP Version 5.3.3-7+squeeze8 on Debian. I tried to
> >> get a test email message working. Here is my code:
> >>
> >> <?php
> >> $to = "plehrer at gmail.com";
> >> $subject = "Test mail";
> >> $message = "Hello! This is a simple email message.";
> >> $from = "plehrer at me.outlook.com";
> >> $headers = "From:" . $from;
> >> mail($to,$subject,$message,$headers);
> >> echo "Mail Sent.";
> >> ?>
> >>
> >> Can anybody help me?
> >>
> >
> > Best way to debug mailing issues is to view the mail log and see if
> > there are any clues as to what went wrong. On Debian, it is at
> > /var/log/mail.log
> >
> > Very often mail problems have to do with anti-spam controls in
> > receiving systems. Most big email companies will only accept mail from
> > servers with a reverse-DNS record that maps the IP address to a real
> > name. Also, you may be running up against SPF records created by
> > outlook.com that prevent forging mail from that address.
> >
> > One thing I notice in your script is a missing space after the colon in
> "From:".
> > _______________________________________________
> > New York PHP User Group Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > http://www.nyphp.org/show-participation
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show-participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20120316/da1ed6c1/attachment.html>


More information about the talk mailing list