Help! Sendmail isn't working...

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

Help! Sendmail isn't working...

Postby MissDemeanor » 29. July 2008 14:03

I've searched the forums, and, for some reason, the threads that appear to possibly be the most helpful, have been edited so that the content is not viewable... It would be great if there was a total step-by-step "this is how you do it" somewhere...

In any event, I'm trying to get sendmail to work, but it's not... I get the following error:

Code: Select all
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini


In my sendmail.ini file:

Code: Select all
smtp_server=smtp.spamarrest.com
smtp_port=25
auth_username=myname
auth_password=mypassword
pop3_server=mail.spamarrest.com
pop3_username=myname
pop3_password=mypassword


In my php.ini file:
Code: Select all
SMTP = smtp.spamarrest.com
smtp_port = 25
sendmail_from = myname@spamarrest.com


I've restarted apache, and attempted a very simple mail script:

Code: Select all
$email = 'myemail@yahoo.com';
      $from = "From: My Name <myname@spamarrest.com>";
            $subject = "it worked";
           $body =    'awesome';
        
        if(mail($email,$subject,$body,$from)) { echo 'mail sent'; } else { echo 'mail failed'; }
MissDemeanor
 
Posts: 4
Joined: 29. July 2008 13:50

Postby Wiedmann » 29. July 2008 14:12

In my php.ini file:

If you want use sendmail, you must enable the line "sendmail_path ..." in "php.ini".

BTW:
- You really need "pop3 before smtp"?
- "force_sender" should be your normal email address.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby MissDemeanor » 29. July 2008 14:32

Thanks for the swift response, but I'm getting the same error.

Now php.ini looks like this:

Code: Select all
[mail function]
; For Win32 only.
SMTP = smtp.spamarrest.com
smtp_port = 25

; For Win32 only.
sendmail_from = myname@spamarrest.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "\xampplite\sendmail\sendmail.exe -t"

; 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 =



And no, I don't need pop3 before SMTP, so I re-commented those lines out in my sendmail.ini file. I also set the force_sender to my normal email address.

But, I'm getting the same error message. Any other suggestions?
MissDemeanor
 
Posts: 4
Joined: 29. July 2008 13:50

Postby Wiedmann » 29. July 2008 14:35

Now php.ini looks like this:

This is the correct "php.ini"?

(You can verify this with phpinfo()).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby MissDemeanor » 29. July 2008 14:51

Ahhh, that was it. Thanks a million.
MissDemeanor
 
Posts: 4
Joined: 29. July 2008 13:50

Postby admindell » 30. July 2008 05:14

im geting a error 2, but the smtp server thats in xampp it dont send, it says the mx is bad, and when i enter my dns servers IP it just keeps retrying then it fails
I am creating a web admin panel for windoes xampp!

its called xDPanel.
the home page i have created can be found here. and please note that it is still under construction!
User avatar
admindell
 
Posts: 28
Joined: 28. May 2008 16:35


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests