sazdg / linoleumPortfolio

Linoleum portfolio Final Exam Project - AngularJS
https://sazdg.github.io/linoleumPortfolio/
1 stars 1 forks source link

Send Email from Contatti Page #1

Closed ManuelVargas1251 closed 3 years ago

ManuelVargas1251 commented 3 years ago

Send Email from a Static HTML

I found some solutions, generally you would need a server but there are some free services we can use.

https://formspree.io/

ManuelVargas1251 commented 3 years ago

using formspree.io, we can edit the contact form to your custom fields. and their code already has the info to send the email through their service.

https://formspree.io/library/simple-contact-form/

sazdg commented 3 years ago

What about form action="mailto:...." easy peasy image

or maybe better email with php

image

https://html.form.guide/email-form/html-email-form/

sazdg commented 3 years ago

image

from your suggestion

sazdg commented 3 years ago

image

basically all I need is that action code

ManuelVargas1251 commented 3 years ago

For the first option you mention, mailto will open gmail and you will have to write your own email; there is no automation. Only opens mail client (gmail/outlook/any).

For the second option, we need a php server to run those requests which we currently do not have. unless we have server, we cannot use php :/

ManuelVargas1251 commented 3 years ago

okay, I am creating an account on formspree to begin testing!

sazdg commented 3 years ago

how fast lol I like your idea but I will try by myself php just to review some php code

sazdg commented 3 years ago

okay, I am creating an account on formspree to begin testing!

image

here's the catch :(

ManuelVargas1251 commented 3 years ago

yes there is a catch, custom forms require you to update also.

alternative site but similar situation: https://formkeep.com/#pricing

image

ManuelVargas1251 commented 3 years ago

ok I was able to test locally.

image

and I received the email:

image

ManuelVargas1251 commented 3 years ago

the code I used is below:

     <form action="https://formspree.io/f/mknpadkz" method="POST">
      <input type="text" name="name">
      <input type="email" name="_replyto">
      <input type="submit" value="Send">
    </form>
sazdg commented 3 years ago

image

At least I can write the code but it will never works on github. And I can add a button "mailto:ecc...."

ManuelVargas1251 commented 3 years ago

In order to do the PHP site, we would need to also host the files in the php server by deploying in github. Using heroku is easy as it has integration for github but this will take more time to develop.

https://devcenter.heroku.com/articles/getting-started-with-php https://devcenter.heroku.com/articles/deploying-php

sazdg commented 3 years ago

I understand, that's interesting

sazdg commented 3 years ago

image

sazdg commented 3 years ago

ah lol I can see it

ManuelVargas1251 commented 3 years ago

yes, click in the Source section, and select my branch. it is named, contact-form-update-mv

sazdg commented 3 years ago

image

sazdg commented 3 years ago

I don't see any difference, do you?

ManuelVargas1251 commented 3 years ago

I do! just tried it, check your email.

image

sazdg commented 3 years ago

image

yessss!!!!

sazdg commented 3 years ago

image

Is this a real email? ahhaha

sazdg commented 3 years ago

Thank you so much Manolo!1!!1!11 Tu eres genial

ManuelVargas1251 commented 3 years ago

if you click on my email link above, that is the mailto function. FYI

image

sazdg commented 3 years ago

yay I tried, I don't like it

ManuelVargas1251 commented 3 years ago

Please click on pull request in your repo front page (bottom right) :

image

sazdg commented 3 years ago

image

ManuelVargas1251 commented 3 years ago

no, make sure the base is your master(main) branch

sazdg commented 3 years ago

image

I think this is correct

ManuelVargas1251 commented 3 years ago

yes!

ManuelVargas1251 commented 3 years ago

Pull Request to merge to master branch: https://github.com/sazdg/linoleumPortfolio/pull/2