A complete phpMailer CLASS SCRIPT [OUTPUT]
Scenario : USER [v.ognissanti@yahoo.it] sends a FEEDBACK to ADMIN [admin@ics-php.com]
... and USER receives a COPY of his message by php-mail() using phpMailer CLASS-SCRIPT.
First we need a form to send here the USER inputs
//get feedback form details ...
   $name = "[Area Manager]";///$_POST['name'];
   $email = "v.ognissanti@yahoo.it";///$_POST['email'];
   $url = "http://www.pr.c-php.com/forum/";///$_POST['url'];
   $comments = "...COMMENTS ... $mail_body";///$_POST['comments'];
  Thanks for your feedback, [Area Manager]! We will contact you soon!
Error, please try again at a later time :-)
In this script [The blue OUTPUT above] add-functions are commented, so it won't send any message, bar the error function result.
The source code of this script sends mails with attached AND/OR embedded images.
Note that ADMIN Webmaster is using the SMTP of s.c-php.com site and not ics-php.com [...feedbacks can be received anywhere]
It works with smtp OR with mail(), the only limitation is that by mail() the adding of a CC will not work, so if you desire to send a copy to another address, you will have to use $mail->AddAddress("...","..."); OR $mail->AddBCC("...","..."); which is substantially the same.
If you want to see the message that it sends by using mail() , download this file and open it in your mail client, then see the message and check its headers and properties :-)
The output by using smtp is just the same as this, bar the difference that Cc messages will be titled as such in the mail-CLIENT.
...So what's the big deal about phpMAILER ? Usage
Details [SMTP BASIC] CODE  




Usage
PHPMAILER is a php small suite based on php-objects [CLASS]
Although if by downloading this suite from the author source you might get frightened by the zip content, the output that you see on this page, is based on about 30 lines of php code in this file, by using the content of that suite.
Syntax for php-class could seem a little confusing and to startup with this, I've set on website a couple of pages for our Members, in order to give a basic knowledge on how to interact with features based on PHP-CLASSES

A php-object is defined by a special model called class
An object has properties and methods.
A property can be a variable or an array or another object.
A method is a function defined internally in a class.


All we need to change in the normal php-syntax is on howto refer to these objects
For retrieving a variable we just can set : $_var=$mail->VAR; ...gets $VAR
To call a function ...for example $_send=$mail->Send(); gets : Send() from the inside of a php class
That's All Folks :-)  

Top