Page 1 of 1

mail() in XAMPP?

PostPosted: 30. March 2012 08:07
by Basinator
Hi!
I am doing an internship at an IT company.

I want to send a mail with php mail() I tried both localhost and the SMTP of the company's mail provider (the smtp settings are working in outlook).
Settings
Code: Select all
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.1und1.de

; http://php.net/smtp-port
smtp_port = 25
username =*****
password =*****


or:
Code: Select all
;SMTP = localhost
; http://php.net/smtp-port
;smtp_port = 25


PHP code:

Code: Select all
   mail($empfaenger, $betreff, $Message,$headers);
   mail("seec1[at]gmx.net", "Sexy Käse", "Hallo du geiles schnitzel", "From: seec1[at]gmx.net");

I dont get any errors messages anymore, so I guess it might be either connected to the company's firewall or the inability to connect to the SMTP.

Re: mail() in XAMPP?

PostPosted: 30. March 2012 18:47
by WilliL
you only need to configure your mailing system proper.

If you use sendmail - why do you use outlook parameters? sendmail can't "understand" them.
Code: Select all
;eg.
;you wrote SMTP = smtp.1und1.de
;sendmail expects
smtp_server=smtp.1und1.de

sendmail.ini ist very good commented.

Re: mail() in XAMPP?

PostPosted: 30. March 2012 19:31
by Basinator
Which parameters are you talking about? username, pw? WEll, I simple tried out since I wasnt able to get my mails through with localhost. However, as mentioned before, the firewall might be blocking mails sent from localhost.