Sunday Skill Booster: How to setup SMTP mail in Blocs!

I agree - but there must be a reason why @Norm hasnā€™t added this into Blocs yetā€¦but I do have a feeling something as requested so many times will be one day added into Blocs.

As far as sending via SMTP, a third party option like smtp2go.com is useful. They offer a free package as well as lots of added features.

Ray

Great tutorial! Sadly, I cannot make it work. The login credentials are working when I use it in a WordPress SMTP plugin, but not in your file.
When I press send, it starts loading but nothing happens. I donā€™t get anything in the error log either.

That means something is set up wrongly at your end. If the credentials are wrong it will show you an error.

Are you using Go Daddy?

Hmm. I checked the location and the names. A plain php Mail function works.

Iā€™m using a German Hoster called Manitu. The support told me that it should work and smtp via fluent forms on WordPress works, too.

Some new features coming in todays beta of Blocs 5.1 that will let users set this up from within Blocs.

A new Mail Server Manager that will store passwords etc in the secure part of your Macs Keychain.

You can set the post type to your own SMTP Mail Server

Everything you need is generated on export and put neatly in the includes folder.

Obviously server config also needs to be considered for this to work.

Many thanks to @Jerry to providing the boilerplate of the solution :beers:

13 Likes

super !
surely many have waited for thisā€¦

Free :beers: for @norm and fancy :cocktail: :cocktail: for @Helen this weekend under the :coconut: :palm_tree:. Donā€™t forget to bring :bikini: :shorts: and sun cream :sunglasses: :sunny: :parasol_on_ground: :ocean:

3 Likes

Awesome to see this!

I am so pleased that in my lifetime, I can say that I now know a ā€œLegend.ā€

Canā€™t wait to tell my wife and kids!!! :blush:

Nice work Jerry!!

Rich the Weather Guy

3 Likes

We should have a Blocs party for all!!!

@Jerry has the perfect location and venue! and can sort out the best drink and local cuisine!
@Norm will build the website for it, and to speed things up we will use Minimalist from @Eldar to get it up fast so we can all register our attendance.
@Jannis will run the blog leading up to the party and during and after with his gallery!
I will provide some of the entertainment as I have family there and can hook up some decks and mics for singers and I can spin some dance classics with some Mauritian Sega musicā€¦I am sure Jerry knows a few dancers to showcase the local dancing too!
And for the grand final @Mattheus and his band will perform till the early hours!
We will get @WeatherguyNH to check we have perfect weather on the date we are going
@Flashman will bring his camera and be official photographer for the Blog/Gallery!
The best of it all is @PeteSharp builds more websites than any of usā€¦so he will help pay our ticketsā€¦first class iā€™m sure?..might get 10% off if we get around 30+ on the flightā€¦Sorry, 60+, forgot partners!

If anyone else has anything for the party, please chip in!

5 Likes

:white_check_mark:, Iā€™m sure your family will add in some truly local experiences.

Leave the Sega and Segae in my hands. :white_check_mark:. Iā€™ll get a local rum company to sponsor the fancy :cocktail: :tropical_drink: :smiley:

Well, all of you paid a ā€œone-offā€ fee for Blocs instead of being locked into a monthly subscription plan so everyone has enough in his piggy bank to pay for his own ticket :airplane:. However, Iā€™m sure @PeteSharp will throw in some free :free: tickboxes for all :smile:

All can stay at my (The Legend :rofl: :joy: :rofl:) place under the :coconut: :palm_tree: and wake up every morning with some nice :sunrise:.
Wake-up calls are at 05 AM to do a 15KM :man_running::man_running: before :coffee:.

To all.
Post whatever you want on this topic as @norm made it redundant within 5 days :joy:. Soon he will be challenged with the next Sunday Skill Booster :smiley:

6 Likes

If we are going to do that, I hope you have a good local hospital because I will need it! :stethoscope: :xray:

Rich the weather guy

1 Like

Freeā€¦. with subscription. :rofl:

Actually we prefer to add value, not cheapen the experience, soā€¦ā€¦

Includedā€¦ with subscription :smile:

2 Likes

Super! :+1: :+1: :ensoleillƩ:parasol_sur_sol: :boisson tropicale:

Iā€™m not getting the love. Iā€™ve add the file and folder to my public_html folder on the server.
My ā€˜send_form_smtp.phpā€™ file

My Blocs form settings

My BlueHost server files

Iā€™m using BlueHost if that makes a difference. Iā€™ve tried using smtp.n+++.com in the '$smtp_host = ā€˜++++;ā€™ field in the send_form_smtp.php file with no luck. Iā€™ve always thought it should be ā€˜smtp.n+++.comā€™ but BlueHost says it should just be ā€˜n+++.comā€™ in their config document. Please advise.
If anyone can show me where Iā€™ve gone astray (and no itā€™s not when I got caught stealing a candy bar in 3rd grade!) I would be most appreciative.

Cheers.

Why are you not using the build in SMTP solution? It was added to Blocs after this post.

1 Like

As you can see by the screen shots I included, I have been trying to use the smtp solution but with no success. There are a few things that were unclear to me. One is ā€œUpload the .PHP file and the folder to the root of your website.ā€ I have uploaded the file and folder to the public html folder, but this is not working. Should I have included the ā€˜send_form_smtp.phpā€™ in the PHPMailer folder? Second, you mention ensuring the filed names match the ID in the form. I have tried matching the ā€˜$form_filedsā€™ with the ID and the ā€˜assetā€™ field with the ID; neither seems to work. Finally when I try to use the form from the published site I get this message ā€™ Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.ā€™

In my original post I mentioned that Iā€™m using BlueHost (not my choice) and have wondered if their platform is problematic (considering the negative reviews that Iā€™ve seen). Is there something that I need to do on the server side of things?

Cheers,

My form is located on my ā€˜Contact Usā€™ page on my site. I have put the send_form_smtp.php file and the PHPMailer folder in the root of my site (ie, at the same level as my index.html (ie, within public_html)). I have filled in the form settings exactly as shown in step 7 of this post.

When I go to my published website and fill in the form on my Contact Us page and click submit, I am taken to mywebsite/contact-us/send_form_smtp.php where I see the message
ā€œNot Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.ā€

I can understand that I get the message because the submit link is looking for the send_form_smtp.php file within the Contact Us folder and itā€™s not there. How can I get it to look for the file in the root instead of the contact us folder?

Hey @Lancedboyle.
This has been added to Blocs a while back so no need to go the tourist route anymore. :upside_down_face:
Just add a new mail server.