I created a contact form that uses nodemailer to send emails from my web page. It works fine in a local environment but after uploading to the live website it gives me 404 not found when the POST request is called which to me suggests the code which is sending the email is not running. Is there something that needs to be changed in the code for it to work being made live?
You can Disable Captcha temporarily, you can mail using new server,
https://accounts.google.com/b/0/displayunlockcaptcha
Related
I know Netlify hosts only static websites. Do I have to find a different hosting service other than Netlify since I want to have a PHP contact form that customer will fill out and the info will be emailed back to me?
use form submit to receive emails. Watch this tutorial on how to use it but the library is simple to use
Yes, you can host website that including PHP files on Netlify view this link and watch this video for more information about hosting PHP apps.
This is my first trial at web development. I used React-Redux and created a React.js app in the client folder. My backend code language is Node.js and MongoDb for my database.
This is my project.
https://github.com/FaridaElOraby/newest_version.git
It is working on my pc but when I tried to run it on another PC, I could not login or register. When I fill in the fields when logging in or registering and press on submit nothing happens. I should get redirected to the homepage or to login page. There is also no network response. I even tried to console the "res" in the backend to see if the info gets passed to the backend, there was nothing. I don't know why the backend does not see my request. There is a proxy error that pops up from localhost:3000 to localhost:5000 (server). If I don't fill in any fields and try to submit, an error pops up in the console Network Error bad request localhost:3000/api/user/register.
I was using mongoose for the DB at the backend and the mongo link was expired so it returned a network error. I changed the link at the backend with a working one and it wokred.
I want to send a email automatically with JS.
I use the next code to open a window with outlook with a mail with the information that I want.
Now I want to send the mail with JS. I need to "click" the send button automatically of the Outlook interface. Any ideas? Maybe with an Ajax /JQuery?
If anyone knows other process to send emails automatically with JS its usefull for me too.
function main(){
location.href = "mailto:"+'someone#something.com'
+'?cc='+" "
+'&subject='+'something'
+'&body='+"Hi, im an automatic mail";
}
To details
Please note, JS is client side and runs inside browser, you do not have access to any application or file system outside browser or to browser itself..
Further,
If you need to send automated emails, you will need server side email engine configured and will need to make ajax / jQuery call to engine with recipient details..
Actually this app has been developed using the Phonegap. It is not a native IOS Application. You can get more information about Phonegap from the official site http://phonegap.com.
As you know we use HTML, CSS, JAVACRIPT in a Phonegap Application, so we are using an HTML 5 feature of local storage in our application in order to save some local data.
Like I did in login page. I sent a request to server with the login details using AJAX and if the login details are valid then the server sends a user id as a JSON response.
I saved that user id using HTML 5 local storage feature like below:
user_id=data['user_id']; // the array data is the array that was generated from JSON response
window.localStorage.setItem("user_id",user_id); //saved user id in local storage
The above code saves the Id of the user in the local storage who is currently logged into the app.
But I am unable to retrieve that information from the local storage on the next page when I tried to retrieve it using the following code:
user_id = window.localStorage.getItem("user_id"); // fetch user id from local storage
it saves "undefined" in variable user_id.
On the inner pages of app I have to send this user_id to the server after fetching it form the local sotrage in order to get the data of the logged in user as a JSON resonponse from the server. But rather than sending actual user id it is sending "undefined" in place of that user_id to the server because of which the server doesn't generate proper JSON response and the AJAX gives an error callback where I am showing this message as an alert:
"Application could not reach doggone server. Please check your internet connection."
The strange thing is that it was working earlier when users purchased the app from app store and it stopped working suddenly when i tried to submit the new build for the next version of the app.
I did some research on google and I found that HTML 5 local storage doesn't work on IOS 5.1 or later. But it was working few days earlier. It stopped working since I am trying to upload the new binary for next version 2.0.
Kindly look at it this problem and provide a solution to us. Our whole app is using the HTML 5 local storage feature almost on every page in order to fetch the current user data from server.
put the
window.localStorage.setItem("user_id",user_id);
in a try/catch block. You might easily catch a QUOTA_EXCEEDED error (ran out of storage space). Happened to me just the other day...
I am hoping for some help regarding an offline iPad application.
I have a form within the app that the user fills in, this form then links to a PHP script online. Obviously you can't run the script until you are on line. Is there any way at all of clicking the form submit button, if there is a connection it will connect to and run the PHP and if there is no connection it will automatically run the php in the background when a connection becomes available.
I have tried a number of different searches but have still been unsuccessful.
Thank you in advance!
It most likely is possible to solve this problem with JavaScript, but that's not so straightforward. Since you are dealing with an iOS app where it is possible to check network connection status and listen for changes, you probably should create a service that receives the form data within your app. That service should store the data locally, find out when your target server is accessible and send it.
UPDATE:
If you are dealing with a web-app, the way to go for it still to implement a service in JavaScript that uses timed events (i.e. setTimeout() or setInterval()) to check connection status. Upon submitting the form, prevent the default behaviour so the form is not submitted traditionally. Instead, store the data locally in sessionStorage or localStorage and when your service finds the target server available, read the locally stored data and send it via AJAX.