logo

Mail working with XAMPP

logo

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.

Popularity: 18% [?]

No related posts.

2 Responses to “Mail working with XAMPP”

  1. Pema says:

    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

CommentLuv badge
logo
logo
Powered by Wordpress | Designed by Elegant Themes