14 12834
Next time, try writing your message in the body, not in the subject line.
Also, as a common courtesy, please include your name, or at least your
handle, and email address. (It is smart to mask your email, such as "me AT
domain DOT com" so that webcrawlers can't add it to spam lists.) Lastly,
don't post a question that doesn't have anything to remotely do with PHP,
to the PHP group. Posting to the proper group will not only get you a
response faster, it will help keep the group on topic.
Thanks,
-Eric Kincl
There is a message body to type in you know.
The best way is probably export it to a text file, an email address on every
line, then get the file in php using file() and send an email to each one
seperately.
--
Perfect Partner http://www.PerfectPartner.tv/
Perhaps I did not post it correctly or explain myself well. Most people I
email appreciate putting the question in the subject line so they know what
I am asking for without reading the entire email. Live & learn.
I'd like to quickly develop a way send email to about 1000 people using php.
I thought about exporting the excel file to text then pasting & coding each
line as an array then looping through the array with mail().
Do you know of a quicker way?
"Eric Kincl" <Er**@Kincl.net _NO_SPAM_> wrote in message
news:3f******@n ews.gvsu.edu... Next time, try writing your message in the body, not in the subject line. Also, as a common courtesy, please include your name, or at least your handle, and email address. (It is smart to mask your email, such as "me
AT domain DOT com" so that webcrawlers can't add it to spam lists.) Lastly, don't post a question that doesn't have anything to remotely do with PHP, to the PHP group. Posting to the proper group will not only get you a response faster, it will help keep the group on topic.
Thanks,
-Eric Kincl
NotGiven wrote: Perhaps I did not post it correctly or explain myself well. Most people I email appreciate putting the question in the subject line so they know what I am asking for without reading the entire email. Live & learn.
I'd like to quickly develop a way send email to about 1000 people using php. I thought about exporting the excel file to text then pasting & coding each line as an array then looping through the array with mail().
Do you know of a quicker way?
"Eric Kincl" <Er**@Kincl.net _NO_SPAM_> wrote in message news:3f******@n ews.gvsu.edu... Next time, try writing your message in the body, not in the subject line. Also, as a common courtesy, please include your name, or at least your handle, and email address. (It is smart to mask your email, such as "me AT domain DOT com" so that webcrawlers can't add it to spam lists.) Lastly, don't post a question that doesn't have anything to remotely do with PHP, to the PHP group. Posting to the proper group will not only get you a response faster, it will help keep the group on topic.
Thanks,
-Eric Kincl
Hey,
I'm actually doing something to that extent right now. What it does is take
a string (from a textarea... it simply strips the \n tags so php sees it as
one huge string) and then it splits that string into an array of arrays.
(the way it works it could easily stand for rows and columns of an excel
sheet...) Here is the code I have so far. Keep in mind that I am actually
working on it this exact moment, and it may not be perfect, it seems to
work so far though for my means.
function string2namesArr ay(){
$Nsep = ";"; // Name separator
$FLsep = ","; // Last/First name Separator
if(isset($_REQU EST['names'])){
$names = $_REQUEST['names'];
// Compound the string - get rid of newlines, spaces, etc...
$names = str_replace(" ", "", $names);
$names = str_replace("\n ", "", $names);
$names = str_replace("\r ", "", $names);
// I forget which way it is on windows...
$names = str_replace("\n \r", "", $names);
$names = str_replace("\r \n", "", $names);
$names = str_replace("\t ", "", $names);
// Strip last ";", if present
// the last ";" apparently causes an extra array index that is unnessasary
// BETA CODE
if(strrpos($nam es, $Nsep) == (strlen($names) - 1)){
$names = substr($names, 0, (strlen($names) - 1));
}
// END BETA CODE
$namesArray = explode($Nsep, $names); // Split on ";" and make array
$i = 0;
while($namesArr ay[$i]){
// split on "," and make an array inside of index [i]
// Since there can only be first/last name, make max array length 2
$namesArray[$i] = explode($FLsep, $namesArray[$i], 2);
$i++;
}
return $namesArray;
}
}
To give you an idea of what this program does, there is a textarea in which
a person can enter a set of names in the following syntax:
last, first;
It then takes this list, and puts it into an array of arrays as follows:
String = "last, first; last2, first2;"
Array
(
[0] => Array
(
[0] => last
[1] => first
)
[1] => Array
(
[0] => last2
[1] => first2
)
)
Newlines etc don't bother it. If you could modify this slightly (I think
you just have to get rid of the "2" in this line:
$namesArray[$i] = explode($FLsep, $namesArray[$i], 2);
And that should do it... Also change the $FLsep and $Nsep to be whatever
the row/column seperators are in the text file.
Lastly, don't send multiple e-mails. This takes up a ton of bandwidth on
your end. CC it, or even better, BCC it so that those being emailed can't
see the other peoples email addresses. I don't know how to BCC in PHP, or
even email in PHP. Check php.net for that info.
Good Luck,
-Eric Kincl
thanks
"Eric Kincl" <Er**@Kincl.net _NO_SPAM_> wrote in message
news:3f******@n ews.gvsu.edu... NotGiven wrote:
Perhaps I did not post it correctly or explain myself well. Most people
I email appreciate putting the question in the subject line so they know what I am asking for without reading the entire email. Live & learn.
I'd like to quickly develop a way send email to about 1000 people using php. I thought about exporting the excel file to text then pasting & coding each line as an array then looping through the array with mail().
Do you know of a quicker way?
"Eric Kincl" <Er**@Kincl.net _NO_SPAM_> wrote in message news:3f******@n ews.gvsu.edu... Next time, try writing your message in the body, not in the subject
line. Also, as a common courtesy, please include your name, or at least your handle, and email address. (It is smart to mask your email, such as
"me AT domain DOT com" so that webcrawlers can't add it to spam lists.)
Lastly, don't post a question that doesn't have anything to remotely do with
PHP, to the PHP group. Posting to the proper group will not only get you a response faster, it will help keep the group on topic.
Thanks,
-Eric Kincl
Hey, I'm actually doing something to that extent right now. What it does is
take a string (from a textarea... it simply strips the \n tags so php sees it
as one huge string) and then it splits that string into an array of arrays. (the way it works it could easily stand for rows and columns of an excel sheet...) Here is the code I have so far. Keep in mind that I am
actually working on it this exact moment, and it may not be perfect, it seems to work so far though for my means.
function string2namesArr ay(){ $Nsep = ";"; // Name separator $FLsep = ","; // Last/First name Separator
if(isset($_REQU EST['names'])){ $names = $_REQUEST['names'];
// Compound the string - get rid of newlines, spaces,
etc... $names = str_replace(" ", "", $names); $names = str_replace("\n ", "", $names); $names = str_replace("\r ", "", $names); // I forget which way it is on windows... $names = str_replace("\n \r", "", $names); $names = str_replace("\r \n", "", $names); $names = str_replace("\t ", "", $names);
// Strip last ";", if present // the last ";" apparently causes an extra array index
that is unnessasary // BETA CODE if(strrpos($nam es, $Nsep) == (strlen($names) - 1)){ $names = substr($names, 0, (strlen($names) - 1)); } // END BETA CODE
$namesArray = explode($Nsep, $names); // Split on ";" and
make array $i = 0; while($namesArr ay[$i]){ // split on "," and make an array inside of index
[i] // Since there can only be first/last name, make
max array length 2 $namesArray[$i] = explode($FLsep, $namesArray[$i],
2); $i++; } return $namesArray; } }
To give you an idea of what this program does, there is a textarea in
which a person can enter a set of names in the following syntax: last, first; It then takes this list, and puts it into an array of arrays as follows: String = "last, first; last2, first2;" Array ( [0] => Array ( [0] => last [1] => first )
[1] => Array ( [0] => last2 [1] => first2 )
) Newlines etc don't bother it. If you could modify this slightly (I think you just have to get rid of the "2" in this line: $namesArray[$i] = explode($FLsep, $namesArray[$i], 2); And that should do it... Also change the $FLsep and $Nsep to be whatever the row/column seperators are in the text file.
Lastly, don't send multiple e-mails. This takes up a ton of bandwidth on your end. CC it, or even better, BCC it so that those being emailed can't see the other peoples email addresses. I don't know how to BCC in PHP, or even email in PHP. Check php.net for that info.
Good Luck,
-Eric Kincl
"NotGiven" <no****@nonegiv en.net> wrote in message
news:<1B******* ********@bignew s3.bellsouth.ne t>... need to send email to 1000 addresses (currently in MS Excel)- what's the best way to do that, create a mail forma and paste ALL 1000 addresses in the TO field?
Assuming your mailing is properly solicited, the "To: " field
should contain only one address, yours (just so that you can
confirm that the message has in fact been sent). Recipient's
addresses should go into the "Bcc: " field, separated by commas.
This way, the size of outgoing message will be smaller, plus
the receipients won't see who else received the mailing.
As to "the best way", you forgot to tell us one thing: the best
way to do WHAT? One-time mailing? Occasional mailings with
human-generated content? Periodic mailings with database-
generated content? Something else?
Cheers,
NC
Nikolai Chuvakhin wrote: "NotGiven" <no****@nonegiv en.net> wrote in message news:<1B******* ********@bignew s3.bellsouth.ne t>...
need to send email to 1000 addresses (currently in MS Excel)- what's the best way to do that, create a mail forma and paste ALL 1000 addresses in the TO field?
Assuming your mailing is properly solicited, the "To: " field should contain only one address, yours (just so that you can confirm that the message has in fact been sent). Recipient's addresses should go into the "Bcc: " field, separated by commas. This way, the size of outgoing message will be smaller, plus the receipients won't see who else received the mailing.
Good to know that that kind of spam won't reach me, as SMTP is blocking BCC
mail, checking that the to address is really a user on the system to where the
mail is sent.
As to "the best way", you forgot to tell us one thing: the best way to do WHAT? One-time mailing? Occasional mailings with human-generated content? Periodic mailings with database- generated content? Something else?
Just looking at the topic, seems to be one time spam and spam ain't nothing
that people wants to have.
//Aho The best way is probably export it to a text file, an email address on
every line, then get the file in php using file() and send an email to each one seperately.
I've done this when running PHP as a command-line program
using telnet; however, I need to run the same program on a server with
only ftp access. When I run the program as a web page, the connection
times out before all of the E-mails are sent. So, I have no idea if
it made it through the list or not.
--
Don Adams
On 2003-11-20, Don Adams <dg*@sgi.com> wrote: The best way is probably export it to a text file, an email address on every line, then get the file in php using file() and send an email to each one seperately.
I've done this when running PHP as a command-line program using telnet; however, I need to run the same program on a server with only ftp access. When I run the program as a web page, the connection times out before all of the E-mails are sent. So, I have no idea if it made it through the list or not.
user@host: man screen
Or write a little resume function.
--
verum ipsum factum This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bill |
last post by:
Hi All,
When I send html content with Excel MIME type, the page break style
sheet {page-break-before: always} doesn't work at Excel spreadsheet. Any
idea to convert html page break style sheet to Excel page break?
Thanks in advance
|
by: wylie72 |
last post by:
I would like to redirect a form to output it's recordset to Excel
rather than the Access report. I have the code to send SQL or a
recordset to Excel, but how do I extract the datasource from the
report? This would be at runtime, either when the form is called from
another form or on the on_open event of the report.
|
by: sunilkeswani |
last post by:
I would like ms access to send out an email through outlook, with a
speicific attachment, to a group of email IDs...
Could someone please help with the code? I use MS Acess 2000 & Outlook
2000
Cheers!
Sunny
|
by: giesss |
last post by:
I have been searching for a way to call a third party emailer to send mass emails from MS Access. Outlook thinks it is spam and asks the user to verify every email. I need to send many emails with an attachment without user input after the "Send email Button is clicked"
I mainly need to know about how to call and insert data into the To: the...
|
by: ad |
last post by:
I have save a Excel file to MemoryStream.
How can I send this MemoryStream to client's HD as a excel file?
| |
by: mattc |
last post by:
Hi,
Writing a Macro in Excel and wanting to send emails automatically without this pop up box "A program is trying to automatically send email on your behalf".
Is there some script I can use to avoid this pop up ?
I'm just a beginner.... please help.
Thanks !
|
by: fortwaynemarketplace |
last post by:
Need these two scripts;
1. (Action) script for email (outlook express or...) to come up in .swf enviroment. I have created a button (email us), need action scritps to send/recevie an email.
.
2. Submit form (Action) script to send infromation form out to my email from .swf enviroment.
You may send the information to...
|
by: Lloydm |
last post by:
I built a timesheet and finally got all my functions working.
Iv'e searched through the vb forum but had no luck finding a "print job" script. After saving file and before exit, I would like a script to prompt before exiting Excel to send the job to a printer. If user selects yes then print dialog window shows to select printer, if not do nothing...
|
by: edmundstephan |
last post by:
Hi all. how do I write a macro or module to send the results (excel) of a query only if it has data in it? It must not send the file if no results were returned.
I currently have a few Sendobject actions in an autoexec macro but it sends the query even if it has no data in it. I only want to send the object if it has data in it.
I am using...
|
by: mohan21_kumar |
last post by:
Hi,
I'm using oldbd driver to retirve the data from an excel file. When the particular column of an excel is blank and filled with one record at the last row of an excel, all the column value is showing as null.
Pls suggest me how to read the last row value. or send me a sample code which would help me in solving this.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |