Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

send mail with attachment

Posted on 2004-09-12
7
Medium Priority
?
194 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
[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
  • 3
7 Comments
 
LVL 26

Expert Comment

by:Umesh
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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
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.

722 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