phpMailer, gmail smtp, free webhost account


#1

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?


#2

Use Google SMTP :slight_smile:


#3

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


#4

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.


#5

How do you mean sorry?


#6

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)?


#7

SMTP will be with Google so should work fine.


#8

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


#9

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?


#10

If you are using google SMTP then no.


#11

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?


#12

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.


#13

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.


#14

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

php_value display_errors 1


#15

That’s super useful! Thank you!


#16

Welcome :slightly_smiling_face:

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


#17