Send Email from Static Page Hosted on Github Pages

Send email from static page hosted on GitHub Pages

This cannot be done natively on GitHub pages. You will need to use some kind of form submission tool.

GitHub's pages documentation describes what you can and cannot do with the hosting, and what plugins it supports.

Make contact form for GitHub Page

Github Pages only supports static sites and does not support server-side languages.

To make a form, you could you a third party service such as kontactr, formspree, or enformed

Github Pages not working for static website

Look at your URLs.

In your development server, you are publishing at /

On Github Pages, you are publishing at /pizza-legends/

Your URL which starts /Content/... is going to /Content/... on your development server and find the file.

On Github Pages, it is going to /Content/... and not finding the file because it is at /pizza-legends/Content/....

Fix your URLs.


NB: You had your developer tools open. You should have looked at the Network tab and seen all the 404 Not Found errors.

Yew application unable to access static files when hosted in GitHub pages

Following adds the /my-website base to all the static file links.

trunk serve --public-url /my-website

How to email people a coupon code when they submit their email

You won't find any reliable service which offers this. There are two possibilities:

  1. The API does not need an API key, so it can be used by anyone to send emails. Such a service would be used for spamming and won't fit your needs, because all messages will end up in the spam folder.
  2. The API does need an API key, so you will have to expose the key to your users, which is a really bad idea, because someone could steal it and cause damage.

So, you will need to setup some sort of web server with a small API.



Related Topics



Leave a reply



Submit