If you added all your needed phpmailer scripts to your project folder (like PHPMailerAutoload.php, class.phpmailer.php, class.smtp.php) you can add to your php file the following code:
require('class.phpmailer.php');
require('class.smtp.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.yourserver.de";
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
$mail->SMTPAuth = true; /
$mail->Username = "myusername@mail.com";
$mail->Password = "secure123";
$mail->CharSet ="UTF-8";
$mail->AddAddress("m@il.to");
$mail->Subject = "Important Subject";
$mail->IsHTML(true); //Or false if you do not want HTML content
$mail->Body = "HTML-Body<br>Go for it: <b>Great</b> story goes here!";
$mail->AltBody = "No HTML Body. Great story goes here!";
if(!$mail->Send()){
echo "Error sending";
} else {
echo "Mail successfully sent";
}
If you want to send a mail, you have to run a smtp server. Do you run your server privately? Is there no way you can build a smtp server functionality?
Best
Chris