SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Location
    Surrey, UK
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP mail function and BCC

    Hi,

    I have a website for a client which allows them to email their users, which is handled using PHP's mail function and a BCC header. This works on the tests I've done to a few addresses but the client doesn't think it's working when sending to all their customers (just over 2000).

    I've read about the limit of 998 characters on any one line but does this apply to headers too and is it still relevant?

    I'm also wondering if there's a limit to the number of addresses that can be included in a BCC field but googling hasn't really given me an answer.

    Does anyone have any thoughts/advice on this? I'm going to ask the ISP if there's a limit on sending mail too in case that's the problem.

    Thanks,

    Martin.

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2006
    Location
    Gold Coast, Australia
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well most of the time - even if returned true - mail fails due to headers.

    Why not use something already tested and tried like PHPMailer with the isSMTP() option.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Most hosting providers will have some sort of limit on the number of emails that can be sent in a given period. Sending 2000 emails all at once is almost certainly going to exceed those limits.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Location
    Surrey, UK
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, thanks. I had been considering using something like PHPMailer but seeing as I've not used it before I was hoping there'd be a simple answer

    So will there not be the same restriction on the number of emails sent at one time when using PHPMailer? And is it easy to use?

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,862
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by martbean View Post
    So will there not be the same restriction on the number of emails sent at one time when using PHPMailer?
    If your hosting provider limits the number of emails you can send in a given period then all emails sent in that time count toward the total regardless of how you create them.

    Each To: CC: and BCC: address counts as another email to be sent regardless of whether they are all sent at once or sent separately.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •