630 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 100 and 1 000 dollars
  • United Kingdom
RobbyDesigns says

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?

9 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Ireland
dotmac says

Well, which errors are you’re getting? Did you follow his advice and enable SMTP authentication? (I haven’t seen your other thread)

370 posts
  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
  • New Zealand
Polarathene says

Sounds like a good answer?

630 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 100 and 1 000 dollars
  • United Kingdom
RobbyDesigns says

Dont know, it’s all goobledigook to me.

630 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 100 and 1 000 dollars
  • United Kingdom
RobbyDesigns says

According to the tests the email is sending but it never gets delivered to my inbox. Really wierd.

9 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Ireland
dotmac says

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)

630 posts
  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 100 and 1 000 dollars
  • United Kingdom
RobbyDesigns says

Nice one thanks, I’ll give it a go as soon as I have time. Appreciated.

by
by
by
by
by
by