XAMPP installation: mailoutput folder: info & docs about PHPMailer sought

0

1

I am running XAMPP on a local installation of Windows 7. I have not been running XAMPP's Mercury server because I've tried it once in the past and could not get it to work. So I thought I did not have SMTP working on my machine, until yesterday I installed a localized version of WordPress and then found the following folder:

C:\Users\JSonderson\Desktop\mailoutput\

containing a message named:

mail-20131024-1946-826000.txt

containing the following message:

To: admin@rainbow.com
Subject: Nuovo sito WordPress
Date: Thu, 24 Oct 2013 19:46:05 +0000
Return-Path: wordpress@127.0.0.1
From: WordPress <wordpress@127.0.0.1>
Message-ID: <64abe75651ddef4a4b0c4351bb927d21@127.0.0.1>
X-Priority: 3
X-Mailer: PHPMailer 5.2.4 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8

[snip]

I've looked at the URL http://code.google.com/a/apache-extras.org/p/phpmailer/ for PHPMailer but could not find out about it and it does not seem to be documented on the page http:// localhost/xampp where it is not listed under "Components" and could not see it with phpinfo();

Could someone please explain to me how to find out more about how PHPMailer is configured to work with my XAMPP installation and how to send mail (so that it presumably shows up on my desktop's mailutput folder). How do I configure e-mail accounts with PHPMailer?

Thanks.

John Sonderson

Posted 2013-10-25T16:34:42.267

Reputation: 2 816

Answers

1

PHPMailer, assuming we are talking about the same program, is not part of XAMPP (although I am not familiar enough to know if it's incl with WordPress, but I doubt it).

To install PHPMailer, you upload a few files to a folder on your web server (or in the document root, which in XAMPP is the htdocs folder). These files are important:

  • class.phpmailer.php --> Necessary
  • class.pop3.php --> Optional
  • class.smtp.php --> Optional
  • PHPMailerAutoload.php --> Useful

To load PHPMailer, you need a line like:

<?php
    require("class.phpmailer.php");

or

<?php
    require("PHPMailerAutoload.php");

You don't create email accounts in PHPMailer; you create them on your webserver (or other mail host, like google mail). Then you provide the email account login/password to PHPMailer in its instructions.

Here are some docs and tutorials for PHPMailer:

Tutorial from Apache

Installation Docs

Helpful Answer on SO <-- Also note the (accepted) answer immediately above this one

cssyphus

Posted 2013-10-25T16:34:42.267

Reputation: 1 067

Thank you. I actually installed a localized version of WordPress from this site: http://www.wpitaly.it/wordpress-in-italiano/ . In my wp-includes folder I can see that the following files are included: class-phpmailer.php, class-pop3.php, and class-smtp.php. The PHPMailerAutoload.php class you mention is not included. Thanks for the pointers!!!

– John Sonderson – 2013-10-25T20:13:31.947

2

I don't think it has anything to do with PHPMailer. It might be because newer XAMPP comes with several options for mailing:

  • using a regular SMTP server (what you're looking for)
  • using "fakemail"
  • using mailtodisk (what you're experiencing)

Look around line 1130 of php.ini for:

[mail function]

There are a bunch of lines afterwards like:

; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the O:\Programs\XAMPP\mailoutput folder

You probably have the following uncommented:

sendmail_path="O:\Programs\XAMPP\mailtodisk\mailtodisk.exe"

This means that whenever you send an email, it gets routed through the included tool 'mailtodisk.exe' which is what's saving it to that output folder.

If you make any configuration changes, don't forget to restart Apache (not the XAMPP control panel).

drzaus

Posted 2013-10-25T16:34:42.267

Reputation: 379