Mail working with XAMPP

By David on July 3rd, 2007.
Filed Under:Servers, XAMPP
Subscribe via: RSS or Email

I found this file a few days ago. I’m not sure of it’s originals, but here’s how it works.

It uses PHPMailer with a gmail wrapper, so to speak. Here is the code needed:

require_once('/phpgmailer/class.phpgmailer.php');
$mail = new PHPGMailer();
$mail->From = 'user@domain.com';
$mail->Username = 'user@domain.com';
$mail->Password = 'password';
$mail->FromName = 'User Name';
$mail->Subject = 'Subject';
$mail->AddAddress('myfriend@domain.com');
$mail->Body = 'Cool, Email working!';
$mail->Send();

here is the required files

So now you can get the mail function to work with php and XAMPP.

One Response to “Mail working with XAMPP”

  1. Hello any one, please help me to solve my problem.

    I’m using xampp server but when it comes to emailing… it is not working at all.

    I downloaded phpdbb forum from one of the site and I’ve attached to my website successfully.

    But, when user register for the first time…. it’s giving me a problem….

    The problem is sthing to do with mail() function. If any one could feel that my problem is too simple…. please send your email at soemrinzdaza@yahoo.com

    Thanks ….

Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>