Sending email from any provider to a fixed address - node.js

I have a contact form where the sender could be from gmail, outlook or any other provider and the receiver is always the same.
How can I send email in this case?
I need to switch params based on the sender's provider or I can send without them?
Nodemailer auto-detect provider from the address or I need to specify it in the smtp transport?
UPDATE: Is there a different solution than nodemailer?
I'm expecting to receive email from any kind of address fulfilling the contact form.

Related

Check if an email was replied to using Mailgun API

I'm building a SAAS app that allows users to send email sequences, I want to stop the sequence when a user replies to an email sent by my app.
Based on what I found on the internet I should use Mailgun Routes to accomplish it.
I have all set up (Domain and MX records) but I couldn't forward emails to my server.
What I want to accomplish is the following:
User A uses this email address (usera#example.com)
User B uses this email address (userb#lorem.com)
User A sends an email using my platform, my platform calls mailgun
API to send it
User B receives that email and hits reply
Mailgun notices that User B replies and forwards that reply to my
server.
I do not own neither example.com nor lorem.com domains
What am I doing wrong?
If you control neither, you can't. Set the Reply-To address to something you control and that's linked to Mailgun Routes, check the Message-ID then forward the e-mail to user B.
Rather than using the Message-ID header, some people generate a unique Reply-To address (replies+a2c4e6#some-domain.tld) as the In-Reply-To header isn't guaranteed to be sent.

Allow customer to send me email

I'm bulding website where I want to allow future customers to send me an email. I'm using Node.js to handle sending and thought SendGrid would be good solution. There's actually problem, because SendGrid requires me to define sender and that's impossible because I'd like to customer fill form with his email, etc so I would get this data on my inbox. Is it even possible with SendGrid or maybe there's other tool that would fit me better?
Thanks in advance
what I have implemented in the past was a solution where the application sends an email to it self, and the email address of the user was added to the email header reply-to, this way whenever somebody with the access to the email client would press the Reply button, the user's mail would be the destination.
Example:
admin#yoursystem.com ---> Sends an email to ---> admin#yoursystem.com (with the user's message and his email address in the mail header reply-to).

Get original email headers of forwarded email using domain-wide-delegation

We have all spam and phishing emails being forwarded to an IT department for review. We currently have individuals downloading the original email in their gmail inbox and then attaching it to an email to the spam box. This has caused a lot of complaints from less technical users.
I am trying to build a python script that can read forwarded emails and then use domain wide delegation to access their email boxes and retrieve the original headers of the forwarded message.
Do any of the fields in the gmail headers stay constant when forwarding an email so that a forwarded email can be used to query the original email in a users inbox ?
The current method that I have tried reads the message ID's of the spam box, retrieves the message, identifies the sender and messageID's of the messages in the spam box and then uses domain-wide-delegation to query the mailbox of the sender for the original message. This fails however as Gmail messageID's and threadID's of the forwarded emails don't match the original email.

Gmail randomly exposes gmail address

I have various email addresses set up under Gmail. I have checked 'Treat as Alias' and also checked 'Reply from the same address the message was sent to'. Despite this I find that Gmail will randomly expose my user#gmail.com address when sending mail, or when I reply to mail sent to one of my pseudonymous addresses.
Have other people had this problem?
Is there something else I need to do to get Gmail to secure my email addresses?
Is there another service I should consider that has better integrity with regard to this issue?

Send email from #my-domain.com using SendGrid in Azure

I have my web app working in azure. What I would like is to be able to send emails from xxx#mydomain.com. Is that possible using SendGrid?
For example, if I use gmail's smtp, emails are sent from the email address specified in the NetworkCredentials user name, even if in the MailMessage I use a different email address.
If I use SendGrid instead, will emails come from the user name created by azure or will I be able to achieve this?
You will be able to send email from whatever address you want, just specify the correct from address (e.g. xxx#mydomain.com) when sending the email.
You will need to use what SendGrid calls "Whitelabels":
To access this page, log into https://app.sendgrid.com/ then click on Settings > Whitelabels > Domains:
SendGrid will then ask you to enter 3 CNAME records to prove that you own/ have authorised access to that domain.

Resources