473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP mailer script

I would like to set up a PHP page which my staff can use to select
attachments and send them to a specified email address.

There will be a list of about 10 alternative attachments (brochures) in
PDF format which are stored on the server. These are information
brochures for customers, and I dont want any other files to be able to
be emailled.

So, what is the best approach/scripting approach to do this. Basically I
want to have a form with:

- Customers name
- Customers email address

where the email will go to "Customers name <cu************@isp.com>"

- check boxes for the different attachments

- and a comments area which will form the body of the email.
The email that the customer receives will have our default Sender name,
email address and subject, plus the selected attachments and the body of
the message as specified in the form.
Can someone please suggest some code for this, I am even willing to pay
for this, will pay USD through Paypal or similar.

Please email me simon-@-direct-mobile-.com-.au- (remove hyphens)

Thanks
Simon

Jul 17 '05 #1
1 6261
simec <no*******************@paradise.net.nz> wrote:
I would like to set up a PHP page which my staff can use to select
attachments and send them to a specified email address.

There will be a list of about 10 alternative attachments (brochures)
in PDF format which are stored on the server. These are information
brochures for customers, and I dont want any other files to be able to
be emailled.

So, what is the best approach/scripting approach to do this. Basically
I want to have a form with:

- Customers name
- Customers email address

where the email will go to "Customers name <cu************@isp.com>"

- check boxes for the different attachments

- and a comments area which will form the body of the email.
The email that the customer receives will have our default Sender
name, email address and subject, plus the selected attachments and the
body of the message as specified in the form.

Can someone please suggest some code for this, I am even willing to
pay for this, will pay USD through Paypal or similar.


Hi Simon,

This is really relatively simple.

The section in the form where users choose the attachment(s) would be
either:
a) automatically generated, when list of attachments often change
b) hard coded, when the list of attachments doesn't change

a:
Look at opendir():
http://uk.php.net/manual/en/function.opendir.php
You loop through all the attachments in a specific directory and
generate the HTML output containing checkboxes.

Sending the email is easy - you could use on of many readily available
HTML MIME classes, which allow you to add attachments, or write your
own. AFAIK one of the most widely used MIME mail classes is the one
written by Richard Heyes: http://www.hotscripts.com/Detailed/4682.html

HTH;
JOn
Jul 17 '05 #2

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

Similar topics

6
by: Raphael Gluck | last post by:
Hi all I am still finding my feet creating a website in ASP, and i'm trying to get to grips with users providing feeback to my site. my webhosts have the dundas mailer installed, and i am trying...
2
by: John Davis | last post by:
What is the **MOST** obvious reason why will this will fail (it's not syntax or anything specific to the object)? Function Mail(MailerProgram, Message, Subject, Format, FromEmail, ToEmail,...
10
by: Flopper | last post by:
Hey can anyone help me with a WORKING anonymous mailer php script. I've looked on the net but only find non working one's. Greetings Floppie
1
by: believ3r | last post by:
Hi I've been looking for an open-source php script, which I want to tweak for internal use on a network. Anyway, regardless, might anyone suggest to me a script capable of forwarding any...
1
by: javascript | last post by:
I need to modify a code in Java Script for a Form Mailer page (asp), to be used for online newsletter subscriptions. So long, CDONTS had been playing an important role here, but since SMTP...
4
by: =?Utf-8?B?TWlrZSBI?= | last post by:
I'm using a block of ASP to allow a user to send a form via e-mail. However, someone keeps sending me spam through this form and they're using a bogus return address. I'm testing for a successful...
2
by: kind1one | last post by:
I am green to PHP and trying to create outside PHP mailer for html form ,i found the script i need but I can't get it to upload more than one file ,since i do not know exactly where to place script...
0
by: askzda | last post by:
Hi, Can somebody pls help to solve above problem. I have used dundas mailer for my mailing part in my asp script, but the an error occured during sending the mail. Error that is prompted out just...
6
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
9
by: neovantage | last post by:
hey geeks, I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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,...

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.