-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue # 78 | Feature: Add Email Contact Form Function for Java #235
base: main
Are you sure you want to change the base?
Issue # 78 | Feature: Add Email Contact Form Function for Java #235
Conversation
Hi folks, I attempted to include HTML files in a separate static folder, but encountered issues accessing them. After seeking advice on the Discord channel, I learned that due to Java being a compiled language, it cannot directly include static and resource files. However, I made an effort to address this by copying the files to the 'src/main/resources' folder within OpenRuntimes, as per Steven's suggestion. Unfortunately, I encountered challenges while doing this. As a workaround, I have added the html content as constant strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR - left some comments
- Remove unwanted imports _ Remove unwanted error code variable declaration & have it inline - Refactor javadoc style comments - Access Origin headers with lowercase "origin"
Hi @loks0n Thank you so much for taking time to review my PR. I have pushed the recommended changes. |
I've added |
Thanks @loks0n |
Dicord Name for Hacktoberfest communications : palani_13 |
|
||
public class Utils { | ||
|
||
static String INDEX_HTML = "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\" /><meta http-equiv=\"X-UA-Compatible\" content=\"IE\" /><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /><title>Email Contact Form</title><link rel=\"stylesheet\" href=\"https://unpkg.com/@appwrite.io/pink\" /><link rel=\"stylesheet\" href=\"https://unpkg.com/@appwrite.io/pink-icons\" /></head><body><main class=\"main-content\"><div class=\"top-cover u-padding-block-end-56\"><div class=\"container\"><div class=\"u-flex u-gap-16 u-flex-justify-center u-margin-block-start-16\"><h1 class=\"heading-level-1\">Contact</h1><code class=\"u-un-break-text\"></code></div><p class=\"body-text-1 u-normal u-margin-block-start-16\" style=\"max-width: 50rem\">Fill the form below to send us a message.</p><form class=\"u-flex-vertical u-gap-16 u-margin-block-start-16\" style=\"max-width: 50rem\" method=\"post\"><input type=\"email\" name=\"email\" placeholder=\"Email\" required /><textarea name=\"message\" placeholder=\"Your Message\" required></textarea><button class=\"button\" type=\"submit\">Submit</button></form></div></div></main></body></html>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're going to hold off merging this PR until we have a better solution for this on Open Runtimes
(#78)
What does this PR do?
Add Email Contact Form Function for Java
Test Plan
video1595354462.mp4