473,796 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Personalized Email Script

I'm posting in desperation and hopes that someone has a script that will
achieve these objectives:

1. Web interface using forms collects Name, Address, Email Address.
2. Web interface sends this info to a PHP script.
3. PHP script has pre-entered text.
4. Name, Address, and Email Address are appended to the END of the
outgoing email message.
5. The outgoing email address shows the "From" as the Email Address.
6. THE PROBLEM: The PHP script has 55 pre-entered email addresses. The
script sends the email individually to each of the 55 people pre-entered
such that the To: line contains only one email address.

Help! Anybody got such a script? I tried writing one, but I'm not even a
Newbie yet, so I did not have any success.

I tried using MailMan for the distribution, which works fairly well, but
the To: line includes some garbage, like "Sent by <listname> on behalf
of <originalsender >".
Jul 17 '05 #1
9 2324
I noticed that Message-ID:
<d5************ *************** ***@news.terane ws.com> from mcp6453
contained the following:
6. THE PROBLEM: The PHP script has 55 pre-entered email addresses. The
script sends the email individually to each of the 55 people pre-entered
such that the To: line contains only one email address.

Help! Anybody got such a script? I tried writing one, but I'm not even a
Newbie yet, so I did not have any success.


Try again, it's pretty easy.

//Put your addresses in an array

//e.g.

$addresses=arra y("address1", "address2", "address_n" )

//Then set up subject

$subject ="some subject";

//The message...

$message="some message \n";

//Add the POSTed stuff

$message.=$_POS T['name']."\n";
$message.=$_POS T['address']."\n";
$message.=$_POS T['email']."\n";

Then loop through them to send the mails

for($i=0;$i<cou nt($addresses); $i++){

mail($addresses[$i],$subject,$mess age);
}

--
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/
Jul 17 '05 #2
Geoff Berrow wrote:
Then loop through them to send the mails

for($i=0;$i<cou nt($addresses); $i++){

mail($addresses[$i],$subject,$mess age);
}


I prefer:

foreach ($addresses as $addr) {
mail($addr, $subject, $message);
}

:-)

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #3
Pedro Graca wrote:

Geoff Berrow wrote:
Then loop through them to send the mails

for($i=0;$i<cou nt($addresses); $i++){

mail($addresses[$i],$subject,$mess age);
}


I prefer:

foreach ($addresses as $addr) {
mail($addr, $subject, $message);
}

Thanks to both of you for posting this solution. I wondered about using
foreach!
Jul 17 '05 #4
mcp6453 wrote:
6. THE PROBLEM: The PHP script has 55 pre-entered email addresses.
The script sends the email individually to each of the 55 people
pre-entered such that the To: line contains only one email address.

Use BCC: instead of To:

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 17 '05 #5
Brian wrote:
mcp6453 wrote:
6. THE PROBLEM: The PHP script has 55 pre-entered email addresses.
The script sends the email individually to each of the 55 people
pre-entered such that the To: line contains only one email address.

Use BCC: instead of To:


The use of BCC only may result in your email being tossed as a number of
companies do not allow BCC-only (nothing in the To: field) to be
processed as it is generally considered SPAM.

Michael Austin.
Jul 17 '05 #6
Michael Austin wrote:
Brian wrote:
Use BCC: instead of To:


The use of BCC only may result in your email being tossed as a
number of companies do not allow BCC-only (nothing in the To:
field) to be processed as it is generally considered SPAM.


I didn't know that. I suppose you could put a dummy item in the to:
field. That's the way Pine worked, IIRC. I mailed playlists to record
labels using e.g.,
To: Program Playlists
Bcc: la***@example.c om

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 17 '05 #7
On Wed, 07 Jul 2004 01:05:19 GMT, Michael Austin
<ma*****@firstd basource.com> calmly ranted:
Brian wrote:
mcp6453 wrote:
6. THE PROBLEM: The PHP script has 55 pre-entered email addresses.
The script sends the email individually to each of the 55 people
pre-entered such that the To: line contains only one email address.

Use BCC: instead of To:


The use of BCC only may result in your email being tossed as a number of
companies do not allow BCC-only (nothing in the To: field) to be
processed as it is generally considered SPAM.


Can't you use your own address (or a default address) in the
To: field and then send the rest to BCC:?
----------------------------------------------
Never attempt to traverse a chasm in two leaps
http://www.diversify.com Comprehensive Website Design
=============== =============== =============== ==============

Jul 17 '05 #8
On Tue, 06 Jul 2004 20:56:41 -0700, Larry Jaques
<novalidaddress @di\/ersify.com> wrote:
On Wed, 07 Jul 2004 01:05:19 GMT, Michael Austin
<ma*****@first dbasource.com> calmly ranted:
Brian wrote:
mcp6453 wrote:

6. THE PROBLEM: The PHP script has 55 pre-entered email addresses.
The script sends the email individually to each of the 55 people
pre-entered such that the To: line contains only one email address.

Use BCC: instead of To:


The use of BCC only may result in your email being tossed as a number of
companies do not allow BCC-only (nothing in the To: field) to be
processed as it is generally considered SPAM.


Can't you use your own address (or a default address) in the
To: field and then send the rest to BCC:?


He could use php to send one message to a Majordomo Listserv and have
the listserve expand the names. Each user would get their own and the
majordomo list would be easily updatable.
--
gburnore@databa six dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
=============== =============== =============== =============== ===============
Want one? GET one! http://www.databasix.com
=============== =============== =============== =============== ===============
Jul 17 '05 #9
Hello,

On 07/07/2004 12:32 AM, Brian wrote:
The use of BCC only may result in your email being tossed as a
number of companies do not allow BCC-only (nothing in the To:
field) to be processed as it is generally considered SPAM.

I didn't know that. I suppose you could put a dummy item in the to:
field. That's the way Pine worked, IIRC. I mailed playlists to record
labels using e.g.,
To: Program Playlists
Bcc: la***@example.c om


That is not the problem. The problem is that the messages are discarded
if the actual recipient that you set in Bcc: is not in a visible header
(To: or Cc:) denoting that the message was not really for the recipient
but rather some bulk mailing.

Hotmail started classifying messages like this as spam, depending on the
filtering level, which is bad because it affects messages sent to
mailing lists.

If you really want to reach Hotmail users and of other systems that make
this kind of filtering you have no choice than sending separate
messages to each of them.

Since you do not want to personalize the messages, you may want to try
this class that can compose and send messages. It comes with a feature
of caching messages between deliveries to avoid regenerating the message
body while you can still change the To: header for each recipient.

http://www.phpclasses.org/mimemessage

Bulk mailing is an heavy task but at least you can save some time
optimizing some heavy parts.

There are other types of optimizitions but those depend on the mail
system that you use. Just mail me privately so I can tell you more on
this without having you to disclose unnecessary details in public.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
8802
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I will probably use a hyperlink with a unique ID, but I also want to know how to go about reading from a mailbox with Php so I can use an email reply method, too. I'm having trouble finding any kind of tutorial. From the bit of searching I've done,...
2
1779
by: Tyler Lyon | last post by:
I am trying to find a free script that allows a user to register and login to their own personalized page that was automatically created when the user registered. I am creating a website where the users can access their personal page by logging in and on that page they can find correspondence and their history with me, etc. Can you please help me with finding a free script that does all of this? Thanks in advance, Tyler
4
5192
by: web_design | last post by:
I put this together from some other scripts I am using on a site. I'm trying to make a better email hiding script. It isn't working. Also, it causes Internet Explorer 6 SP2 to block the script as "active content". :( The idea is that if the user doesn't have JavaScript enabled, they will see an image of the email address (that can't be read by email harvesting programs). If JavaScript is enabled, the image will be hidden and the...
4
1886
by: John | last post by:
Greetings, all, Several days after adding personalized URLs to my "amazing" collection of "God Loves (yourname)" mazes, it occurred to me that if someone were to create an offcolor term, then copy the URL to his own web page, that I might be penalized because my page would include that text on the resulting page. For example, let's say that "GOD LOVES JOKES" has negative connotations. Someone could create:
2
1535
by: Luis E Valencia | last post by:
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid the link would be accoiones.aspx?iddireccion=2&idindicador=5 I tried this but doesnt work <ItemTemplate> <asp:HyperLink runat="server" id="Hyperlink2" NavigateUrl='acciones.aspx?iddireccion='<%# DataBinder.Eval(Container,"DataItem.iddireccion"%>'&idindicador='<%#
1
1574
by: Michael | last post by:
Hello, Does anyone know how to create a personalized url? For example, I would like my site http://www.mysite.com to offer it's users the ablity to create personalized urls like http://myname.mysite.com Does anyone know how I can do that via code? So it will be automated when the user creates an account. Thanks.
4
2228
by: ianbarton | last post by:
Hello all I am trying to setup a feedback form on my webpage using some script provided by my ISP. I really don't know a lot about PHP and it's syntax etc. The feedback form only has 4 fields. These are UserName, UserEmail, UserCountry & Comments. It works well with all of those fields appearing in the body of an email that is sent to me. What I would now like is for the UserEmail field to appear in the "From:" field in the
3
1361
by: Pam1234 | last post by:
Hi everyone, This is a broad question but I'm hoping someone can steer me in the right direction. I can write valid xhtml strict in the dark with my eyes shut but I'm a trial-and-error person when it comes to PHP. For that reason I'll require concrete examples if possible. I've installed and modified plenty of Joomla sites, I can wade through existing PHP code with some degree of success, and I do know how to set up a database in MySQL at...
1
1312
by: Jeff | last post by:
Hey asp.net 2.0 at work we are about to start on a new project. Creating a website. My mananger has created the database. The database has a table holding user information (not that standard ASP.NET membership table). This table holds fields like, email, private email, contact, contact email. etc... I know that this information also can be stored in the Membership tables as well, think the table is named ASPNET_User or ASPNET_Profile?...
0
9680
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10012
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9052
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.