I’m having trouble getting an email PHP to work.
I was told to ask my host :
1 – port 25 is blocked
2 – sendmail is disabled
3 – your mail server doesn’t use the default port 25 for sending email.
My host Answered:
1.port 25 isn’t blocked on our server. Your developer also can try to use port 2626, this is alternate SMTP port. Regarding this problem I can advise to enable option “SMTP authentication” in your script as server required SMTP authentication.
2. sendmail isn’t disabled. You can find sendmail path in your cPANEL.
3. Our server uses ports 25 and 2626 for mail sending.
Hardly an answer is it.
Any ideas how I fix it?
Well, which errors are you’re getting? Did you follow his advice and enable SMTP authentication? (I haven’t seen your other thread)
Sounds like a good answer?
Dont know, it’s all goobledigook to me.
According to the tests the email is sending but it never gets delivered to my inbox. Really wierd.
I suggest you download PHPMailer and try and use that – it includes a bunch of examples so I’m quite sure you’ll get it working with that
Direct download: http://downloads.sourceforge.net/project/phpmailer/phpmailer%20for%20php5_6/PHPMailer%20v5.0.2/PHPMailer_v5.0.2.zip?use_mirror=sunet Developer page: http://phpmailer.worxware.com/index.php?pg=phpmailer
Quick little guide on using Gmail’s SMTP servers: http://www.vishalkumar.in/2009/06/php-mail-using-gmail-smtp-tutorial/ Skip everything from step 6 onwards as that only concerns local Apache/PHP/MySQL installation, your webhost is pretty sure to already have it enabled. And put in the appropriate port (25 or 2626 in your case) with login credentials)
Hope this helps
(edit: just tested it with Gmail – which uses SMTP authentication as well – works perfectly fine once I adjusted some settings in examples\test_smtp_gmail_basic.php)
Nice one thanks, I’ll give it a go as soon as I have time. Appreciated.