kalpz Posted September 29, 2006 Report Share Posted September 29, 2006 Hi.. I have read in other posts that a local mail server is required in order for PHP to send e-mails. Is it possible to use an external mail server. I use my ISP's email address, is it possible to go through my ISP's mail server?? ThanksKalpesh Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Ric Posted September 29, 2006 Report Share Posted September 29, 2006 You can indeed use your ISP's email address. Open the file php.ini located in folder: \Uniform Server\diskw\usr\local\php About halfway down this file locate the section named [mail function] you will find three settings: SMTP, sendmail_from, and sendmail_path. [mail function]; For Win32 only.SMTP = localhostsmtp_port = 25 ; For Win32 only.sendmail_from = me@localhost.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").;sendmail_path = "W:\plugins\SendMail\sendmail.exe -t" 1) Replace localhost with your ISP's SMTP server.(The one you use to set-up Outlook Express) 2) sendmail_from = your email address, or an address you would like to appear as the default 'from' address for emails sent from PHP scripts 3) sendmail_path: Not used in Window leave as is. Thats it Quote Link to comment Share on other sites More sharing options...
kalpz Posted September 30, 2006 Author Report Share Posted September 30, 2006 Thanks for your reply. I have this.. [mail function]; For Win32 only.SMTP = smtp.xtra.co.nzsmtp_port = 25 ; For Win32 only.sendmail_from = kalpz@xtra.co.nz And I get this... Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.xtra.co.nz" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in W:\www\mail.php on line 2 Any ideas? Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Ric Posted September 30, 2006 Report Share Posted September 30, 2006 What you have set-up looks correct. The error message you receive can be produced for a number of reasons. 1) You need to be connected to the Internet before running your PHP program. 2) If your host requires authentication for outgoing mail you cannot use the PHP mail function it does not support it.3) Your service provider may be using an alternative port and not 25 (unlikely) Note: Check what you use in Outlook Express to confirm 2) and 3)4) I assume you can send and receive emails (to this account) that rules out router, firewall and AntiVirus software problems. I think that covers most causes you would be surprised 1) is the prime candidate especially when testing. Quote Link to comment Share on other sites More sharing options...
kalpz Posted September 30, 2006 Author Report Share Posted September 30, 2006 1) Im on broadband, on 24/72) Not authentication on outgoing mail.3) I use outlook, outgoing port is 25.4) Yes. Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
kalpz Posted October 1, 2006 Author Report Share Posted October 1, 2006 Dont worry i've fixed it. My McAfee was blocking the port 25. :| Thanks anyways Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Ric Posted October 2, 2006 Report Share Posted October 2, 2006 Dont worry i've fixed it. My McAfee was blocking the port 25. :| Thanks anyways It looks as if I jumped the gun when I dismissed the potential cause in 4) Anyway glad you fixed it, more importantly thanks for the post and letting others know your solution to the problem. Quote Link to comment Share on other sites More sharing options...
kalpz Posted October 2, 2006 Author Report Share Posted October 2, 2006 Your welcome.. Yeah I disabled everything and turned everything back on 1 by 1 and it turned out it was my antivirus :|. Oh well.. Thanks again.. Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.