?
Solved

PHP mail() with attachments

Posted on 2003-03-05
13
Medium Priority
?
256 Views
Last Modified: 2006-11-17
I want to put a form on a site that users can email me and also send one attachment file (just PDF) if they want!
is anyone able to help?
0
Comment
Question by:edm19
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 1

Expert Comment

by:pcaylor
ID: 8072162
There are two parts to doing this.  The first is getting the PDF file uploaded to somewhere you have access to and the second is sending yourself a MIME email.

I can walk you through rolling it yourself, but you'd probably get what you want easier by using the PHPFormmail script.  The author's page is in French, but once you download the code, it's pretty clear what is going on.

All you should have to do from there is put on a validator on your form to verify that the file is a PDF and you are ready to go.

http://www.hotscripts.com/Detailed/8397.html

-Peter
0
 
LVL 15

Expert Comment

by:VGR
ID: 8072488
I like your "The author's page is in French, but " :D :D

Just to say that I'm also French an dthat I also posted at least two times a complete set of functions to send emails with multiple attachments :D
0
 

Author Comment

by:edm19
ID: 8072542
I am testing the PHPFormmail, has pcaylor sugested but if anything goes wrong,
VGR, where can I find that set of funtions?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 15

Accepted Solution

by:
VGR earned 600 total points
ID: 8072720
0
 

Author Comment

by:edm19
ID: 8072746
I am testing the PHPFormmail, has pcaylor sugested but if anything goes wrong,
VGR, where can I find that set of funtions?
0
 

Author Comment

by:edm19
ID: 8073602
I just put some changes, and it worked just fine. Thanks
0
 
LVL 15

Expert Comment

by:VGR
ID: 8073624
ok, then grade "A" please 8-)
0
 
LVL 15

Expert Comment

by:VGR
ID: 8073625
which changes ???
0
 

Author Comment

by:edm19
ID: 8073661
Nothing special! It was adapted to be used with a form.

- A function for testing email
- There is the chance for the user to sent the form without any attachment and also there is a limitation related to the attachments extentions that are alowed to be sent. For that I also created diferent messages/solutions to be sent for the user and the receiver of the form fields.

Thats it!
0
 
LVL 1

Expert Comment

by:pcaylor
ID: 8073842
VGR,

The comment about French wasn't meant as an insult, just that not everyone here reads French.  (I can't but enough years of Latin helps me to get the gist of it.)

-Peter
0
 
LVL 15

Expert Comment

by:VGR
ID: 8074136
I know it wasn't insulting 8-)
It was not 8-)
Being French is more a Gift from God than a shame :D
0
 

Author Comment

by:edm19
ID: 8074217
Nothing special! It was adapted to be used with a form.

- A function for testing email
- There is the chance for the user to sent the form without any attachment and also there is a limitation related to the attachments extentions that are alowed to be sent. For that I also created diferent messages/solutions to be sent for the user and the receiver of the form fields.

Thats it!
0
 
LVL 15

Expert Comment

by:VGR
ID: 8074386
which extensions, please ? So that I update my code 8-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question