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
Related
I am new to firebase and I am trying to handle firebase user authentication in React.js. I did manage to create users with email and passwords. But, now I would like to send the user an Email link to reset their password.
My code currently look like this.
// This line of code belongs to the top
import { auth } from '../firebaseConfig'
//This part goes under the React component
<p onClick={async () => {
try{
await sendPasswordResetEmail(auth, // My Email Id)
alert('Password reset link has been sent to your email')
}
catch(err){
alert(err)
}
}}
>Forgot your Password ?</p>
However, I do not get any error messages and I do get the alert message that says "Password reset link has been sent to your email." Unfortunately, I didn't receive any email. Note that I have given my own email id as the parameter for testing purposes.
firebaser here
Did you check your spam folder? We recently see a lot of the emails from Firebase Authentication ending up in the user's spam folder or being marked as spam in a system along the way. This is being tracked in this status message on the Firebase dashboard and in public issue #253291461.
To reduce the chances of the messages getting marked as spam, consider taking more control of the email delivery yourself.
As a first step, consider using a custom domain with your project. Email that comes from a custom domain has less chance of being marked as span.
As a second step, consider setting up your own SMTP server.) for delivering the email, so that the emails are not being delivered from Firebase's shared infrastructure anymore.
While these steps are more involved, they typically will drastically reduce the cases where the messages from Firebase Authentication are marked as spam.
Full Guide Based on Frank's Answer
Firstly create a new email account you can use to relay the Firebase emails through the SMTP server with. I personally chose Gmail, but I tested with Outlook and it also works.
You can now find an SMTP server host that will work for your scenario. If you're sending less than 1000 emails per month you can find free and reliable hosts. I chose SMTP2GO's free option.
Now you've found the SMTP host, add the email address you've chosen as a single sender email (note that if you do own a domain, you can alternatively use that to send emails).
Note that you will have to verify the email, usually by your host sending a link to the email's inbox. Make sure to check spam.
Once verified, navigate to where you host allows you to add SMTP Users and add a new user. This will allocate an SMTP username and password.
Navigate to the Firebase console, and choose the Authentication option from the sidebar (within the Build product category).
Go to Templates → SMTP Settings and enter the details of your SMTP server. The username and password fields are to be filled with the SMTP user login you created in the step above.
It is better to use TLS, but I believe SSL should work too but it is untested.
Click save, and you're all set up - but there may still be steps to perform depending on your email provider.
Provider Specific Steps
If the emails are being sent to an account managed by Google you will have no issues with your emails being quarantined by anti-spam policies and it will work immediately.
If you are using Outlook, you will have a different problem on your hands. Outlook's built in defender will most likely have auto-quarantined your email under multiple policies - that bit is important.
These policies are likely to be both spam and phish policies. If you unblock one of them, the other will catch it and re-quarantine.
Unblock both policies for the email address, and test. You can see the status of quarantined messages in Microsoft 365 Defender app under Review → Quarantine. Please note that you will need to be an administrator to add global allow policies to your email accounts.
If this still doesn't work it is likely that your company has an additional external filter (as mine did), and you will have to add the IP's manually to the Tenant Allow/Block Lists spoofed senders tab.
I started implementing a mail project on Node.js. Now I'm trying to figure out how to send a message to another mailbox, do I understand correctly that:
port 25 is used for connection between different mail agents, that is, if I want to send a message from telnet (or from my mail) to gmail, then I should use this port? (Is this called sending?)
Port 587 is used if I want to send messages from my mail (for example Gmail), that is, I have to go through to send a message? (This is called retransement? When does the letter go between the accounts of one postal agent)
on port 25 do I need to use the mx record to connect to other mail?
UPT: if you are looking for answers, i recommend you check this link:
https://serverfault.com/questions/1045480/e-mail-transmission-example
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).
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 ?
I've implemented a functionality in my MVC 4 web application where the user can select a set of email addresses from a list and by clicking a button it opens the default mail client in the client computer with the selected email addresses in the bcc field and their own email address in the to field. This as a functionality works fine.
But when I started to test this with a long list of bcc email addresses, it didn't open the default email client and it didn't give any errors.
Then I tried to copy the complete url with the long list of bcc email addresses, paste it in a new browser window and tried to navigate from there to see if it works. then it gave me the URL too long http exception. I counted the number of characters in the mailto url which worked and it was around 1737 in Chrome. Is there anyway to override this problem and allow the user to open the default mail client in their computer with lots of bcc email address?
I can't use a server side solution to let them send emails as I can't allow them to use our mail server to send emails to lot of people at once.
any help is really appreciated!
thanks!