Hi
I'm trying to enable PHP email using my computer at home.
I've created a basic form that records a user's name and a text box for their comments/query, and a submit button to email their comments to a specified email address. When the user hits the submit button the name of the user is passed to a page that states "Thank you for your message 'name of user' ".
I have two files:
- an html file that contains the basic form for the user to enter their data and
- a php file that receives the name of the user and outputs it to the screen, and also php code that deals with the sending of the comments to a specified email address.
When the submit button is pressed the output of the user's name works correctly. However, I also come up with an error that says it cant connect - and it states a line of the code where the error is occuring. The error is relating to the mail() function in the php code. I am always connected to the internet and have my firewall turned off, but the same error occurs.
I believe the reason why it cant connect may be the fact the php.ini file isn't configured properly for the [mail function]. I am using my local pc at home and when I go to look at the [mail function] it is currently set to:
SMTP=localhost ;for win32 only
sendmail_from=me@localhost.com ;for win32 only
Is this correct?
Or should it be related to what my ISP is on my computer at home? My ISP is BTinternet. I have tried a possible alternative for the "SMTP" value:
SMTP=smtp.btinternet.com
But I am unsure about the "sendmail_from" value. Should it be something like "username for my isp"@btinternet.com or my actual home email address, for example my_email@btinternet.com?
Thank you for any help.
MHUK
I'm trying to enable PHP email using my computer at home.
I've created a basic form that records a user's name and a text box for their comments/query, and a submit button to email their comments to a specified email address. When the user hits the submit button the name of the user is passed to a page that states "Thank you for your message 'name of user' ".
I have two files:
- an html file that contains the basic form for the user to enter their data and
- a php file that receives the name of the user and outputs it to the screen, and also php code that deals with the sending of the comments to a specified email address.
When the submit button is pressed the output of the user's name works correctly. However, I also come up with an error that says it cant connect - and it states a line of the code where the error is occuring. The error is relating to the mail() function in the php code. I am always connected to the internet and have my firewall turned off, but the same error occurs.
I believe the reason why it cant connect may be the fact the php.ini file isn't configured properly for the [mail function]. I am using my local pc at home and when I go to look at the [mail function] it is currently set to:
SMTP=localhost ;for win32 only
sendmail_from=me@localhost.com ;for win32 only
Is this correct?
Or should it be related to what my ISP is on my computer at home? My ISP is BTinternet. I have tried a possible alternative for the "SMTP" value:
SMTP=smtp.btinternet.com
But I am unsure about the "sendmail_from" value. Should it be something like "username for my isp"@btinternet.com or my actual home email address, for example my_email@btinternet.com?
Thank you for any help.
MHUK