PDA

View Full Version : php sendmail


ColdDoT
11th February 2006, 20:29
Hallo i have only experiance on windows so i dunno how to set up postfix to work with php

so how do i do that and my smtp server needs autencation.

so who can help me out here

greets colddot

till
11th February 2006, 22:42
You dont have to configure PHP at all to send emails trough the local MTA (postfix or sendmail) on a Linux server.

Please explain the problem you experience a bit more. Can you send emails with the postfix daemon on your server when you use a normal email client like outlook?

falko
12th February 2006, 10:17
You can simply use PHP's mail() function. It should work without problems.

ColdDoT
12th February 2006, 13:17
That i know but you must set in the php ini file how you send you mail now it is set on the windows localhost and smtp port 25

it works only takes to send a mail 5 min is that not to much ?

falko
12th February 2006, 15:55
That i know but you must set in the php ini file how you send you mail now it is set on the windows localhost and smtp port 25

The default php.ini settings should work for sending mails without problems. Please don't change them!
For me the php.ini settings are as follows:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

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

ColdDoT
12th February 2006, 18:32
ok thx
but what is then my from e mail addres or is that the e mail what i give whit the mail funtion from php

falko
12th February 2006, 21:05
but what is then my from e mail addres or is that the e mail what i give whit the mail funtion from php
You can set the from address in the additional headers. Have a look here: http://de.php.net/manual/en/function.mail.php

If you don't set it, then it will be like this: <apache_user>@<hostname>, e.g. wwwrun@server1.example.com.