anton_1 Posted August 8, 2011 Share Posted August 8, 2011 Hey guys, Do you have any good articles that I could read to setup my own mail server how to connect to one to allow people to contact me through my web form on my website. Any Help would be greatly appreciated! Thank You! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/ Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 http://www.google.com/#sclient=psy&hl=en&source=hp&q=php+mail+server+setup&aq=f&aqi=g1&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=68b3f9ae28a95316&biw=1920&bih=999 Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254182 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 Hey guys, Do you have any good articles that I could read to setup my own mail server how to connect to one to allow people to contact me through my web form on my website. you don't need to set up a mail server to let people send you messages through a form. All you need is and smtp server (which your ISP probably provides for you) and an email address. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254201 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 Hey guys, Do you have any good articles that I could read to setup my own mail server how to connect to one to allow people to contact me through my web form on my website. you don't need to set up a mail server to let people send you messages through a form. All you need is and smtp server (which your ISP probably provides for you) and an email address. ...i thought he actually wanted to make one himself Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254203 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 @AyKay47 you might be right, I'm not sure myself, but since he added "to allow people to contact me through my web form on my website.", I figure he doesn't really need one. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254207 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 Thanks guys, It was really just to allow people to contact me through a web form. whats a good smtp server to download? Thanks! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254221 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 typically, whatever host you are using will provide the mail server for you Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254222 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 no man, you don't want to download an smtp server... have you tried sending an email from your web server??? what was the error? Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254224 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 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:\xampp\htdocs\mail\mail.php on line 9 Thanks man! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254236 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 <html> <head> </head> <?php mail("[email protected]", "TEST", "Please work!", "From:[email protected]"); ?> <body> </body> </html> Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254237 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 as the error says: you need to find out what your smtp server is, and add it to your php.ini file. if you're not sure, ask your ISP. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254238 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = postmaster@localhost would i change that to smtp.tools.sky.com? Thank again! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254241 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 Is smtp.tools.sky.com a valid smtp server? did you try it? Try it. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254245 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 instead of guess and check here, simply contact your host and they will guide you Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254249 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 Is it my ISP host I contact or the company that provided me with the web-hosting and domain? Thanks! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254253 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 your error said: 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:\xampp\htdocs\mail\mail.php on line 9 c:\xamp means you're testing things on your local computer... not your webhost service. Chances are you will not need to modify anything. have you tried sending the email from your hosting account? (i.e. upload the script to your hosting account and run from there. What hosting do you have? linux, windows? - I'm guessing linux since you're programming in php) Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254255 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 Is it my ISP host I contact or the company that provided me with the web-hosting and domain? Thanks! contact your server host, not your ISP Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254286 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 @ AyKay47, he seems to be testing locally with xampp, when he uploads to his hosting account it will probably work perfectly. (even if he gets the smtp address from the host, he will put it into his local php.ini and it won't work anyway). @anton_1: You need to get the smtp from your ISP for your local host (i.e. the computer you have xampp installed on and are using to test stuff) and you need to try the mail() function on your hosting account. if it does not work, then you need to get the smtp address for your hosting account (this should work without modifications though). I think the problem here is that you're trying to test on your local machine without uploading to you hosting account. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254293 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 @ AyKay47, he seems to be testing locally with xampp, when he uploads to his hosting account it will probably work perfectly. (even if he gets the smtp address from the host, he will put it into his local php.ini and it won't work anyway). @anton_1: You need to get the smtp from your ISP for your local host (i.e. the computer you have xampp installed on and are using to test stuff) and you need to try the mail() function on your hosting account. if it does not work, then you need to get the smtp address for your hosting account (this should work without modifications though). I think the problem here is that you're trying to test on your local machine without uploading to you hosting account. in my opinon, trying to setup a mail server on localhost is not worth the trouble, I would wait to tamper with the mail() function until the OP has put his script on a server Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254306 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 Thanks guys for all your help. will try uploading it to my web-hosting just now Thanks! Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254318 Share on other sites More sharing options...
anton_1 Posted August 8, 2011 Author Share Posted August 8, 2011 It worked! Thank you so much! the smtp settings are automatically set through your web-hosting provider Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254324 Share on other sites More sharing options...
WebStyles Posted August 8, 2011 Share Posted August 8, 2011 yeah, I said you should test on your hosting account an hour and a half ago. imagine the time you could have saved... Glad it's working now. Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254327 Share on other sites More sharing options...
AyKay47 Posted August 8, 2011 Share Posted August 8, 2011 yeah, I said you should test on your hosting account an hour and a half ago. imagine the time you could have saved... Glad it's working now. ha! sad but true Link to comment https://forums.phpfreaks.com/topic/244199-mail-form/#findComment-1254409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.