Mail to a list of people

2013-08-13  Source: Original Site  Category:PHP  Views:0 


I'm trying to mail a newsletter to a list of people, but I get an error every time it tries to mail. Anyone know what I'm doing wrong?

$file = fopen("upload/newletter.html", "r");
$sub = fopen("to.txt", "r");
$x = 0;
$y = 0;
while (!feof($sub))
$names[$x] = fgets($sub);
while (!feof($file))
$content = $content . fgets($file);

echo $content;
$x = 1;
while ($x <= $y)
mail($names[$x], "Branches and Roots Weekly Newsletter", "Testing");

Heres the error I get:
Warning: mail(): Bad parameters to mail() function, mail not sent. in (Directory) on line 19

Related articles
  • Mail to a list of people 2013-08-13

    I'm trying to mail a newsletter to a list of people, but I get an error every time it tries to mail. Anyone know what I'm doing wrong? <?php$file = fopen("upload/newletter.html", "r");$sub = fopen("to.txt", "r");$x = 0;$y = 0;while (!feof($sub)){$

  • Input E-Mail Address, Return Mail Exchange (MX) List? 2014-06-11

    Input E-Mail Address, Return Mail Exchange (MX) List? Could anybody help me figure out how to input an e-mail address to a function, query the DNS server, and return a CString Array of the MX Servers? I found some code on the net that returns ONE MX

  • mail() with big lists 2014-08-12

    Howdy I have a mailing list with about 1500 addresses. Rather than loop mail() for each address, it was recommended to me to put them all in the headers as bcc and only send off 1 email. Im just curious whether this is good practice or if there is a

  • creating a list of people's emails 2012-06-28

    i have created a site ( which asks users to register with their e-mail address. I want to create a list of these saved into a file (mailinglist.txt) which i can then use to send e-mails out to those registered. My problem is that u

  • Pulling up data from a page that has lists of people with one button by the name 2012-11-10

    After doing a search (using drop downs, text boxes, etc.) I get a web page that returns the matches from the database table (A). It lists the names of the people and has a button next to them (I used a post-form submit button- not sure that's the way

  • Mail a selected list out of SQL a PDF-file 2013-05-01

    I'm not an experienced SQL or VB-programmer. I can programm basic things in VBA and can read VBS and VB-programms Now I have to send a PDF-file to a lot of people in a SQL-table, based on customergroup Making a selection is no problem but how do I se

  • Oracle Send mail to distribution list using UTL_MAIL.SEND 2013-12-04

    Oracle Does UTL_MAIL.SEND support sending mail to a distribution list?. The doc says, the recipient mail-id should be separated by a comma. The distribution list has mail-id separated by a comma. I executed a test case sending a mail to a

  • Security Context on Project - Limit the owner list to people that have access to the project 2014-09-30

    I have setup Security Context on our project field. I want to be able to modify the Owner list so that it only shows up people that have access to the project. Currently it is grabbing all of the users that have access to the user database. With this

  • Creating an e-mail drop down list 2014-10-03

    I wonder if anyone can help me? I am creating an online absence form using MS FRONT PAGE 2003. The form I have created will be sent to 3 people, HR dept, Payroll and the persons line manager. Can anybody tell me how I can create a some sort of linkin

  • Send mail to more than 100 people 2014-10-15

    I m working for a company who does marketing. We are developing a tool to send personalized mails in bulk i.e. with different salutation for different client. We are using cdosys object. But the page shows an error (something 8002040f ),without any d

  • using mail() to send to multiple people 2012-07-09

    I'm trying to send a message to everyone that I have in a database. The database has only one column. I'm just not sure how to get all of the names into the mail prototype mail($to, $subject, $message, $from). I tried to treat it like an array where

  • How to implement a list of people 2013-03-05

    One of the entities in my database concerns details of meetings, i.e. meeting reference #, location, date, etc. It also has to include the people who were present at each meeting. Clearly this is a problem, as there is usually around 11 people at eac

  • mail function with list inside text file 2014-03-15

    I have a few text files that include a few hundred email addresses each separated by new lines. I need to use the mail() command to send a separate email to each email. I know how to do this using a database, but I can't figure out how to with fopen(

  • mass e-mail from database list time-out? 2014-07-06

    I've got a script which sends out a newsletter to all the subscribers in my database. BUT, it takes forever! I know I can extend my timeout length to avoid that, but I would like to have a server-side program to send the e-mails for me (rather than w

  • Help with nested loop 2014-10-15

    I am trying to send e-mails to a list of people and filter the results they see in the e-mail based on a query. I tried with a nested loop, but am just getting multiple e-mails to the same person, with all the information (not filtered). I realize my

  • Ubuntu new member list and new mail list? 2012-11-17

    Just wondering how good our team list of members is. The one on the website seems old, and new people seem to be popping up here. Plus I would like to know if we have a good mailing list. If not, could you set one up joey? I think we should work on t

  • Ubuntu LinuxChix Mailing Lists 2013-12-01

    From the site: "Subscribing To subscribe to the LinuxChix mailing lists, go to the appropriate page (linked below) and follow the directions there. The lists now have web-based interfaces, which simplify the process a great deal. A quick note for peo

  • Ubuntu Mailing list are now useless 2014-02-13

    The Ubuntu-users mailing list haves now become so bloated with swearing, flaming, and personal attacks that it haves become useless. I would not suggest it to anyone and suggest Canonical either step in and do something or delete the list all togethe

  • Ubuntu Evolution mail client`s message filter for a contact list ? 2014-08-05

    I can create a message filter with rule as : sender is [email protected], and filter mails from that someone to a folder. but how can I create a message filter for a contact list, filtering mails from that group of people to a certain folder? There sho

  • cleaning up an old e-mail list 2013-04-21

    I have an e-mail list that I have been collecting for a few years now, and I know that many of the e-mails in the list are probably invalid. I send out a newsletter to this list and I can see in the mail log that some of the mail servers respond that