y7kim/agency-jekyll-theme

Email Form

Closed this issue · 15 comments

Hello!

I'm using your theme and it is great. However, I've run into one final poblem with the email form. I get the error "Sorry , it seems that my mail server is not responding. Please try again later!" I am not sure where the problem is coming from... I've tried changing the email in the _config.yml and contact_me.php, to no avail. I'm new to this, so perhaps there is something wrong with my setup. Any thoughts?

y7kim commented

Hi,

First of all, thanks for using the theme!

Your issue is actually expected, as github pages only serves static content

  • ie. mail/contact_me.php doesn't work when hosted on github pages. It is
    not too hard to fix however:

First, you will need to sign up for a mail sending service like SendGrid or
Mandrill, which allows you to send email via a Javascript API.

Then, you can modify the ajax request in the 'submitSuccess' method
(line20) in /js/contact_me.js - you will have to replace the url field with
the appropriate API endpoint, and pass the appropriate parameters according
to your mail service provider.

Those are the high-level instructions I will leave you with - if you have
any more questions about implementing it, just let me know. I may be able
to give you some more hands-on help if you are not that familiar with JS
and API's.

Best,

Rick

On Sat, May 30, 2015 at 5:40 AM, allochory notifications@github.com wrote:

Hello!

I'm using your theme and it is great. However, I've run into one final
poblem with the email form. I get the error "Sorry , it seems that my mail
server is not responding. Please try again later!" I am not sure where the
problem is coming from... I've tried changing the email in the _config.yml
and contact_me.php, to no avail. I'm new to this, so perhaps there is
something wrong with my setup. Any thoughts?


Reply to this email directly or view it on GitHub
#14.

Rick,

Thanks! This is great. I am not familiar, as this is only my second
website, but I'll dive in and see how things go. I appreciate your help
and if I get completely stuck I might take you up on your offer!

Tyler

2015-05-30 18:27 GMT+02:00 Rick K. notifications@github.com:

Hi,

First of all, thanks for using the theme!

Your issue is actually expected, as github pages only serves static content

  • ie. mail/contact_me.php doesn't work when hosted on github pages. It is
    not too hard to fix however:

First, you will need to sign up for a mail sending service like SendGrid or
Mandrill, which allows you to send email via a Javascript API.

Then, you can modify the ajax request in the 'submitSuccess' method
(line20) in /js/contact_me.js - you will have to replace the url field with
the appropriate API endpoint, and pass the appropriate parameters according
to your mail service provider.

Those are the high-level instructions I will leave you with - if you have
any more questions about implementing it, just let me know. I may be able
to give you some more hands-on help if you are not that familiar with JS
and API's.

Best,

Rick

On Sat, May 30, 2015 at 5:40 AM, allochory notifications@github.com
wrote:

Hello!

I'm using your theme and it is great. However, I've run into one final
poblem with the email form. I get the error "Sorry , it seems that my
mail
server is not responding. Please try again later!" I am not sure where
the
problem is coming from... I've tried changing the email in the
_config.yml
and contact_me.php, to no avail. I'm new to this, so perhaps there is
something wrong with my setup. Any thoughts?


Reply to this email directly or view it on GitHub
#14.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@allochory: Take a look at my version for an email form that works on github pages: https://github.com/zbeekman/zbeekman.github.io

y7kim commented

very nice solution zbeekman, thanks.

Hello, I have a similar problem, my form doesn't validate information, just sends the message (

okay I get it now, it seems that input wrap required a proper class

@Tamxaun can you please elaborate on the fix?

it works when the wrap of input have a class .control-group, here is the example:

<fieldset class="control-group">
    <input id="email" type="email" data-validation-required-message="Please enter your email" required>
    <p class="help-block text-danger"></p>
</fieldset>

The email form issue still seems persistent even after this fix #33. I was wondering what else I was missing to make it work 😢

Thanks Mr. @zbeekman
It was awesome... works perfectly on my blog

Also wanted to add my thanks to @zbeekman for the static email solution. I updated the URL on line 23 in /assets/js/contact_me.js (as suggested by @y7kim ) to //formspree.io/"myemail@blah.com" and after confirmation, it just works.

Thanks for sharing your hard work!

@thinkjrs Thank you very much. You gave a concrete solution of @y7kim 's answer.

@thinkjrs is it possible to get a little bit of support in the contact form?

Boa Tarde, estou como o mesmo problema alguém poderia me ajudar ?

Rick,

Thanks! This is great. I am not familiar, as this is only my second
website, but I'll dive in and see how things go. I appreciate your help
and if I get completely stuck I might take you up on your offer!

Tyler

2015-05-30 18:27 GMT+02:00 Rick K. notifications@github.com:

Hi,
First of all, thanks for using the theme!
Your issue is actually expected, as github pages only serves static content

  • ie. mail/contact_me.php doesn't work when hosted on github pages. It is
    not too hard to fix however:

First, you will need to sign up for a mail sending service like SendGrid or
Mandrill, which allows you to send email via a Javascript API.
Then, you can modify the ajax request in the 'submitSuccess' method
(line20) in /js/contact_me.js - you will have to replace the url field with
the appropriate API endpoint, and pass the appropriate parameters according
to your mail service provider.
Those are the high-level instructions I will leave you with - if you have
any more questions about implementing it, just let me know. I may be able
to give you some more hands-on help if you are not that familiar with JS
and API's.
Best,
Rick
On Sat, May 30, 2015 at 5:40 AM, allochory notifications@github.com
wrote:

Hello!
I'm using your theme and it is great. However, I've run into one final
poblem with the email form. I get the error "Sorry , it seems that my
mail
server is not responding. Please try again later!" I am not sure where
the
problem is coming from... I've tried changing the email in the
_config.yml
and contact_me.php, to no avail. I'm new to this, so perhaps there is
something wrong with my setup. Any thoughts?

Reply to this email directly or view it on GitHub
#14.


Reply to this email directly or view it on GitHub
#14 (comment)
.

good morning. i am not familiar to APS so can i ask where i can get API to replace