View previous topic :: View next topic |
Author |
Message |
xirus -
Joined: 03 May 2008 Posts: 1
|
Posted: Sat May 03, 2008 12:36 am Post subject: mail in php |
|
|
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 |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Sat May 03, 2008 7:26 pm Post subject: |
|
|
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 |
|
|
gunny -
Joined: 25 Aug 2006 Posts: 9
|
Posted: Wed Aug 27, 2008 7:10 am Post subject: |
|
|
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 |
|
|
swissboney3 -
Joined: 02 Jul 2005 Posts: 31
|
Posted: Fri Aug 29, 2008 7:59 pm Post subject: |
|
|
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 |
|
|
fiasco -
Joined: 12 Aug 2008 Posts: 8
|
Posted: Thu Sep 04, 2008 5:47 am Post subject: |
|
|
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 |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
|
Back to top |
|
|
herbalz -
Joined: 28 Oct 2008 Posts: 3
|
Posted: Tue Oct 28, 2008 7:46 pm Post subject: |
|
|
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 |
|
|
bluestreak101 -
Joined: 13 Mar 2008 Posts: 7
|
Posted: Wed May 13, 2009 5:55 pm Post subject: |
|
|
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 |
|
|
anurdh65 -
Joined: 15 May 2009 Posts: 2
|
|
Back to top |
|
|
reefbum -
Joined: 25 May 2007 Posts: 9 Location: FL
|
Posted: Sat Jan 30, 2010 2:55 am Post subject: |
|
|
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 |
|
|
berncuizon -
Joined: 28 May 2010 Posts: 1 Location: USA
|
|
Back to top |
|
|
vibhavram -
Joined: 30 May 2010 Posts: 2 Location: Hyderabad
|
Posted: Sun May 30, 2010 1:44 pm Post subject: Post the code |
|
|
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 |
|
|
|