Form to Email - Xampp, PHP, Javascript, MAC OS - javascript

How to test "Contact us" page that takes form input, action = "send.php" which consists of mail function? I am using Xampp on Mac OS El capitan. No mail is received in the gmail inbox!

You can use PHPMailer class with SMTP.
Please visit PHPMailer SMTP Example
You can use Gmail SMTP server.
In this way you don't have to setup Mail Server on your OSX/Windows.

First of all, you cannot send emails to Gmail from your local computer. Unless you have a SMTP server setup, if you want to test an email form I suggest you to setup MailCatcher on your system https://mailcatcher.me.
Once installed you should be able to debug the emails you sent from the form when everything is ready, you can be sure that the form will also work online (unless something is wrong with the server).

Related

Ionos email account blocks Nodemailer

I'm using Nodemailer for a website, and everything works fine emails get sent. The website and email is on Ionos.
After a few days though I always get a warning message on the Email account that it has detected strange activity on the account and I have to change the password, if I ignore the message I can't send or receive any further Email.
Is this a common problem with Nodemailer? Is there a way to prevent this or is there a better mail solution I could use where it's less of a chance of this happening?
Nodemailer a lot of the time needs insecure app access, ionos email client doesn't and will not use insecure app access this means, this is a problem with ionos not being insecure allowing the API to connect to the email client

How can I hide my gmail.smtp password when using SMTP.js?

I want to send an email from my website. It's a static website so I only have JavaScript. Gmail has an SMTP service that is free to use and allows to send messages from the browser using smtp.js.
The problem is that anyone can look at the source of my website and find my gmail SMTP password. Can I somehow hide it?
You have to enable 2-factor authentication from security.google.com and then there will be available option of app passwords.From there you can generate temporary app password for gmail and use that in smpt js. It just works fine in my case.
You could use JWT. Here is a link that will help you JWT Tutorial

Nodemailer working in local environment but not I live website

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

Auto generated email In Oracle JET

I am creating an Oracle JET application in which I want to send an email to the user containing the user password when they click Forgot Password. I tried this using mailto: but it opens the mail client. I want the application to send mail without opening the mail client. Can someone please explain how this could be done. Can this be done only by using RESTful web services? Thank you.
Sending a mail requires a server-side action, i.e. connecting to an SMTP server. So if your RESTful web service is written in a language that supports SMTP, then yes you can do it. For example: http://www.journaldev.com/2532/javamail-example-send-mail-in-java-smtp
It has nothing to do it with Oracle-JET, which is just a UI framework.
P.S.
If you absolutely want to use client-side JavaScript just for the fun of it this answer shows how. But as the comments on it say, it's a complete breach of security.

In-app Email Functionality for Hybrid Application

I am building a hybrid mobile application (HTML5, JS, jQuery, CSS3) and need to implement in-app email functionality with following features:
Email feature to only send emails with predefined text and dynamically generated URLs (embedded within the email body)
This email feature should not send email via default email clients (like Gmail for Android). Sender email/ account will be defaulted to a constant value; it will not be user dependent.
Email to ask app-user to enter only the links which are to be send and the email-id of recipient (this feature is implemented as a form in the html page).
I have seen emailComposer However plugin. I am not sure if it routes the request via the default email client of your mobile.
Please provide inputs on how to build this functionality.
I could be wrong, but sending an email from a client using a pre-determined from is not likely something you'll be able to do. The reason I suspect this is because sending an email from a device to a mail server without the users direct interaction or personal email address opens the door for malicious applications to spam email servers with content. There may be a way to do it, but it would be much easier to send a request to a web server and have the web server send the email.
Stack Overflow questions seem to have possibly proven me wrong.
How to send email in background in Android ?

Categories

Resources