phpMailer, gmail smtp, free webhost account

I’m new to 000webhost.com and have a free hosting account. I would like to add member registration and weekly emails. The registration function would require a validation email to be sent. I’ve read many posts saying that smtp access is blocked from webhost for free account members, and I’ve read other posts saying that smtp access is not blocked. Can anybody tell me for sure whether or not I can use gmail smtp with phpMailer in a free account in 2017? If so, what’s the best way to use phpMailer to connect with gmail?

Use Google SMTP :slight_smile:

1 Like

That tutorial should complete what @Infinity said
Using GoogleMail with 000webhost

Thank you. Is there a way to do something similar if my domain is pointed to 000webhost instead of parked? I’m using Cloudflare for SSL enforcement.

How do you mean sorry?

I am using Cloudflare.com to enforce SSL use on my domain which is hosted at 000webhost. In order to make sure it works correctly the name servers attached to my domain are those of Cloudflares and my domain is pointed to 000webhost instead of parked. Can I still use gmail smtp here with the phpMailer library (the rumor is that port 587 is blocked for free accounts)?

SMTP will be with Google so should work fine.

How does that work? I use php mail() function and the message is routed to the mx record from 000webhost server?

Last question pertaining to the email limit. If I have more than 50 emails try to go out in the same day, do the >50 emails get cached somewhere and sent out the next day?

If you are using google SMTP then no.

no to which question? I’m sorry I still don’t find a way to use SMTP to gmail. Is port 587 blocked for free accounts?

Hi @nt15mcp

You can’t use google SMTP with php mail() function. It just sends emails with 000 mail servers.

If you need to connect to SMTP, you can try phpmailer.

2 Likes

Thank you. I did manage to get phpMailer working with my free account. I’m new to php (I have a little experience with Java) and didn’t know if the Error 500 that I kept receiving was because my code was bad or because phpMailer wouldn’t work.

It may be a syntax error or something. Add following code to your .htaccess file

php_value display_errors 1

That’s super useful! Thank you!

Welcome :slightly_smiling_face:

Feel free to open a new topic if you have any other question. :wink:

1 Like