Solved

send mail with attachment

Posted on 2004-09-12
7
187 Views
Last Modified: 2008-02-01
Hello ,
       I am looking for some code to do "sending mail with attachment", but mostly i found codes that use pears.  I m looking for a plain but easy one.  Could anyone suggest me?? Thanx very much for any helps.  

cheers:)
0
Comment
Question by:Kaiwap
  • 3
7 Comments
 
LVL 26

Expert Comment

by:ushastry
Comment Utility
Hi,

Look at here, I hope this would help you//

http://phpmailer.sourceforge.net/


0
 
LVL 27

Expert Comment

by:Diablo84
Comment Utility
http://www.theukwebdesigncompany.com/articles/php-file-attachments.php

but your better off using phpmailer then you can add attachments as easy as

$mail->AddAttachment("/path/to/file.txt", "file.txt");
0
 

Author Comment

by:Kaiwap
Comment Utility
Hi I tried to use the phpmailer and the example in the link....
but it gives me a warning.. on this

Warning: main(): Failed opening 'sendmail.class.php' for inclusion (include_path='./;C:\httpd\php\pear;') in d:\project\mail.php on line 7

So to use phpmailer i have to install PEAR??
0
 
LVL 27

Accepted Solution

by:
Diablo84 earned 125 total points
Comment Utility
Your include path is configured wrong. It should begin .; (not sure why the forward slash is present in your path) so it searches the current directory first then the directory sepecified in the ini file.

Also make sure that sendmail.class.php in in the right directory, if you use , for example, include('sendmail.class.php'); make sure it is in the same directory as the main file.
0
 
LVL 27

Expert Comment

by:Diablo84
Comment Utility
specified*
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now