Mercury problems please help

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Mercury problems please help

Postby the_big_noob » 29. January 2012 10:56

XAMPP 1.73
Mercury/32
Windows XP SP3

When I run a test email script, I am getting the following error:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\_mail_test\test_mail.php on line 5
Message delivery failed...
----
I am trying to send it to my gmail mail account and test_mail.php is:
<?php
$to = "mygmailaccount@gmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
the_big_noob
 
Posts: 3
Joined: 29. January 2012 10:40
Operating System: XP SP3

Re: Mercury problems please help

Postby Sharley » 29. January 2012 11:00

You may like to do an Advanced search of this XAMPP for Windows English forum for 'sendmail' as this issue is well covered with many successful solutions for version 1.7.3.

Mercury Mail is not used for the purpose you have outlined in your first post but sendmail is used for php scripts to send mail instead.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Mercury problems please help

Postby the_big_noob » 29. January 2012 12:07

Ok so I found this video on youtube showing how to send mail between two localhost email accounts:

http://www.youtube.com/watch?v=_QnfF64rA78

same Mercury/32 that I am using too.

I am able to add 2 new mail accounts to localhost just fine like the video does under Configuration->Manage local users.

But when I use Thunderbird Portable to add these email accounts, it says ‘double-check this email address’ like it is NOT recognizing localhost.

It is definitely test_email1@localhost just like I added under Configuration->Manage local users, but localhost is not being recognized by Thunderbird. What should I check next? I am stuck… and it seems most people don’t have this problem who have followed the youtube video on mercury with xampp

I am definitely using localhost and NOT localhost.com
the_big_noob
 
Posts: 3
Joined: 29. January 2012 10:40
Operating System: XP SP3

Re: Mercury problems please help

Postby WilliL » 29. January 2012 19:21

I've just tested it on localhost (xampp and thunderbird started on the same machine) it works fine.
On thunderbird create or edit an e-mail-account:
name, e-mail, password
then use manuel configuration :!:
Hint: username may be different to your e-mail-adress or your name
incoming -
servertype: pop3, server: localhost, port: 110,
security: none
authent.: password, unsecured

outgoing -
servertype: smtp, server: localhost, port: 25,
security: none
authent.: none

Its a free translation from German to English, but it should work.
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Mercury problems please help

Postby the_big_noob » 01. February 2012 20:01

I still can't seem to manage to connect to localhost. I am used to following tutorials and this is driving me insane! I appreciate the help so much WilliL.

I notice there is an Img tag I can use when I post a reply on this message board. I would like to post some screen shots of my XAMPP control panel, Port Check, Thunderbird Portable add email account screen, and my Mercury/32 mail screen where I define users so that you can say for sure that I am doing these correct.

However, how does this Img tag work?

Do I have to upload my images to a web server and then put the URL for the images between the Img tags? Or is there a way to get my images stored on my local machine posted to this board?

I really need to get this working because my OLD method of testing email within PHP scripts was to upload to my host's web server which is so time consuming I really can't do that anymore. Also, it's not practical when developing PHP scripts locally.

Thank you WilliL again. :lol:
the_big_noob
 
Posts: 3
Joined: 29. January 2012 10:40
Operating System: XP SP3

Re: Mercury problems please help

Postby JonB » 01. February 2012 20:35

However, how does this Img tag work?

Do I have to upload my images to a web server and then put the URL for the images between the Img tags?


Yes -
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury problems please help

Postby JonB » 01. February 2012 20:39

another option is to try out hMailserver (a much better Windows Mailserver) also free. (note: I have never used it for localhost, only 'live') They have well manged forums and the answer may be there or you can register and ask.

http://www.hmailserver.com/

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Mercury problems please help

Postby Sharley » 01. February 2012 23:17

testing email within PHP scripts
As I pointed out way back in this topic all you need do is use sendmail which is designed specifically for your needs and is included in XAMPP.

Try these instructions that worked for another member who was wanting to use gmail in XAMPP 1.7.3 to send emails from a php script, which were found by using the advanced forum search that I also suggested previously and would have saved you much wasted time and needless frustration.
viewtopic.php?f=16&p=173315#p173315


Using a full blown email exchange server is like cracking a nut with a sledge hammer and would more than likely never work for your intended purpose.
These mail exchangers are meant to be used by large networks with their own domain names (not localhost) for sending and receiving emails for their network users.

BTW your ISP will most likely block any email exchange servers from localhost using port 25 because spammers use that method, so best asking them if they permit the use of Mercury Mail (or hMailServer) from your PC using localhost (doubtful), which is just another obstacle to overcome if you persist in using a sledgehammer to crack this very small nut. ;)

Good luck and please do post back with any issues you may find by using sendmail. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests