Solved

send mail with attachment

Posted on 2004-09-12
7
191 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: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

Independent Software Vendors: 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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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.

740 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