I've successfully set up Mercury Mail Server on my local machine using the XAMPP stack to send mail through a remote SMTP Server by following the configuration directions posted at: https://www.zoe.vc/2008/mercury-mail-transport-system-fur-externe-mail-konfigurieren/ If mail is sent to either local or external email addresses via a regular mail client, e.g. Thunderbird, Mercury Mail processes the mail appropriately and the mail arrives in the expected mail boxes.
However, sending mail through my local Drupal 7 site does not work.
- For example, the site includes a set of rules built with the Rules module that are configured to send mail to a set of email address when triggered.
- Drupal reports that it successfully sends mail to the targeted addresses when the rules are fired.
- But Mercury Mail doesn't show any evidence that the mail is being processed -- and the mail never shows up in at the addressed mailboxes.
In summary, mail from Drupal is not getting to the server, but Drupal thinks that it has been successfully sent. Note, as per the directions from zoe.vc, the [mail function] configuration in php.ini is setup as:
[mail function] ; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury SMTP = localhost smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = firstname.lastname@example.org ; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly. ; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path. ; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder) ;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t" ; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder sendmail_path = "C:\xampp\mailtodisk\mailtodisk.exe" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = Off ; Log all mail() calls including the full path of the script, line #, to address and headers ;mail.log = "C:\xampp\php\logs\php_mail.log"
I've spent countless hours trying to figure this one out. Any help getting this to work via drupal so that I can continue development will be greatly appreciated. Thanks in advance.