massive email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nasht

    massive email

    Hi,

    I'm trying to make a newsletter application in php (using mail() ).
    This application is supposed to look in a MySQL database and generate a
    list of emails and first names.
    Then it should send an html formated message.
    In the theory, I know how to do that, but the hic is ... There are
    about 30 000 members.
    So I get different kind of errors everytime I try something.
    Like 500 Internal Server Error,
    or the page would load forever and actually not do everything,
    or I would get "Fatal error: Allowed memory size of 8388608 bytes
    exhausted at (null):0 (tried to allocate 129 bytes)" ...

    I tried both my sending multiple mail() functions in a loop (the way i
    prefer), and only one mail() function with the whole coma-separated
    list of emails.

    Is there an easy way to send massive email?
    Please help.

    Thank You,

    Nathan

  • mark

    #2
    Re: massive email

    Hello,

    I've never written an application to send such large batches of email,
    but I may be of some help. Since the script is going to take some time
    to run, it's not a good candidate for a web-based script. Instead, I
    would create a script (could still be written in PHP) that runs
    independently of the web server (e.g., apache) so you won't have to
    worry about timeouts, etc. Shell access would be very helpful for
    testing this.

    I would call mail() with one email address per call, not a large
    comma-separated list.

    Hopefully someone with specific experience with mass emailing can help
    more here.

    Mark Aardsma

    Comment

    • Geoff Berrow

      #3
      Re: massive email

      I noticed that Message-ID:
      <1103322243.951 216.260850@z14g 2000cwz.googleg roups.com> from nasht
      contained the following:
      [color=blue]
      >Then it should send an html formated message.[/color]

      Good. That'll make sure it hits the bit bucket good and fast with me.
      --
      Geoff Berrow (put thecat out to email)
      It's only Usenet, no one dies.
      My opinions, not the committee's, mine.
      Simple RFDs http://www.ckdog.co.uk/rfdmaker/

      Comment

      • Leythos

        #4
        Re: massive email

        In article <1103323246.871 888.146230@f14g 2000cwb.googleg roups.com>,
        mark@aatechserv ices.com says...[color=blue]
        > I've never written an application to send such large batches of email,
        > but I may be of some help.[/color]

        I don't know if it's been mentioned, but sending LARGE batches of email
        is very likely to get the sender black-listed or have their account
        yanked by their provider. I know of instances where sending just 2500
        emails, from a non-profit church, to people that provided their email
        address, got their service disconnected.

        --
        --
        spamfree999@rro hio.com
        (Remove 999 to reply to me)

        Comment

        • Michael Vilain

          #5
          Re: massive email

          In article <MPG.1c2d33b0d5 0d35e4989ce4@ne ws-server.columbus .rr.com>,
          Leythos <void@nowhere.l an> wrote:
          [color=blue]
          > In article <1103323246.871 888.146230@f14g 2000cwb.googleg roups.com>,
          > mark@aatechserv ices.com says...[color=green]
          > > I've never written an application to send such large batches of email,
          > > but I may be of some help.[/color]
          >
          > I don't know if it's been mentioned, but sending LARGE batches of email
          > is very likely to get the sender black-listed or have their account
          > yanked by their provider. I know of instances where sending just 2500
          > emails, from a non-profit church, to people that provided their email
          > address, got their service disconnected.
          >
          > --[/color]

          The non-profit I'm working with wants to do this to it's members. I
          said for them not to or they're loose their internet connection. I
          checked with their ISP and unless the list is double opt-in validated,
          service would terminated almost immediately. That was a wake-up call
          for them.

          As an alternative, the ISP offered access to their mailing-list server
          (majordomo) which is completely configurable. We created a list and you
          have to send email to an address to request to be put on it. Then
          confirm by replying a "Are you sure you want to do this?" email. It's a
          simple matter to provide a button on the web site to "sign me up for
          electronic notification" that sends the initial email.

          My advise, don't send the large batches of email unless you've confirmed
          the recipients want the email. And provide a way to "opt-out" when you
          ignore this advise and send out the emails anyway.

          --
          DeeDee, don't press that button! DeeDee! NO! Dee...



          Comment

          • Chung Leong

            #6
            Re: massive email


            "nasht" <nasht00@gmail. com> wrote in message
            news:1103322243 .951216.260850@ z14g2000cwz.goo glegroups.com.. .[color=blue]
            >
            > Is there an easy way to send massive email?
            > Please help.
            >[/color]

            Hire a spammer? Write your own variant of Netsky?


            Comment

            • nasht

              #7
              Re: massive email

              Thanks for those advices.

              For the first one given (run it on local), it's a good idea (except I
              run Windows on a laptop, which i think is not that great for php).
              Also it could only buy me a little bit more performance, not a large
              scale solution (the website I work for is growing fast).

              For the rest of the advices, they seemed more like legal advices.
              I'm not really concerned about the legal stuff, that's not my
              department :)
              But of course I'll forward them your comments about that (will they
              care? I don't know...)

              But back to the technical issue itself, there has to be a way.
              Very large scale companies do that sometimes (like Amazon, yahoo,
              microsoft...).
              Look up the email addresses, send them a message. It looks simple like
              that. How do they do it?
              They must have much more than 30 000 customers...

              Thank You,

              Nathan

              Comment

              • Stuart Millington

                #8
                Re: massive email

                On 17 Dec 2004 14:24:03 -0800, "nasht" <nasht00@gmail. com> wrote:
                [color=blue]
                >I'm trying to make a newsletter application in php (using mail() ).
                >This application is supposed to look in a MySQL database and generate a
                >list of emails and first names.
                >Then it should send an html formated message.[/color]

                Presumably you mean that it will send an HTML e-mail to those who
                chose bloat and plain text to those who did not?
                [color=blue]
                >In the theory, I know how to do that, but the hic is ... There are
                >about 30 000 members.[/color]

                IMO, your safest bet is to send the e-mail once - to an outsourced
                delivery service, based upon a "double opt-in" list. That way you send
                one e-mail and they handle the distribution to the validated
                recipients. I can't tell where you are posting from, but the details
                of a legitimate UK based service are at:


                There is a point where re-inventing the wheel is pointless, and
                30,000 recipients seems like you have passed it.

                --
                ------------------------------------------------------------------
                - Stuart Millington ALL HTML e-mail rejected -
                - mailto:phupp@ds v1.co.uk http://w3.z-add.co.uk/ -
                begin OE is broken read MS knowledgebase Q265230

                Comment

                • Stuart Millington

                  #9
                  Re: massive email

                  On Fri, 17 Dec 2004 15:58:15 -0800, Michael Vilain
                  <vilain@spamcop .net> wrote:
                  [color=blue]
                  >The non-profit I'm working with wants to do this to it's members. I
                  >said for them not to or they're loose their internet connection. I
                  >checked with their ISP and unless the list is double opt-in validated,
                  >service would terminated almost immediately. That was a wake-up call
                  >for them.[/color]

                  One of work's customers was told this before they signed up to us.
                  Almost a year later, after spaming me (postmaster at their "ISP") they
                  have stated that they will ignore our T&C's and continue to use their
                  non-verified mailing list which they compiled in the years before
                  their contract with us. I would like to terminate their account now,
                  but I'm the only person they've spam'ed so far and they are friends
                  with the company directors :(
                  [color=blue]
                  >As an alternative, the ISP offered access to their mailing-list server
                  >(majordomo) which is completely configurable. We created a list and you
                  >have to send email to an address to request to be put on it. Then
                  >confirm by replying a "Are you sure you want to do this?" email. It's a
                  >simple matter to provide a button on the web site to "sign me up for
                  >electronic notification" that sends the initial email.[/color]

                  I set that up for free for them (not Majordomo, which I've used for
                  internal lists, but a simpler script - mailman?) and they are still
                  unwilling to use it to validate their previously un-validated list. I
                  gave up :(

                  --
                  ------------------------------------------------------------------
                  - Stuart Millington ALL HTML e-mail rejected -
                  - mailto:phupp@ds v1.co.uk http://w3.z-add.co.uk/ -
                  begin OE is broken read MS knowledgebase Q265230

                  Comment

                  • Michael Vilain

                    #10
                    Re: massive email

                    In article <1h67s05kgmgf0q g0nm9djidigg79a c5kcc@4ax.com>,
                    Stuart Millington <news@dsv1.co.u k> wrote:
                    [color=blue]
                    > On Fri, 17 Dec 2004 15:58:15 -0800, Michael Vilain
                    > <vilain@spamcop .net> wrote:
                    >[color=green]
                    > >The non-profit I'm working with wants to do this to it's members. I
                    > >said for them not to or they're loose their internet connection. I
                    > >checked with their ISP and unless the list is double opt-in validated,
                    > >service would terminated almost immediately. That was a wake-up call
                    > >for them.[/color]
                    >
                    > One of work's customers was told this before they signed up to us.
                    > Almost a year later, after spaming me (postmaster at their "ISP") they
                    > have stated that they will ignore our T&C's and continue to use their
                    > non-verified mailing list which they compiled in the years before
                    > their contract with us. I would like to terminate their account now,
                    > but I'm the only person they've spam'ed so far and they are friends
                    > with the company directors :(
                    >[color=green]
                    > >As an alternative, the ISP offered access to their mailing-list server
                    > >(majordomo) which is completely configurable. We created a list and you
                    > >have to send email to an address to request to be put on it. Then
                    > >confirm by replying a "Are you sure you want to do this?" email. It's a
                    > >simple matter to provide a button on the web site to "sign me up for
                    > >electronic notification" that sends the initial email.[/color]
                    >
                    > I set that up for free for them (not Majordomo, which I've used for
                    > internal lists, but a simpler script - mailman?) and they are still
                    > unwilling to use it to validate their previously un-validated list. I
                    > gave up :([/color]

                    Just report the spammers to the Department of Homeland Security. Oops.
                    Wrong country. Never mind....

                    --
                    DeeDee, don't press that button! DeeDee! NO! Dee...



                    Comment

                    • Manuel Lemos

                      #11
                      Re: massive email

                      Hello,

                      on 12/17/2004 08:24 PM nasht said the following:[color=blue]
                      > I'm trying to make a newsletter application in php (using mail() ).
                      > This application is supposed to look in a MySQL database and generate a
                      > list of emails and first names.
                      > Then it should send an html formated message.
                      > In the theory, I know how to do that, but the hic is ... There are
                      > about 30 000 members.
                      > So I get different kind of errors everytime I try something.
                      > Like 500 Internal Server Error,
                      > or the page would load forever and actually not do everything,
                      > or I would get "Fatal error: Allowed memory size of 8388608 bytes
                      > exhausted at (null):0 (tried to allocate 129 bytes)" ...
                      >
                      > I tried both my sending multiple mail() functions in a loop (the way i
                      > prefer), and only one mail() function with the whole coma-separated
                      > list of emails.
                      >
                      > Is there an easy way to send massive email?[/color]

                      I use this class for years that has been optimized for bulk delivery.
                      Currently I use it to send newsletters and alert messages to about
                      100.000 active site subscribers every day.

                      It lets you compose send personalized bulk mail with both HTML and plain
                      text parts (do not send HTML only messages or else the messages may be
                      blocked and bounce).

                      You can even compose message bodies with Smarty templates and just
                      replace the template parameters to adjust the message for each
                      recipient. The class comes with one example on how to do that.

                      The class comes with a function SetBulkMail() function that hints the
                      class to optimize itself for bulk mailing campaigns.

                      The class has means to replace just parts of its body for each
                      recipient, so you do not have to rebuild the messages from scratch to
                      send it to the users. This is good not only because its faster, but also
                      because it preserves memory, which is one of your problems.

                      Anyway, keep in mind that mailings to many users last very long (read
                      possibly hours). You should override the PHP time limit using
                      set_time_limit( 0);

                      You probably need to run the mailing script off the Web server, probably
                      from a script started from cron or equivalent scheduler in your OS.



                      You should be ready to handle a flood of bounces of addresses that
                      became invalid. Get ready to unsubscribe them. The outgoing and ingoing
                      messages may fill up your MTA queue for a while. Make sure you have
                      plenty of free disk space.

                      If you are starting with a list of unverified address, you are strongly
                      recommended to clean them up first. You may want to try this class first
                      to figure which addresses are permanently invalid:




                      --

                      Regards,
                      Manuel Lemos

                      PHP Classes - Free ready to use OOP components written in PHP
                      Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


                      PHP Reviews - Reviews of PHP books and other products


                      Metastorage - Data object relational mapping layer generator

                      Comment

                      • R. Rajesh Jeba Anbiah

                        #12
                        Re: massive email

                        nasht wrote:[color=blue]
                        > Hi,
                        >
                        > I'm trying to make a newsletter application in php (using mail() ).
                        > This application is supposed to look in a MySQL database and generate[/color]
                        a[color=blue]
                        > list of emails and first names.
                        > Then it should send an html formated message.
                        > In the theory, I know how to do that, but the hic is ... There are
                        > about 30 000 members.
                        > So I get different kind of errors everytime I try something.
                        > Like 500 Internal Server Error,
                        > or the page would load forever and actually not do everything,
                        > or I would get "Fatal error: Allowed memory size of 8388608 bytes
                        > exhausted at (null):0 (tried to allocate 129 bytes)" ...[/color]

                        First of all, AFAIK, PHP's mail function is not indented to send
                        bulk mails. But, 30,000 is still less to be considered bulk. The
                        problem I guess with you is that your handling of data--you may need to
                        optimize your buffer and querying mechanism.

                        Queuing using some C code could speed up the process. Google to find
                        out such techniques.
                        [color=blue]
                        > Is there an easy way to send massive email?[/color]

                        AFAIK, there is no way to send "massive" emails freely; many
                        commercial subscription services are there, say for example LISTSERV

                        --
                        <?php echo 'Just another PHP saint'; ?>
                        Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                        Comment

                        • Admin

                          #13
                          Re: massive email

                          In article <1h67s05kgmgf0q g0nm9djidigg79a c5kcc@4ax.com>, news@dsv1.co.uk
                          says...[color=blue]
                          > On Fri, 17 Dec 2004 15:58:15 -0800, Michael Vilain
                          > <vilain@spamcop .net> wrote:
                          >[color=green]
                          > >The non-profit I'm working with wants to do this to it's members. I
                          > >said for them not to or they're loose their internet connection. I
                          > >checked with their ISP and unless the list is double opt-in validated,
                          > >service would terminated almost immediately. That was a wake-up call
                          > >for them.[/color]
                          >
                          > One of work's customers was told this before they signed up to us.
                          > Almost a year later, after spaming me (postmaster at their "ISP") they
                          > have stated that they will ignore our T&C's and continue to use their
                          > non-verified mailing list which they compiled in the years before
                          > their contract with us. I would like to terminate their account now,
                          > but I'm the only person they've spam'ed so far and they are friends
                          > with the company directors :(
                          >[color=green]
                          > >As an alternative, the ISP offered access to their mailing-list server
                          > >(majordomo) which is completely configurable. We created a list and you
                          > >have to send email to an address to request to be put on it. Then
                          > >confirm by replying a "Are you sure you want to do this?" email. It's a
                          > >simple matter to provide a button on the web site to "sign me up for
                          > >electronic notification" that sends the initial email.[/color]
                          >
                          > I set that up for free for them (not Majordomo, which I've used for
                          > internal lists, but a simpler script - mailman?) and they are still
                          > unwilling to use it to validate their previously un-validated list. I
                          > gave up :(
                          >
                          >[/color]

                          Just catching up on the group here but you might be interested.

                          If you are _so_ set on getting away from that spamming ISP.
                          Sign the directors email up to their list.
                          If the list is as bad as you say, they will get an inside view of the
                          situation and either agree with you or find another solution.

                          Comment

                          Working...