Solved

send mail with attachment

Posted on 2004-09-12
7
188 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
ID: 12038406
Hi,

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

http://phpmailer.sourceforge.net/


0
 
LVL 27

Expert Comment

by:Diablo84
ID: 12038432
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
ID: 12038518
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
ID: 12038711
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
ID: 12038712
specified*
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

910 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

23 Experts available now in Live!

Get 1:1 Help Now