mail in php

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
xirus
-


Joined: 03 May 2008
Posts: 1

PostPosted: Sat May 03, 2008 12:36 am    Post subject: mail in php Reply with quote

i have been reading alot of posts but i can find the answer im loking for. with server and php so here goes
im trying to setup mail on my website but when i test it it comes out with this
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\installed progs\Abyss Web Server\htdocs\movielist\sendlist.php on line 73

Warning: Cannot modify header information - headers already sent by (output started at C:\installed progs\Abyss Web Server\htdocs\movielist\sendlist.php:73) in C:\installed progs\Abyss Web Server\htdocs\movielist\sendlist.php on line 74

could someone translate this so a newbi understands it hehe
Back to top View user's profile Send private message
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Sat May 03, 2008 7:26 pm    Post subject: Reply with quote

Your current PHP configuration has it trying to send mail to a local mail server. I'm guessing that you don' t have a mail server though. You need to set one up (check out hMailserver).
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
gunny
-


Joined: 25 Aug 2006
Posts: 9

PostPosted: Wed Aug 27, 2008 7:10 am    Post subject: Reply with quote

im having the same problem..just dropped some ipn scripts into the server and it has a php page to test variables i guessing..also has a send email to yourself button and doesnt send..i checked the php.ini file its set to port 25 and emailers wanted email. and even tried to open port 25 on the router but still no-go...does this have to go thru port 25 and have the mailserver recommended above (i dont a database setup or need one)? why cant it just run thru 80 like the site does?
Back to top View user's profile Send private message
swissboney3
-


Joined: 02 Jul 2005
Posts: 31

PostPosted: Fri Aug 29, 2008 7:59 pm    Post subject: Reply with quote

because the mail() function needs an SMTP server to send the mail...follow the setup tutorial for hMailServer on http://abyssunderground.co.uk
yes it does have to go through port 25(default port for SMTP)
check the port settings in the mail server program
plus if you run SMTP through port 80 it will conflict with the web server and it'll cause problems.
Back to top View user's profile Send private message Send e-mail MSN Messenger
fiasco
-


Joined: 12 Aug 2008
Posts: 8

PostPosted: Thu Sep 04, 2008 5:47 am    Post subject: Reply with quote

The PHP mail() Function
The PHP mail() function is used to send emails from inside a script.
syntax:-mail(to,subject,message,headers,parameters)
_________________
web design company
free templates
Back to top View user's profile Send private message Visit poster's website
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Thu Sep 04, 2008 2:54 pm    Post subject: Quoting an online source to mock a member helps nobody. Reply with quote

^His issue does not deal with syntax, it deals with lack of an SMTP server.
_________________
Audit the secure configuration of your server headers!
Back to top View user's profile Send private message Visit poster's website
herbalz
-


Joined: 28 Oct 2008
Posts: 3

PostPosted: Tue Oct 28, 2008 7:46 pm    Post subject: Reply with quote

I guess those problems on mail server connections.
Try this.

Quote:
> SMTP = localhost
> SMTP_PORT = 25
> SENDMAIL_FROM = NULL
> SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is
> sitting. H is the drive with w2k)


Unless it has been changed in recent versions, Windows builds do not accept
the sendmail_path parameter. Under Windows you cannot send mail through an
executable, you need to have a running mail server that accepts connections
through TCP ports.
_________________
Health Article Forum | Natural Herbal Remedy
Back to top View user's profile Send private message Send e-mail Visit poster's website
bluestreak101
-


Joined: 13 Mar 2008
Posts: 7

PostPosted: Wed May 13, 2009 5:55 pm    Post subject: Reply with quote

I have a problem that is related to this and essentially along the same lines.

I get the following error with my script (that i created from an online tutorial:

http://www.kirupa.com/web/php_contact_form.htm

Quote:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing


After seeing this I modified my php ini file to use webmaster@mydomain.com as the email address and I also set the SMTP server to my local ms exchange 2003 box. Thats where I get my next error:

Quote:
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Requested action not taken: message refused


Has anyone tried the php email function with ms exchange? if so how did you get around this problem?
Back to top View user's profile Send private message
anurdh65
-


Joined: 15 May 2009
Posts: 2

PostPosted: Fri May 15, 2009 11:45 am    Post subject: Reply with quote

for future reference you can clarify at www.w3schools.com/PHP/DEfaULT.asP
Back to top View user's profile Send private message
reefbum
-


Joined: 25 May 2007
Posts: 9
Location: FL

PostPosted: Sat Jan 30, 2010 2:55 am    Post subject: Reply with quote

Sorry to revive this old post but I ran across it while looking for something else and thought it may help someone.

free version of PostCast is SMTP only
http://postcastserver.com

Have used this on several Windows/Abyss setups where php.ini needed an SMTP server for sending mail from website.
Have also have used it on several Abyss/Joomla systems for allowing Joomla sites to send mail.

Install PostCast on Windows/Abyss server

modify php.ini
Code:

[mail function]
; Setup for Windows systems
SMTP = 127.0.0.1
sendmail_from = me@myserver.com

Follow PostCast security recommendations to prevent being used as an SMTP open relay.

.
Back to top View user's profile Send private message Yahoo Messenger MSN Messenger
berncuizon
-


Joined: 28 May 2010
Posts: 1
Location: USA

PostPosted: Fri May 28, 2010 10:10 pm    Post subject: Reply with quote

I also have encounter a same problem, thanks for the help guys this post really helps me.
_________________
business security cameras / business security camera
Back to top View user's profile Send private message Visit poster's website
vibhavram
-


Joined: 30 May 2010
Posts: 2
Location: Hyderabad

PostPosted: Sun May 30, 2010 1:44 pm    Post subject: Post the code Reply with quote

Can you please post the code what have you used to send mail so that we can see the syntax of the code. I just want to see if all options are set correctly or not.
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group