Solved

send mail with attachment

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
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…
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.

623 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