Desperate: PHP email form and PHP.ini file?
Posted: Tue May 19, 2009 12:33 pm
I've been posting on numerous forums, looking for some detailed help...know that any tips or information would be greatly appreciated.
I created a basic feedback form with PHP. When I tested it, I got this message:
The problem: After calling the php info, I'm pretty sure it's my webhost that has access to this file. I contacted them, and they replied by telling me to create a custom one, as they are a "Microsoft Windows 2003 Server that specialize in ASP, ASP.NET, and SQL Server and have limited experience with PHP."
Two scenarios:
1. I manage to convince my host to stop being jerks and edit the file. In that case, what would I need to edit in the php.ini file? The following is all I could find in the phpinfo.php page that relates to mail...would it be one of them:
sendmail_from name@domain.com webmaster
sendmail_path no value no value
2. I create my own php.ini file. If this is the case, could I potentially do the following?
Use this template: http://cvs.php.net/viewvc.cgi/php-src/p ... st?view=co
And then add:
[mail function]
; For Win32 only.
SMTP = mail.host.com ; for Win32 only
smtp_port = 25
sendmail_from= name@host.com ; for Win32 only
; For Win32 only.
;sendmail_from = name@host.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; 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 if I CAN do that, where would I upload the file? And would I run into issues with the php.ini file the site is already pointing to?
I know it's a little all over the place, but as mentioned before, ANY help would be greatly appreciated.
Thanks!
I created a basic feedback form with PHP. When I tested it, I got this message:
I looked into this and it seems that I need to config the mail settings in the php.ini file.Warning: mail() [function.mail]: SMTP server response: 553 sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1) in [file] on line 116
The problem: After calling the php info, I'm pretty sure it's my webhost that has access to this file. I contacted them, and they replied by telling me to create a custom one, as they are a "Microsoft Windows 2003 Server that specialize in ASP, ASP.NET, and SQL Server and have limited experience with PHP."
Two scenarios:
1. I manage to convince my host to stop being jerks and edit the file. In that case, what would I need to edit in the php.ini file? The following is all I could find in the phpinfo.php page that relates to mail...would it be one of them:
sendmail_from name@domain.com webmaster
sendmail_path no value no value
2. I create my own php.ini file. If this is the case, could I potentially do the following?
Use this template: http://cvs.php.net/viewvc.cgi/php-src/p ... st?view=co
And then add:
[mail function]
; For Win32 only.
SMTP = mail.host.com ; for Win32 only
smtp_port = 25
sendmail_from= name@host.com ; for Win32 only
; For Win32 only.
;sendmail_from = name@host.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; 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 if I CAN do that, where would I upload the file? And would I run into issues with the php.ini file the site is already pointing to?
I know it's a little all over the place, but as mentioned before, ANY help would be greatly appreciated.
Thanks!