I have configured SES From email address to my Cognito User Pool. Using the SES Account, I could able to send emails to my Gmail account. If I use the same email address in the user pool. It is not sending emails to my Gmail account and it is working for yopmails.
Is there any way to check the logs for SES in AWS. For sure it is sending emails successfully.
Is there any chance to verify the Gmail logs??
I am thinking there is a problem with Cognito I guess. Can anyone help??
Related
Hello I made a NodeJs backend and I implemented nodemailer. The only issue is I get the error with Invalid Login, because I don't have less secure apps turned on. I know, but I went to google and I clicked on the less secure app section and this is what I get
This setting is no longer available. Learn more
Does anyone solved the error different way and is able to send emails?
When you want to send email over Gmail SMTP, google enable you to set up App password. You have to have set up 2-Step verification in your google account. Once 16 digit password are generated, you just replace password for login (username is your email address, that does not change).
Sources:
Google: Sign in with App Passwords
I was trying to get form data to my gmail account so I get to know about 'nodemailer' package but the problem is that it is asking for my gmail password also I have to make my gmail account less secure for this.
Is there any way to get mail without my password?
Use an 'App Password' for this purpose. This is "a 16-digit passcode that gives a less secure app or device permission to access your Google Account". See https://support.google.com/accounts/answer/185833?hl=en
I have a web app built on React, and backend on NestJs. I want to integrate email platforms to my app.
Let's say a user signed up in my app and then he uses other functionalities in the app.
Then he wants to receive and send emails using my app and for that, he must integrate his email account (whether Gmail, Hotmail or any other email provider) with my app.
How can I provide such functionality? and What does it call?
I have tried to research a bit on it on Google and found some options like Nylas and MailGun. But I'm not sure if they are according to my case scenario.
Any lead and suggestion is appreciated.
Thanks
You will need an IMAP client to retrieve received emails from the remote servers (of Google, Microsoft etc.) you should be able to use IMAP Simple package.
Additionally you will also need an SMTP client to send emails and for this, you would need SMTP Client.
This would require the users to disclose their SMTP/IMAP details or in some cases their actual login details which might make them uncomfortable; however this approach is universal with almost all mail service providers/servers.
Alternatively if you are just targeting Gmail you can use the Gmail API where users would grant your app the permissions to send and access their mails.
You can also use the Microsoft Graph interface to access their Mail API to both send and receive emails from Hotmail / Outlook.
Nylas absolutely fits this use case: the primary purpose is to enable developers to integrate their user's email accounts into an app. You can connect your own email account via the dashboard for testing purposes, or use the hosted auth service to automatically detect email providers and provide the appropriate login flow to connect the user email accounts. Once an account is connected, you can use the Threads and Messages endpoints to ingest email content and the Send and Outbox endpoints to send emails.
Mailgun, on the other hand, is a transactional email API service that is intended primarily for things like mass marketing emails, account management (password reset, email verification), etc. Afaik, it doesn't connect to your user's email accounts, even when it's being used to send emails from a specific user (the emails come from Mailgun's SMTP servers, not the user's provider). You can learn more about the difference between transactional email APIs (Mailgun) and contextual email APIs (Nylas) here.
While sending mail using node-ses we need to provide access key and secret key at the time of client creation.
I want to get rid of these keys and would like to handle this using IAM role access for lambda function in which this code is running.
ses = require('node-ses'),
client = ses.createClient({ key: config.get('awsSettings.accessKey'), secret: config.get('awsSettings.secretKey') }),
There is no way to get around using some form of SES credentials, when using either SES API or SES SMTP service interfaces. In the case of node-ses, this library implements SendEmail and SendRawEmail SES API calls, and therefore is subject to the credential requirements of this service.
In both cases, these credentials are either issued by SES when you enable the service, and/or are configured via an IAM user, the secret and access keys associated with that user. These credentials are used for authentication by both SES SMTP and API services, and function as user name and password for this purpose.
You cannot use an IAM role to substitute for the use of SES credentials; SES requires email clients to use these one of these credentials for SES service authentication.
To summarize from Using Credentials With Amazon SES:
If you want to access the Amazon SES API, then use AWS access keys (Access key ID and secret access key), which consist of the Access key ID and secret access key for the designated IAM user account.
If you want to access the Amazon SES SMTP interface, you use SES SMTP credentials, which consist of a user name and password. Although
your Amazon SES SMTP credentials are different than your AWS access
keys and IAM user access keys, Amazon SES SMTP credentials are
actually a type of IAM credentials.
I have a node.js web application and I'd like its status page to have an indicator if the SMTP settings for the site are functioning. I could send an email and check if it goes across, but I'm wondering if I can do something like a ping for SMTP. Can I, without actually sending an email, check that I can connect to the SMTP server and verify the configured credentials?
I did a little experimenting with the smtp-protocol module (https://npmjs.org/package/smtp-protocol) but was not successful as I couldn't figure out how to use a username/password with the client.
Make verification method by sending email using that current credentials. if email can be sent then by that credentials then it is working fine otherwise it will be incorrect credentials. if it is correct credentials then use it for email sending process